Extension objects in Python 1.5 and 2.2

Martin Sjögren martin at strakt.com
Thu Jun 13 03:18:13 EDT 2002


How do I write extension objects so that they work in both Python 1.5 and
the 2.x series? Until now, I've used PyObject_New and PyObject_Del for
2.x, are there an equivalent set for 1.5 and if so, can they be used in
2.x too, or do I have to #ifdef?

What's the correct way to do this? And gee, it would be nice if the
objects were classes in 2.2 too, but I suppose that'd be a LOT of #ifdefs.


Regards,
Martin

-- 
Martin Sjögren
  martin at strakt.com              ICQ : 41245059
  Phone: +46 (0)31 7710870       Cell: +46 (0)739 169191
  GPG key: http://www.strakt.com/~martin/gpg.html





More information about the Python-list mailing list