It turns out that some calls return AEDesc records that are "borrowed",

the AEDesc data shouldn't be disposed when the Python object is.

Added a C call AEDesc_NewBorrowed() to create these objects and a Python
method old=AEDesc.AutoDispose(onoff) to change auto-dispose state.
This commit is contained in:
Jack Jansen 2003-01-17 23:11:17 +00:00
parent aac8c58f0b
commit b2a57722a8
4 changed files with 71 additions and 3 deletions

View file

@ -106,6 +106,7 @@ PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */
/* AE exports */
extern PyObject *AEDesc_New(AppleEvent *); /* XXXX Why passed by address?? */
extern PyObject *AEDesc_NewBorrowed(AppleEvent *);
extern int AEDesc_Convert(PyObject *, AppleEvent *);
/* Cm exports */