[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.87,2.88

Tim Peters tim_one@users.sourceforge.net
2001年10月03日 22:43:04 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv4540/python/Objects
Modified Files:
	typeobject.c 
Log Message:
type_new(): cast PyObject_MALLOC's result to char*, for clarity.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.87
retrieving revision 2.88
diff -C2 -d -r2.87 -r2.88
*** typeobject.c	2001年10月04日 05:27:00	2.87
--- typeobject.c	2001年10月04日 05:43:02	2.88
***************
*** 910,914 ****
 		if (doc != NULL && PyString_Check(doc)) {
 			const size_t n = (size_t)PyString_GET_SIZE(doc);
! 			type->tp_doc = PyObject_MALLOC(n+1);
 			if (type->tp_doc == NULL) {
 				Py_DECREF(type);
--- 910,914 ----
 		if (doc != NULL && PyString_Check(doc)) {
 			const size_t n = (size_t)PyString_GET_SIZE(doc);
! 			type->tp_doc = (char *)PyObject_MALLOC(n+1);
 			if (type->tp_doc == NULL) {
 				Py_DECREF(type);

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