cpython/Modules
Jeremy Hylton a0fb177be8 Progress on SF bug #466175 and general cleanup.
Add a fast_container member to Picklerobject.  If fast is true, then
fast_container counts the depth of nested container calls.  If the
depth exceeds FAST_LIMIT (2000), the fast flag is ignored and the
normal checks occur.  This approach is much like the approach for
prevent stack overflow for comparison and reprs of recursive objects
(e.g. [[...]]).

    - Fast container used for save_list(), save_dict(), and
      save_inst().

      XXX Not clear which other save_xxx() functions should use it.

Make Picklerobject into new-style types, using PyObject_GenericGetAttr()
and PyObject_GenericSetAttr().

    - Use PyMemberDef for binary and fast members

    - Use PyGetSetDef for persistent_id, inst_persistent_id, memo, and
      PicklingError.

      XXX Not all of these seem like they need to use getset, but it's
      not clear why the old getattr() and setattr() had such odd
      semantics.  One change is that the getvalue() attribute will
      exist on all Picklers, not just list-based picklers; I think
      this is a more rationale interface.

There is a long laundry list of other changes:

    - Remove unused #defines for PyList_SET_ITEM() etc.

    - Make some of the indentation consistent

    - Replace uses of cPickle_PyMapping_HasKey() where the first
      argument is self->memo with calls to PyDict_GetItem(), because
      self->memo must be a dictionary.

    - Don't bother to check if cPickle_PyMapping_HasKey() returns < 0,
      because it can only return 0 or 1.

    - Replace uses of PyObject_CallObject() with PyObject_Call(), when
      we can guarantee that the argument tuple is really a tuple.

Performance impacts of these changes:

    - 5% speedup for normal pickling

    - No change to fast-mode pickling.

