Thanks. Point is that all such approaches would require lots(!) of calls to the Python API - a way by which I won't gain the desired speed.
I've tried pyrex and the corresponding C-file is so convoluted with dummy variables, incrementing & decrementing references, and other stuff, that I want to try to write a C-function myself. My goal is not to avoid PyObjects* and the corresponding reference handling - apart from the head and end of the function. (I could use ctypes instead, but that again would obfuscate the API of my package a bit.) Christian -- http://mail.python.org/mailman/listinfo/python-list