|
From: Max L. <ma...@us...> - 2005-08-20 11:11:57
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13134 Modified Files: langsystypes.c Log Message: Fix in objtostring to fix the crash on X when coercing an objectSpecifier to a string Index: langsystypes.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langsystypes.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** langsystypes.c 20 Aug 2005 10:09:46 -0000 1.5 --- langsystypes.c 20 Aug 2005 11:11:48 -0000 1.6 *************** *** 1992,1995 **** --- 1992,1996 ---- bigstring bsitem; boolean fl; + AEDesc tempDesc, *tempDescPtr; // MJL 17/08/05: Temp desc and ptr so we can compile for both 9 & X setemptystring (bsobj); *************** *** 2033,2037 **** goto exit; ! if (!setdescriptorvalue (keydata, &vkey)) /*if successful, keydata is on temp stack*/ goto exit; --- 2034,2046 ---- goto exit; ! #if TARGET_API_MAC_CARBON == 1 ! // MJL 17/08/05: On X we cannot keep a lazy handle in the AEDesc to the keydata datahandle that gets ! // pushed onto the Frontier temp stack in the vkey. As we need it later we must duplicate the AEDesc before pushing it. ! tempDescPtr = &tempDesc; ! AEDuplicateDesc (&keydata, tempDescPtr); ! #else ! tempDescPtr = &keydata; ! #endif ! if (!setdescriptorvalue (*tempDescPtr, &vkey)) /*if successful, keydata is on temp stack*/ goto exit; *************** *** 2111,2114 **** --- 2120,2126 ---- disposevaluerecord (vkey, false); + #if TARGET_API_MAC_CARBON == 1 + AEDisposeDesc (&keydata); // MJL 17/08/05 dispose of our duplicated temp AEDesc. On 9 the dataHandle belongs also to the vkey which is disposed above so we don't need to explicitly dispose the AEDesc + #endif if (fldisposeobj) AEDisposeDesc (objdesc); |