XXX Really need tests for all the features in cPickle that aren't in
pickle.
2001-10-12 04:11:06 +00:00
..
_codecsmodule.c Patch #435971: UTF-7 codec by Brian Quinlan. 2001-09-20 10:35:46 +00:00
_curses_panel.c init_curses_panel(): Be more consistent with indentation and blank lines. 2001-01-27 18:58:04 +00:00
_cursesmodule.c [Bug #457654] bkgd() used a hard-coded A_NORMAL attribute, when it should 2001-09-04 19:34:32 +00:00
_localemodule.c PyLocale_setlocale(): silence compiler warning about free() of a const 2001-09-20 19:18:30 +00:00
_sre.c fixed #449964: sre.sub raises an exception if the template contains a 2001-09-18 20:55:24 +00:00
_testcapimodule.c SF [#466125] PyLong_AsLongLong works for any integer. 2001-09-30 05:09:37 +00:00
_tkinter.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
_weakref.c Adjust the _weakref module to use the public API for the weak reference 2001-10-05 22:00:24 +00:00
.cvsignore Add Setup.config 2000-06-30 16:09:01 +00:00
addrinfo.h Fix portability problems with glibc 2.0, as reported in #449157. 2001-08-15 17:14:33 +00:00
almodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
ar_beos Moved BeOS/ar-fake and BeOS/linkmodule to Modules/ar_beos and 2001-02-16 03:24:50 +00:00
arraymodule.c Fix buffer_info() docstring to match reality. See SF bug #444842. 2001-07-27 16:05:32 +00:00
audioop.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
binascii.c Add various typecasts (back and forth from char * to unsigned char *) 2001-10-04 14:54:53 +00:00
bsddbmodule.c Don't raise MemoryError in keys() when the database is empty. 2001-03-22 00:19:22 +00:00
ccpython.cc Patch and new file by Geoff Furnish for C++ compilation. 1999-12-16 17:52:08 +00:00
cdmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cgen.py Change copyright notice. 2000-07-01 00:16:13 +00:00
cgensupport.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cgensupport.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
clmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cmathmodule.c Revert parts of patch #453627, documenting the resulting test failures 2001-09-06 08:16:17 +00:00
config.c.in gcmodule is now enabled here 2001-08-30 00:12:32 +00:00
cPickle.c Progress on SF bug #466175 and general cleanup. 2001-10-12 04:11:06 +00:00
cryptmodule.c Use METH_OLDARGS instead of numeric constant 0 in method def. tables 2000-08-03 02:34:44 +00:00
cStringIO.c StringIO patch #462596: let's [c]StringIO accept read buffers on 2001-09-24 17:34:52 +00:00
cstubs REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dbmmodule.c SF Patch #103185, by jlt63: Some more standard modules cleanup for Cygwin 2001-01-22 15:29:14 +00:00
dlmodule.c Patch #404680: disables the nis module and enables the dl module when 2001-02-27 20:54:23 +00:00
errnomodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
fcntlmodule.c fcntl.ioctl(): Update error message; necessity noted by Michael Hudson. 2001-05-14 21:02:36 +00:00
flmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
fmmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
fpectlmodule.c Define sunmath prototypes if sunmath.h was not included. 2001-03-07 10:22:20 +00:00
fpetestmodule.c Needed to add DL_EXPORT to (redundant?) extern decl of module init function. 1998-12-10 16:49:28 +00:00
gcmodule.c SF bug [#467145] Python 2.2a4 build problem on HPUX 11.0. 2001-10-11 18:31:31 +00:00
gdbmmodule.c SF patch 404928: Support for next Cygwin gcc (2.95.2-8) 2001-02-28 16:44:18 +00:00
getaddrinfo.c Fix compiler warnings. This closes some of the #458880 problem. 2001-09-07 16:10:00 +00:00
getbuildinfo.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
getnameinfo.c Fix portability problems with glibc 2.0, as reported in #449157. 2001-08-15 17:14:33 +00:00
getpath.c Be more rigorous about making pathnames absolute, to address SF bug 2001-09-28 20:00:29 +00:00
glmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
grpmodule.c Make sure we close the group and password databases when we are done with 2001-03-11 03:03:07 +00:00
imageop.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
imgfile.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
ld_so_aix Mod suggested by Donn Cave -- invoke makexp_aix relative to $0 1997-09-03 00:45:30 +00:00
ld_so_beos Remove a hard coded Python version, and a now incorrect relative path. Closes 2001-02-16 03:27:35 +00:00
license.terms Add an optional hack for threads in Tkinter. 1997-09-28 05:52:41 +00:00
linuxaudiodev.c Applying SF patch #412553 by Christopher Lee: fix linuxaudiodev 2001-04-02 17:59:02 +00:00
main.c PEP 238 documented -Qwarn as warning only for classic int or long 2001-09-04 03:51:09 +00:00
makesetup Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor 2001-06-02 06:16:02 +00:00
makexp_aix remove C++ entries of the form Class::method 1998-04-09 21:46:02 +00:00
mathmodule.c Revert parts of patch #453627, documenting the resulting test failures 2001-09-06 08:16:17 +00:00
md5.h Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
md5c.c Patch #463421: speed up md5 module with real memcpy/set. 2001-09-24 17:14:40 +00:00
md5module.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
mmapmodule.c Fix SF #441664: Python crash on del of a slice of a mmap 2001-07-16 15:47:36 +00:00
mpzmodule.c Python.h: Don't attempt to redefine NDEBUG if it's already defined. 2001-07-15 18:38:47 +00:00
newmodule.c Back out trying to use the C values for CO_xxx. 2001-08-24 06:29:12 +00:00
nismodule.c Move declaration of 'clnt_create()' NIS function to pyport.h, as it's 2001-01-21 23:34:12 +00:00
operator.c Add wrappers around the rich-comparison operations. 2001-08-09 20:14:34 +00:00
parsermodule.c Use the abstract object interfaces when digging around in module objects 2001-08-15 16:44:56 +00:00
pcre-int.h AMK's revised version of the previous patch. 1998-05-07 15:32:44 +00:00
pcre.h Jack Jansen: Mac Carbon: don't include sys/types if we don't have it 2000-06-28 20:56:30 +00:00
pcremodule.c Make more warnings go away on the SGI compiler. 2001-07-19 21:29:49 +00:00
posixmodule.c Add chroot call. Implements feature #459267. 2001-10-04 22:44:26 +00:00
puremodule.c Do the absolute minimal amount of modifications to eradicate 2000-09-01 09:01:32 +00:00
pwdmodule.c Make sure we close the group and password databases when we are done with 2001-03-11 03:03:07 +00:00
pyexpat.c Reactivate participation of expat parsers in GC. Fixes bug #462710. 2001-09-23 10:20:10 +00:00
pypcre.c Fix for bug #110651 (Jitterbug PR#343): only use the low 8 bits of an octal 2000-08-02 13:41:18 +00:00
python.c Even more ANSIfication: fix as many function pointers and declarations as 2000-07-22 23:57:55 +00:00
readline.c Patch #462122: add readline startup and pre_event hooks. 2001-09-30 21:09:59 +00:00
regexmodule.c initregex(): this function is declared void, so the recent change to 2001-07-09 18:15:38 +00:00
regexpr.c Python.h: Don't attempt to redefine NDEBUG if it's already defined. 2001-07-15 18:38:47 +00:00
regexpr.h Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either 2000-07-16 12:04:32 +00:00
resource.c [Patch #462255, from Jason Tishler] Re-enables building the resouce 2001-09-17 16:19:16 +00:00
rgbimgmodule.c Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)', 2000-07-21 06:00:07 +00:00
rotormodule.c Part of SF patch #102409 by jlt63 to support building these modules 2001-01-10 21:03:32 +00:00
selectmodule.c Stop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out it 2001-08-16 21:59:46 +00:00
Setup.config.in gcmodule is now always compiled 2001-08-30 00:13:38 +00:00
Setup.dist Merge changes from r22a2-branch back into trunk. Also, change patch 2001-08-22 19:24:42 +00:00
sgimodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
shamodule.c Cleanup logic a little. Check args first, then try to create the 2001-01-29 22:46:35 +00:00
signalmodule.c SF patch [#466877] SIGBREAK is missing from signal module. 2001-10-01 17:58:40 +00:00
socketmodule.c Use PySocket_Err() instead of PyErr_SetFromErrno(). 2001-10-11 17:27:58 +00:00
sre_constants.h added martin's BIGCHARSET patch to SRE 2.1.1. martin reports 2x 2001-07-02 16:58:38 +00:00
sre.h merged with pythonware's SRE 2.1.1 codebase 2001-07-02 16:42:49 +00:00
stropmodule.c Add warnings to the strop module, for to those functions that really 2001-05-15 02:14:44 +00:00
structmodule.c The 'p' (Pascal string) pack code acts unreasonably when the string size 2001-09-15 02:35:15 +00:00
sunaudiodev.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
svmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
symtablemodule.c Export three optimization (fast locals) flags 2001-04-16 18:42:13 +00:00
syslogmodule.c Do the absolute minimal amount of modifications to eradicate 2000-09-01 09:01:32 +00:00
tclNotify.c Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)', 2000-07-21 06:00:07 +00:00
termios.c Forward-port revision 2.24.2.4 from the release21-maint branch: 2001-06-15 12:05:44 +00:00
testcapi_long.h Fix error in comment, and in test_long_api and test_longlong_api remove 2001-06-16 08:10:13 +00:00
threadmodule.c Fix typo in docstring 2001-10-05 12:24:15 +00:00
timemodule.c SF patch #459385 (Norman Vine): time.timezone fix for Cygwin. 2001-09-25 13:59:01 +00:00
timing.h remove rcs history 1996-01-26 21:10:22 +00:00
timingmodule.c Do the absolute minimal amount of modifications to eradicate 2000-09-01 09:01:32 +00:00
tkappinit.c Removing warnings discovered by gcc -Wall 2000-08-04 15:53:06 +00:00
unicodedata_db.h compress unicode decomposition tables (this saves another 55k) 2001-01-21 22:41:08 +00:00
unicodedata.c Kill a warning on the SGI compiler. 2001-07-19 21:11:13 +00:00
unicodename_db.h compress unicode decomposition tables (this saves another 55k) 2001-01-21 22:41:08 +00:00
xreadlinesmodule.c Remove bogus PyGC_HEAD_SIZE. 2001-08-29 23:50:42 +00:00
xxmodule.c Add additional fields to Xxo_Type declaration. Fixes bug #469250. 2001-10-09 10:46:58 +00:00
xxsubtype.c Add optional docstrings to getset descriptors. Fortunately, there's 2001-09-20 21:45:26 +00:00
yuv.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
yuvconvert.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
zlibmodule.c Update URL. Fixes bug #468118. 2001-10-09 10:54:31 +00:00