[macruby-changes] [4205] MacRuby/trunk/bridgesupport.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 4 18:00:28 PDT 2010
Revision: 4205
http://trac.macosforge.org/projects/ruby/changeset/4205
Author: martinlagardette at apple.com
Date: 2010-06-04 18:00:26 -0700 (Fri, 04 Jun 2010)
Log Message:
-----------
Oops, do not delete the handling of void pointers. Only the creation should not be allowed
Modified Paths:
--------------
MacRuby/trunk/bridgesupport.cpp
Modified: MacRuby/trunk/bridgesupport.cpp
===================================================================
--- MacRuby/trunk/bridgesupport.cpp 2010-06-05 00:03:40 UTC (rev 4204)
+++ MacRuby/trunk/bridgesupport.cpp 2010-06-05 01:00:26 UTC (rev 4205)
@@ -745,7 +745,12 @@
rb_pointer_init_type(rb_vm_pointer_t *ptr, VALUE type)
{
const char *type_str = StringValuePtr(type);
-
+ // 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";
+ type = rb_str_new2(type_str);
+ }
GC_WB(&ptr->type, type);
RoxorCore *core = GET_CORE();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100604/ac3710e0/attachment.html>
More information about the macruby-changes
mailing list