TestInterpreterPlugin help
Joshua 'Schwa' Gargus
schwa at cc.gatech.edu
Sun Jan 6 19:59:33 UTC 2002
Hello,
I'm having trouble passing around a pointer between interpreted Squeak
code and compiled plugin code. I have a primitive method that returns
a pointer like this:
^ aPtr asOop: Unsigned
This seems to work fine; depending on the value, I get either a
SmallInteger or a LargePositiveInteger. The problem arises when I try
to pass this into another primitive method that looks like this:
primNeedPointer: aPtr
self
primitive: 'primNeedPointer'
parameters: #(Unsigned)
"more stuff..."
The generated C code causing the failure is:
interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Unsigned"));
Looking at the code for isKindOf(), it is clear why it fails: the
object (a SmallInteger or LargePositiveInteger) is not an instance
of Unsigned or one of its subclasses.
I followed the directions on:
http://minnow.cc.gatech.edu/squeak/850
as closely as possible. What am I doing wrong?
Thanks,
Joshua
More information about the Squeak-dev
mailing list
|