[Python-checkins] CVS: python/dist/src/Modules zlibmodule.c,2.28,2.29
Fred L. Drake
fdrake@weyr.cnri.reston.va.us
Wed, 22 Dec 1999 11:13:57 -0500 (EST)
- Previous message: [Python-checkins] CVS: python/dist/src/Python dynload_aix.c,2.2,2.3 dynload_beos.c,2.1,2.2 dynload_dl.c,2.1,2.2 dynload_hpux.c,2.1,2.2 dynload_mac.c,2.1,2.2 dynload_next.c,2.1,2.2 dynload_os2.c,2.1,2.2 dynload_shlib.c,2.1,2.2 dynload_win.c,2.1,2.2 import.c,2.127,2.128 importdl.c,2.63,2.64
- Next message: [Python-checkins] CVS: python/dist/src/Doc/lib libzlib.tex
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /projects/cvsroot/python/dist/src/Modules
In directory weyr:/home/fdrake/projects/python/Modules
Modified Files:
zlibmodule.c
Log Message:
For ZlibError and ZLIB_VERSION, only attempt to add entry to the
module dict if the inserted object isn't NULL (basic defensive
programming!).
Index: zlibmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/zlibmodule.c,v
retrieving revision 2.28
retrieving revision 2.29
diff -C2 -r2.28 -r2.29
*** zlibmodule.c 1999/12/20 22:13:38 2.28
--- zlibmodule.c 1999/12/22 16:13:54 2.29
***************
*** 871,875 ****
d = PyModule_GetDict(m);
ZlibError = PyErr_NewException("zlib.error", NULL, NULL);
! PyDict_SetItemString(d, "error", ZlibError);
insint(d, "MAX_WBITS", MAX_WBITS);
--- 871,876 ----
d = PyModule_GetDict(m);
ZlibError = PyErr_NewException("zlib.error", NULL, NULL);
! if (ZlibError != NULL)
! PyDict_SetItemString(d, "error", ZlibError);
insint(d, "MAX_WBITS", MAX_WBITS);
***************
*** 889,893 ****
ver = PyString_FromString(ZLIB_VERSION);
! PyDict_SetItemString(d, "ZLIB_VERSION", ver);
! Py_DECREF(ver);
}
--- 890,896 ----
ver = PyString_FromString(ZLIB_VERSION);
! if (ver != NULL) {
! PyDict_SetItemString(d, "ZLIB_VERSION", ver);
! Py_DECREF(ver);
! }
}
- Previous message: [Python-checkins] CVS: python/dist/src/Python dynload_aix.c,2.2,2.3 dynload_beos.c,2.1,2.2 dynload_dl.c,2.1,2.2 dynload_hpux.c,2.1,2.2 dynload_mac.c,2.1,2.2 dynload_next.c,2.1,2.2 dynload_os2.c,2.1,2.2 dynload_shlib.c,2.1,2.2 dynload_win.c,2.1,2.2 import.c,2.127,2.128 importdl.c,2.63,2.64
- Next message: [Python-checkins] CVS: python/dist/src/Doc/lib libzlib.tex
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]