[Python-checkins] CVS: python/dist/src/Python mysnprintf.c,2.4,2.4.4.1

Barry Warsaw bwarsaw@users.sourceforge.net
2001年12月21日 08:30:38 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv16683
Modified Files:
 Tag: release22-branch
	mysnprintf.c 
Log Message:
PyOS_vsnprintf(): Change PyMem_Malloc() call to PyMem_MALLOC() macro,
(ditto for PyMem_Free() -> PyMem_FREE()) to fix and close SF bug
#495875 on systems that HAVE_SNPRINTF=0.
Check in on both release-22 branch and trunk.
Index: mysnprintf.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/mysnprintf.c,v
retrieving revision 2.4
retrieving revision 2.4.4.1
diff -C2 -d -r2.4 -r2.4.4.1
*** mysnprintf.c	2001年12月03日 00:43:33	2.4
--- mysnprintf.c	2001年12月21日 16:30:35	2.4.4.1
***************
*** 66,70 ****
 #else
 	/* Emulate it. */
! 	buffer = PyMem_Malloc(size + 512);
 	if (buffer == NULL) {
 		len = -666;
--- 66,70 ----
 #else
 	/* Emulate it. */
! 	buffer = PyMem_MALLOC(size + 512);
 	if (buffer == NULL) {
 		len = -666;
***************
*** 86,90 ****
 		str[to_copy] = '0円';
 	}
! 	PyMem_Free(buffer);
 Done:
 #endif
--- 86,90 ----
 		str[to_copy] = '0円';
 	}
! 	PyMem_FREE(buffer);
 Done:
 #endif

AltStyle によって変換されたページ (->オリジナル) /