[Pyrex] How to reuse pyrex functions?
Daniele Varrazzo
daniele.varrazzo at gmail.com
Fri Jul 28 17:07:38 UTC 2006
> > i am trying to declare Pyrex function in a module called "asn1" and use
> > it in a module called "mdc". I can't put a function declaration in a
> > .pyd file, so i must use a "cdef public". Anyway i can't make it work
> > smoothly.
>
> I guess what you are looking for is my Pyrex patch for external C APIs. It
> allows different Python C extensions to directly call C functions of each
> other without requiring any compile-time linking.
It looks what i was looking for, but i didn't managed to use it. Maybe
i'm just misunderstood its usage at all...
i tried adding the function declarations i wanted to export in a .pyd
file, such
cdef object OCTET_STRING_GetString(OCTET_STRING_t *s)
but i still get errors:
Only 'extern' C function or variable declaration allowed in .pxd file
isn't the patch intended to overtake this limitation?
I tried to patch v. 0.9.4.1; i will try the patched version in svn soon.
Anyway i read the thred i think you refer to and it almost convinced
me to avoid dynamic linking and create a single library.
Thank you very much,
Daniele
More information about the Pyrex
mailing list