Wrapping C code?
CJS
Prometheus85 at hotmail.com
Sat Mar 29 12:01:46 PDT 2014
I've been using a medium-sized C library. Most of the library
calls look something like
XXXXaction(context, arg1, arg2)
Where XXXX is the name of the library, action is the action to
take, and context is an opaque pointer defined by the library to
keep all the state related to these actions.
Is there a simple way to wrap this library so I could make calls
that look like
context.action(arg1, arg2)?
I'm hoping for something with less manual work than having to
wrap each individual function call. Especially since the types
involved in the library can be somewhat complex and require
trawling through multiple header files to find out the true
definition.
More information about the Digitalmars-d-learn
mailing list