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

@ -534,6 +534,7 @@ GLUE_NEW(FSRef *, PyMac_BuildFSRef, "macfs")
GLUE_CONVERT(FSRef, PyMac_GetFSRef, "macfs")
GLUE_NEW(AppleEvent *, AEDesc_New, "Carbon.AE") /* XXXX Why by address? */
GLUE_NEW(AppleEvent *, AEDesc_NewBorrowed, "Carbon.AE")
GLUE_CONVERT(AppleEvent, AEDesc_Convert, "Carbon.AE")
GLUE_NEW(Component, CmpObj_New, "Carbon.Cm")