> > > You cannot do this currently, because there is no way to get from the type > > > object (which is the only thing you have available in Python) to the functions > > > you need to pass to O&. > > > > In Python 2.2, the type object can itself be an instance, and you could call > > classmethods on it... > > I'm doing something similar on windows. > > Could you explain how you do this? If I have the typeobject, how would I get > to the address of the "int (*converter)(PyObject *, void *)" function? Jack, it seems I misunderstood you (slightly?). I was talking about the other direction (constructing Python objects from C pointers or handles). I had to invent a special convention: I use O& with a function which calls obj->as_parameter() to convert from Python to C, but of course this gives you no typechecks as your O@ proposal does. I've reread your original O@ proposal, and I like it very much. Aren't there really any other positive responses? Thomas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4