[Python-checkins] CVS: python/dist/src/Python dynload_mac.c,2.8,2.9
Jack Jansen
python-dev@python.org
Tue, 12 Dec 2000 14:37:00 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14484
Modified Files:
dynload_mac.c
Log Message:
Use c2pstr() in stead of Pstring() to convert C-strings to
Pascal-strings. Safer, because Pstring converts in-place and the
pathname may be reused later for error messages.
Index: dynload_mac.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/dynload_mac.c,v
retrieving revision 2.8
retrieving revision 2.9
diff -C2 -r2.8 -r2.9
*** dynload_mac.c 2000/09/01 23:29:28 2.8
--- dynload_mac.c 2000/12/12 22:36:57 2.9
***************
*** 11,14 ****
--- 11,15 ----
#endif
#include <Files.h>
+ #include <TextUtils.h>
#include "macdefs.h"
#include "macglue.h"
***************
*** 57,66 ****
err = Path2FSSpec(pathname, &libspec);
#else
! (void)FSMakeFSSpec(0, 0, Pstring(pathname), &libspec);
err = ResolveAliasFile(&libspec, 1, &isfolder, &didsomething);
#endif
if ( err ) {
! sprintf(buf, "%.255s: %.200s",
! pathname, PyMac_StrError(err));
PyErr_SetString(PyExc_ImportError, buf);
return NULL;
--- 58,67 ----
err = Path2FSSpec(pathname, &libspec);
#else
! c2pstrcpy((unsigned char *)buf, pathname);
! (void)FSMakeFSSpec(0, 0, (unsigned char *)buf, &libspec);
err = ResolveAliasFile(&libspec, 1, &isfolder, &didsomething);
#endif
if ( err ) {
! sprintf(buf, "%.200s: %.200s", pathname, PyMac_StrError(err));
PyErr_SetString(PyExc_ImportError, buf);
return NULL;