mabuchilab / NiceLib

A Python package for rapidly developing "nice" bindings for C libraries, using cffi
GNU General Public License v3.0
24 stars 8 forks source link

Add support for "static methods" for NiceObjects #5

Closed natezb closed 5 years ago

natezb commented 7 years ago

If a library is written using C++, but provides C-level bindings, it may expose functions which are the equivalent of static methods. It would be nice to add some kind of flag to allow adding these static methods within a NiceObjectDef. Currently, the functions can only be wrapped at the top library-level.

Tillsten commented 5 years ago

Even in some not so well written C-libs some functions are not taking the handle as the first argument. Sometimes some functions are better fitting to niceobj despite not taking a handle.

natezb commented 5 years ago

This is implemented as-of 38e150d