[C++-SIG] Anybody know all the rules for extension objects?

Paul F. Dubois dubois1 at llnl.gov
Fri Jan 23 17:11:19 CET 1998


There are some rules for type objects that I'm not sure are written down
anywhere. For example,

a. Every type must have a dealloc function.
b. If a type defines a number add and is also a sequence you must define
sequence concat.

Failure to obey these rules results in code crashes of the unpleasant sort.
In a C++ facility to make it easier to write correct extensions to Python, I
can fix a few of these problems. For example, in case (a) I can supply a
default dealloc and in case (b) set the concat to be the same as the add if
the concat is not supplied.

So, what are the rest of the rules for type objects?


_______________
C++-SIG - SIG for Development of a C++ Binding to Python

send messages to: c++-sig at python.org
administrivia to: c++-sig-request at python.org
_______________



More information about the Cplusplus-sig mailing list