[Vm-dev] Problem compiling SqueakFFI Plugin

Javier Pimás elpochodelagente at gmail.com
Sun Apr 1 02:09:37 UTC 2018


And I have a similar problem with LargeIntegerPlugin

../../src/plugins/LargeIntegers/LargeIntegers.c:169:36: error: expected ‘)’
before ‘objectPointer’
 extern sqInt isIntegerObject(sqInt objectPointer);
                                    ^
../../src/plugins/LargeIntegers/LargeIntegers.c:105:33: note: in definition
of macro ‘isIntegerObject’
 # define isIntegerObject(oop) ((oop) & 1)


$ git diff HEAD~2 ../../src/plugins/LargeIntegers/LargeIntegers.c
diff --git a/src/plugins/LargeIntegers/LargeIntegers.c
b/src/plugins/LargeIntegers/LargeIntegers.c
index 267a96d2c..638ca631f 100644
--- a/src/plugins/LargeIntegers/LargeIntegers.c
+++ b/src/plugins/LargeIntegers/LargeIntegers.c
@@ -102,8 +102,7 @@ static const int  andOpIndex = 0;

 #if defined(SQUEAK_BUILTIN_PLUGIN)

-//sqInt isIntegerObject(sqInt oop) { return oop & 1; }
-//# define isIntegerObject(oop) ((oop) & 1)
+# define isIntegerObject(oop) ((oop) & 1)

where does this C code difference come from?

On Sat, Mar 31, 2018 at 6:48 PM, Javier Pimás <elpochodelagente at gmail.com>
wrote:

> when generating the squeakffi plugin I get different sources than the ones
> in src/plugins dir. Mine generate a compiler error, because isImmediate is
> redefined, any idea?
>
> the original src/X64SysVFFIPlugin.c contains (~ line 460):
>
> #if !defined(isImmediate)
> #if VM_PROXY_MAJOR > 1 || (VM_PROXY_MAJOR == 1 && VM_PROXY_MINOR >= 13)
> extern sqInt isImmediate(sqInt anObject);
> #else
> # define isImmediate(anObject) 0
> #endif
> #endif
>
>
> while mine gets:
>
> #if VM_PROXY_MAJOR > 1 || (VM_PROXY_MAJOR == 1 && VM_PROXY_MINOR >= 13)
> extern sqInt isImmediate(sqInt anObject);
> #else
> # define isImmediate(anObject) 0
> #endif
> #if !defined(isImmediate)
> #endif
>
>
> Cheers,
> Pocho
>
> --
> Javier Pimás
> Ciudad de Buenos Aires
>



-- 
Javier Pimás
Ciudad de Buenos Aires
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180331/dd9de67d/attachment.html>


More information about the Vm-dev mailing list