[squeak-dev] Alien FFI
John M McIntosh
johnmci at smalltalkconsulting.com
Sun Mar 22 00:40:11 UTC 2009
Alien-Core has this, so is the one you've attached superceeds that?
pragmaLiteral: selectorSoFar
"Read a pragma literal. As a nicety we allow a variable name (rather
than a literal string) as the second argument to primitive:error:"
(hereType == #string or: [ hereType == #literal or: [ hereType ==
#number ] ])
ifTrue: [ ^ self advance ].
(here == $# and: [ tokenType == #word ])
ifTrue: [ ^ self advance ].
(here == #- and: [ tokenType == #number ])
ifTrue: [ ^ (self advance; advance) negated ].
(here = 'true' or: [ here = 'false' or: [ here = 'nil' ] ])
ifTrue: [ ^ Compiler evaluate: self advance ].
((selectorSoFar = 'primitive:error:') and: [hereType == #word]) ifTrue:
[^self advance].
^ self expected: 'Literal constant'
On 21-Mar-09, at 2:19 PM, Eliot Miranda wrote:
> Hi Ang,
>
> On Sat, Mar 21, 2009 at 6:16 AM, Ang Beepeng <beepeng86 at yahoo.com>
> wrote:
>
> I'm trying to load Alien-core into my image, in Windows. It
> complaint about
> syntax error.
>
> Ccalloc: byteSize "<Integer> ^<Integer>"
> <primitive: 'primCalloc' error: Literal constant expected -
> >errorCode
> module: 'IA32ABI'>
> ^self primitiveFailed
>
> You are missing some pragma support. The relevant method in my
> image (unofficial) that accepts a variable name in that position is
> attached.
>
> HTH
>
> Eliot
>
>
> Similar error occur to many other methods. What should I do to
> correct it?
>
> Thanks.
>
> Ang Beepeng
> --
> View this message in context: http://www.nabble.com/Alien-FFI-tp22635925p22635925.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>
> <Parser-pragmaLiteral.st>
--
=
=
=
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
=
=
=
========================================================================
More information about the Squeak-dev
mailing list
|