mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
- Minimum stacksize is now 8K for PPC, 4K for 68K
- Added PyMac_BuildNumVersion
This commit is contained in:
parent
64d376a670
commit
d1f06313f6
1 changed files with 20 additions and 7 deletions
|
@ -64,6 +64,18 @@ typedef FileFilterYDProcPtr FileFilterYDUPP;
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
** When less than this amount of stackspace is left we
|
||||||
|
** raise a MemoryError.
|
||||||
|
*/
|
||||||
|
#ifndef MINIMUM_STACK_SIZE
|
||||||
|
#ifdef __powerc
|
||||||
|
#define MINIMUM_STACK_SIZE 8192
|
||||||
|
#else
|
||||||
|
#define MINIMUM_STACK_SIZE 4096
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** We have to be careful, since we can't handle
|
** We have to be careful, since we can't handle
|
||||||
** things like updates (and they'll keep coming back if we don't
|
** things like updates (and they'll keep coming back if we don't
|
||||||
|
@ -140,12 +152,6 @@ PyMac_FixGUSIcd()
|
||||||
pb.ioWDDirID= curdirfss.parID;
|
pb.ioWDDirID= curdirfss.parID;
|
||||||
if (PBHSetVol(&pb, 0) != noErr)
|
if (PBHSetVol(&pb, 0) != noErr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Set standard-file working directory */
|
|
||||||
LMSetSFSaveDisk(-curdirfss.vRefNum);
|
|
||||||
LMSetCurDirStore(curdirfss.parID);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -233,7 +239,7 @@ PyOS_CheckStack()
|
||||||
long left;
|
long left;
|
||||||
|
|
||||||
left = StackSpace();
|
left = StackSpace();
|
||||||
if ( left < 4000 )
|
if ( left < MINIMUM_STACK_SIZE )
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -650,6 +656,13 @@ PyMac_BuildOSType(OSType t)
|
||||||
return PyString_FromStringAndSize((char *)&t, 4);
|
return PyString_FromStringAndSize((char *)&t, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Convert an NumVersion value to a 4-element tuple */
|
||||||
|
PyObject *
|
||||||
|
PyMac_BuildNumVersion(NumVersion t)
|
||||||
|
{
|
||||||
|
return Py_BuildValue("(hhhh)", t.majorRev, t.minorAndBugRev, t.stage, t.nonRelRev);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Convert a Python string object to a Str255 */
|
/* Convert a Python string object to a Str255 */
|
||||||
int
|
int
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue