[Python-Dev] Extending types in C (original) (raw)

[Python-Dev] Extending types in C - help needed

Martin v. Loewis martin@v.loewis.de
Sat, 19 Jan 2002 01:28:23 +0100


Martin, hats off!

This does exactly what I want, and it does so in a pretty generalized way. Actually in such a generalized way that I think this should be documented loud and clear.

Thanks!

Looking at it a bit more, how about storing each function pointer in a separate PyCObject, and adding general APIs somewhere in the core void PyTypeSetAnnotation(PyTypeObject *tp, char *name, char *descr, void *); void *PyTypeGetAnnotation(PyTypeObject *tp, char *name, char *descr);

I'll happily add that to some recipe collection. However, before generalizing it, I'd like to see more use cases. There should, atleast, be a second application beyond calldll (or, perhaps even beyond MacPython). Generalizing from a single use case is not good.

Regards, Martin