[MacRuby-devel] Exposing c structs and functions
Laurent Sansonetti
lsansonetti at apple.com
Fri Dec 19 14:36:06 PST 2008
Hi Jim,
You're probably looking at an old BridgeSupport file. function_retval
and function_arg do not exist anymore since a very long time, and were
replaced by retval and arg.
You should be able to get the latest Foundation bridgesupport file
from here:
/System/Library/Frameworks/Foundation.framework/Resources/
BridgeSupport/Foundation.bridgesupport
Back to your new problem, I think your struct element is also wrong
(uses the old definition). I would look at the Foundation file and try
to mimic it. Also, you can generate the file by using
gen_bridge_metadata (from the command line) if your code is a
framework or a shared library. Finally, if you opt by writing the file
by yourself, it is always good to run an XML validation pass (the DTD
location is part of your XML declaration).
Laurent
On Dec 19, 2008, at 1:18 PM, Jim Getzen wrote:
> Hi Laurent,
>
> First, why does the Foundation.xml use the elements
> "function_retval" and "function_arg" instead of just "retval" and
> "arg"?
>
> Second, I used the xml you suggested, but I now get this error:
> `ZPointMake': unrecognized octype `{_ZPoint="x"f"y"f}' (RuntimeError)
>
> I have read the man pages (I had to learn what a "man page" was
> first!), but I didn't see anything that would solve that error.
>
> Thanks for your help,
>
> Jim
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
More information about the MacRuby-devel
mailing list