src: fix interpreter FFI to support nitvm
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 16 Jun 2015 17:05:21 +0000 (13:05 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 17 Jun 2015 16:52:14 +0000 (12:52 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/interpreter/dynamic_loading_ffi/dynamic_loading_ffi.nit

index e327c96..656e685 100644 (file)
@@ -151,7 +151,9 @@ private extern class CallArg `{ nit_call_arg* `}
                        return v.native_string_instance(self.native_string.to_s)
                else if static_type isa MClassType and static_type.mclass.kind == extern_kind then
                        # We tag it with the most precise known type
-                       return new PrimitiveInstance[Pointer](static_type, self.pointer)
+                       var instance = new PrimitiveInstance[Pointer](static_type, self.pointer)
+                       v.init_instance_primitive instance
+                       return instance
                else
                        return self.instance
                end