[capi-sig] C functions that modify their arguments.

Wendell Nichols wcn00 at shaw.ca
Mon Feb 27 20:48:06 CET 2012


I have a library that I want to wrap for Python (as part of an exercise 
to learn Python, and provide some public good at the same time :)  The 
library is proprietary and I can't change it.  Many of its functions 
modify a pointer provided via an address arg.  Can python deal with 
functions that modify their arguments?  If so (generally) how?

If there is no formalised way I'm may have to consider registering some 
sort of callback to alter the argument from within C... kind of awkward 
but since I'm code generating all the C so long as I have a workable 
approach it doesn't matter how much code it takes :)

Thanks...
wcn



More information about the capi-sig mailing list