accessing method name from within a c-function
Neil Hodgson
nhodgson at bigpond.net.au
Thu Jan 17 18:11:36 EST 2002
More information about the Python-list mailing list
Thu Jan 17 18:11:36 EST 2002
- Previous message (by thread): Python 2.2, creating new types from base types
- Next message (by thread): accessing method name from within a c-function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jan: > Thanks for your answer, Neil. But I'm afraid calldll not really > addresses this problem. > The problem is, that when I use the generic method of registering a > single function for argument conversion and dispatching as described > in the earlier posting, all calls from python to C must pass through > this function. So the complete scaffolding for this is in C? The aspect of calldll I was meaning is the collection of callable wrappers buit up by the windll module. This is in the full dynwin download, not in the calldll download. Each callable_function object knows its name and address. For your situation, I would expose the single C entry point and construct callable wrappers in Python for each name. Then the name becomes an additional argument to the call. This is much easier than trying to scrabble up the Python stack (through one of those popular exception hacks) for a stack frame holding the name being called. It will also be less costly. Neil
- Previous message (by thread): Python 2.2, creating new types from base types
- Next message (by thread): accessing method name from within a c-function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list