Jsctypes/api: Difference between revisions

Jump to navigation Jump to search
Line 9: Line 9:
<code>Library</code> objects have the following methods:
<code>Library</code> objects have the following methods:


:'''<code>''lib''.declare(''name'', ''abi'', ''rtype'', ''<nowiki>[argtype1, ...]</nowiki>'')</code>''' - Declare a function. ''(TODO: all the details)'' This always returns a new function object or throws an exception.
:'''<code>''lib''.declare(''name'', ''abi'', ''rtype'', ''<nowiki>[argtype1, ...]</nowiki>'')</code>''' - Declare a function. ''(TODO: all the details)'' This always returns a new callable <code>CData</code> object representing a function pointer to ''name'', or throws an exception.


:If ''rtype'' is an array type, this throws a <code>TypeError</code>.
:If ''rtype'' is an array type, this throws a <code>TypeError</code>.
148

edits

Navigation menu