Embeding Python & Dynamic Callbacks

Stuart D. Gathman stuart at bmsi.com
Wed Sep 26 12:51:59 EDT 2001


In article <916a2aab.0109260249.318d156f at posting.google.com>, "Paul Tate"
<paulypoos at hotmail.com> wrote:

> I can dynamically create the method table, but I cannot dynamically
> create a C callback function.  If I use the same callback for each
> dynamically loaded function, I do not know how to find out which token
> caused the callback to be called.

idea 3 - allocate a callable extension type for each dynamic C function.
The extension object contains whatever the common callback function needs
to know to find the dynamic C function.  Put the callable types in the
module dictionary along with the direct methods - even for C code loaded
*after* initializing the module.

-- 
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - Mozart background
song for the Microsoft "Where do you want to go from here?" commercial.



More information about the Python-list mailing list