[macruby-changes] [2916] MacRuby/trunk/bridgesupport.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 28 21:02:34 PDT 2009
Revision: 2916
http://trac.macosforge.org/projects/ruby/changeset/2916
Author: lsansonetti at apple.com
Date: 2009-10-28 21:02:33 -0700 (Wed, 28 Oct 2009)
Log Message:
-----------
fixed Pointer to work with ^v (void *) type
Modified Paths:
--------------
MacRuby/trunk/bridgesupport.cpp
Modified: MacRuby/trunk/bridgesupport.cpp
===================================================================
--- MacRuby/trunk/bridgesupport.cpp 2009-10-29 02:16:12 UTC (rev 2915)
+++ MacRuby/trunk/bridgesupport.cpp 2009-10-29 04:02:33 UTC (rev 2916)
@@ -572,6 +572,12 @@
VALUE
rb_pointer_new(const char *type_str, void *val)
{
+ // LLVM doesn't allow to get a pointer to Type::VoidTy, and for convenience
+ // reasons we map a pointer to void as a pointer to unsigned char.
+ if (*type_str == 'v') {
+ type_str = "C";
+ }
+
rb_vm_pointer_t *ptr = (rb_vm_pointer_t *)xmalloc(sizeof(rb_vm_pointer_t));
GC_WB(&ptr->type, rb_str_new2(type_str));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091028/b2cdd703/attachment.html>
More information about the macruby-changes
mailing list