[MacRuby-devel] CVImageBufferRef vs __NSCFType

Steven Parkes smparkes at smparkes.net
Wed Aug 25 18:20:48 PDT 2010


> Hope this helps :-)

Yup. I'm getting the hang of bridgesupport (coming from an MRI FFI world ...)

Any obvious reason why this doesn't seem to work?

<?xml version='1.0'?>
<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd ">
<signatures version='0.9'>
<struct name='ProcessSerialNumber' type='{ProcessSerialNumber="highLongOfPSN"I"lowLongOfPSN"I}' />
<function name='GetCurrentProcess'>
  <reval type='s' />
  <arg type='^{ProcessSerialNumber=II}' type_modifier='o' />
</function>
</signatures>

load_bridge_support_file(...)
psn = ProcessSerialNumber.new
GetCurrentProcess(psn)
p psn

I don't see the member values getting set the way I expect: they come back as zero, which isn't right. I can see it making the call in gdb and 'o' seems right by the other examples, but?

I know (think?) I can get this information from NSWorkspace ... this was more to test my understanding and prove I could the values back I expect ... but I don't seem to be able to ...


More information about the MacRuby-devel mailing list