[Python-checkins] python/dist/src/Python pythonrun.c,2.170,2.171 import.c,2.212,2.213

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Fri, 13 Dec 2002 07:23:29 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv6503

Modified Files:
	pythonrun.c import.c 
Log Message:
Added missing casts.

Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.170
retrieving revision 2.171
diff -C2 -d -r2.170 -r2.171
*** pythonrun.c	11 Dec 2002 14:04:59 -0000	2.170
--- pythonrun.c	13 Dec 2002 15:23:00 -0000	2.171
***************
*** 619,624 ****
  #ifdef macintosh
  	/* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
! 	if (PyMac_getfiletype(filename) == 'PYC '
! 	    || PyMac_getfiletype(filename) == 'APPL')
  		return 1;
  #endif /* macintosh */
--- 619,624 ----
  #ifdef macintosh
  	/* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
! 	if (PyMac_getfiletype((char *)filename) == 'PYC '
! 	    || PyMac_getfiletype((char *)filename) == 'APPL')
  		return 1;
  #endif /* macintosh */

Index: import.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.212
retrieving revision 2.213
diff -C2 -d -r2.212 -r2.213
*** import.c	6 Dec 2002 12:48:53 -0000	2.212
--- import.c	13 Dec 2002 15:23:10 -0000	2.213
***************
*** 2340,2344 ****
  		frozenmodules[i].name = PyString_AsString(name);
  		if (PyObject_IsTrue(code)) {
! 			frozenmodules[i].code = PyString_AsString(code);
  			frozenmodules[i].size = PyString_Size(code);
  		} else {
--- 2340,2344 ----
  		frozenmodules[i].name = PyString_AsString(name);
  		if (PyObject_IsTrue(code)) {
! 			frozenmodules[i].code = (unsigned char *)PyString_AsString(code);
  			frozenmodules[i].size = PyString_Size(code);
  		} else {
***************
*** 2408,2412 ****
  		PyTuple_SET_ITEM(item, 0, ob);
  		if (p->code != NULL) {
! 			ob = PyString_FromStringAndSize(p->code,
  				p->size >= 0 ? p->size : -(p->size));
  			if (ob == NULL)
--- 2408,2412 ----
  		PyTuple_SET_ITEM(item, 0, ob);
  		if (p->code != NULL) {
! 			ob = PyString_FromStringAndSize((char *)p->code,
  				p->size >= 0 ? p->size : -(p->size));
  			if (ob == NULL)