summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Removed _xdr moduleBarry Warsaw1997-01-141-1/+0
|
* Eliminated gcc -Wall complaints:Barry Warsaw1997-01-141-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Quieted gcc -Wall by removing unused local variables. - Added some choice parentheses around assignments in conditional tests. - Removed an unused (and seemingly unreachable) err label in load_short_binstring(). - in Unpickler_load(), removed \. in string format. - init_stuff() was declared to return an int, but had these problems: - it was returning NULL instead of 0 or 1 in some cases - it was falling of the end of the routine without returning anything - the call of init_stuff() in initcPickle() was never checking the return value anyway. I changed all this by returning 1 in the case of errors, 0 when no error occurred. Then in initcPickle(), if init_stuff() returns non-zero, I call Py_FatalError(). Suppressing my urge to reformat according to Python coding standards! :-)
* Quieted gcc -Wall by removing unused local variables.Barry Warsaw1997-01-141-5/+9
| | | | | Suppressing my urge to reformat according to Python coding standards! :-)
* Quieted gcc -Wall by removing unused local variables.Barry Warsaw1997-01-141-2/+0
|
* Formatting.Barry Warsaw1997-01-141-18/+17
|
* Obsolete, now that xdrlib.py uses the new-and-improved struct module.Barry Warsaw1997-01-141-187/+0
|
* Renamed.Barry Warsaw1997-01-131-49/+45
|
* Formatting, and minor error detectionBarry Warsaw1997-01-131-49/+52
|
* initthread(): Removed extraneous Py_INCREF(ThreadError)Barry Warsaw1997-01-131-1/+0
|
* Fix leak involving BuildValue("...O...").Guido van Rossum1997-01-121-3/+7
|
* Add entries for cStringIO and cPickleGuido van Rossum1997-01-111-0/+3
|
* On Windows, -u implies binary mode for stdin/stdoutGuido van Rossum1997-01-111-0/+4
| | | | (as well as unbuffered stdout/stderr).
* The usual return-value and memory management checks. I'm not planningBarry Warsaw1997-01-101-10/+16
| | | | | a test for this module though (it does compile at least on Solaris 2.5)
* Formatting changes, plus memory management in initsyslog()Barry Warsaw1997-01-091-90/+102
|
* initsignal(): Py_DECREFs really should be Py_XDECREFs in case theBarry Warsaw1997-01-091-34/+34
| | | | PyInt_FromLong's failed.
* Plugged a couple of potential return value problems, memory leaks, andBarry Warsaw1997-01-091-8/+13
| | | | descriptor leaks.
* Primarily formatting changes, but I also plugged a couple of potentialBarry Warsaw1997-01-091-302/+308
| | | | return value problems, memory leaks, and descriptor leaks.
* Nailed a couple of memory leaks, caught by Purify.Barry Warsaw1997-01-094-8/+25
|
* cPickle, version 0.1.Guido van Rossum1997-01-061-0/+3767
|
* Jim's latest version.Guido van Rossum1997-01-061-90/+129
|
* New strop_joinfields implementation, highly optimized for Lists. AllBarry Warsaw1997-01-061-60/+82
| | | | | | other sequences use the Sequence protocol from the abstract API. The algorithm has changed so that only one pass through the sequences are made.
* Rewrote translate() as follows:Guido van Rossum1997-01-061-28/+52
| | | | | | | | | | | | - 'delete' is a C++ keyword; use 'del_table' instead - apply Py_CHARMASK() to del_table[i] before using it as an index *** this fixes a bug that was just reported on the list *** - if the translation didn't make any changes, INCREF and return the original string - when del_table is empty or omitted, don't copy the translation table to a table of ints (should be a bit faster) Rewrote maketrans() to avoid copying the table (2-3% faster).
* strop_upper(), strop_lower(): shared code version caused to much of aBarry Warsaw1997-01-031-27/+65
| | | | | | | performance hit. Urg. Reverted. strop_joinfields(): re-instate optimizations for lists and tuples, but support arbitrary other kinds of sequences as well.
* Renamed but not well tested.Roger E. Masse1997-01-031-273/+278
|
* Several changes:Barry Warsaw1997-01-031-142/+106
| | | | | | | | | | | | | | | | | | | | | | | - split_whitespace(): slightly better memory ref handling when errors occur. - strop_joinfields(): First argument can now be any sequence-protocol conformant object. - strop_find(), strop_rfind(): Use PyArg_ParseTuple for optional arguments - strop_lower(), strop_upper(): Factor logic into a common function do_casechange(). - strop_atoi(), strop_atol(): Use PyArg_ParseTuple. - strop_maketrans(): arguments used to be optional, although the documentation doesn't reflect this. Make the source conform to the docs. Arguments are required, but two empty strings will return the identity translation table. - General pass fixing up formatting, and checking for return values.
* Renamed, but not throughly tested.Roger E. Masse1997-01-031-226/+235
|
* Renamed, but untested.Roger E. Masse1997-01-031-765/+780
|
* Added PyLong*UnsignedLong and PyCobject interfaces.Guido van Rossum1997-01-031-0/+4
|
* Renamed, reindented. (was already partially complete)Roger E. Masse1997-01-031-933/+939
|
* Add new formats B, H, I, L for unsigned data types (analogous to theGuido van Rossum1997-01-031-1/+85
| | | | recent changes in the struct module).
* Changed the ``add/sub_offset'' hacks for dealing with C's unsignedGuido van Rossum1997-01-031-112/+14
| | | | | | | int/long types, and use the new PyLong_FromUnsignedLong() and PyLong_AsUnsignedLong() interfaces instead. Semantic change: the 'I' format will now always return a long int.
* Reindented.Roger E. Masse1997-01-031-516/+546
|
* Check of return values and proper error handling.Barry Warsaw1997-01-031-30/+60
|
* Fill pad bytes with zeros (fixing a bug dating from the very first version!).Guido van Rossum1997-01-031-2/+5
|
* Scratch the ears of gcc -Wall.Barry Warsaw1997-01-031-1/+1
|
* Several changes:Barry Warsaw1997-01-031-105/+157
| | | | | | | | | | | | | | - Conform to standard Python C coding styles. - All static symbols were renamed and shorted. - Eyeballed all return values and memory references. - Fixed a bug in signal.pause() so that exceptions raised in signal handlers are now properly caught after pause() returns. - Removed SIGCPU and SIGFSZ. We surmise that these were typos for the previously missing SIGXCPU and SIGXFSZ.
* Ok, ok, I've fixed gradual underflow on packing too.Guido van Rossum1997-01-021-45/+47
| | | | | | Still don't know what to do with Inf/NaN, so I raise an exception on pack(), and something random decided by ldexp() will happen on unpack().
* Oops -- unpack float/double didn't do the right thing if e==0.Guido van Rossum1997-01-021-4/+14
|
* Support float and double in non-native formats.Guido van Rossum1997-01-021-2/+365
| | | | | These use the ANSI/IEEE standard, which is also used by XDR; so the _xdr module may become obsolete.
* rotorobj_setkey(): A single string argument is now required (i.e. noBarry Warsaw1997-01-021-5/+3
| | | | long optional with nearly-no-op missing).
* Added better handling of unsigned longs -- a Python long returned byGuido van Rossum1996-12-311-27/+163
| | | | unpack('L', ...) is now acceptable to pack('L', ...).
* Fix the first bugs... treatment of 0 count was wrong, and memchr()Guido van Rossum1996-12-311-6/+6
| | | | should be memset().
* Pretty much rewritten to fulfull several long-standing wishes:Guido van Rossum1996-12-311-226/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- The whole implementation is now more table-driven. -- Unsigned integers. Format characters 'B', 'H', 'I' and 'L' mean unsigned byte, short, int and long. For 'I' and 'L', the return value is a Python long integer if a Python plain integer can't represent the required range (note: this is dependent on the size of the relevant C types only, not of the sign of the actual value). -- A new format character 's' packs/unpacks a string. When given a count prefix, this is the size of the string, not a repeat count like for the other format characters; e.g. '10s' means a single 10-byte string, while '10c' means 10 characters. For packing, the string is truncated or padded with null bytes as appropriate to make it fit. For unpacking, the resulting string always has exactly the specified number of bytes. As a special case, '0s' means a single, empty string (while '0c' means 0 characters). -- Various byte order options. The first character of the format string determines the byte order, size and alignment, as follows: First character Byte order size and alignment '@' native native '=' native standard '<' little-endian standard '>' big-endian standard '!' network (= big-endian) standard If the first character is not one of these, '@' is assumed. Native byte order is big-endian or little-endian, depending on the host system (e.g. Motorola and Sun are big-endian; Intel and DEC are little-endian). Native size and alignment are determined using the C compiler's sizeof expression. This is always combined with native byte order. Standard size and alignment are as follows: no alignment is required for any type (so you have to use pad bytes); short is 2 bytes; int and long are 4 bytes. In this mode, there is no support for float and double. Note the difference between '@' and '=': both use native byte order, but the size and alignment of the latter is standardized. The form '!' is available for those poor souls who can't remember whether network byte order is big-endian or little-endian. There is no way to indicate non-native byte order (i.e. force byte-swapping); use the appropriate choice of '<' or '>'.
* Renamed.Roger E. Masse1996-12-241-0/+8530
| | | | | However: "cgensupport.h" is still present... otherwise I get maaaany type errors... not sure if this needs more attention.
* Reworked to check for memory problems (one potential found),Barry Warsaw1996-12-231-204/+245
| | | | | | | | | | non-checked error return values, and where appropriate, PyArg_ParseTuple() style argument parsing. I also changed some function names and converted all malloc/free calls to PyMem_NEW/PyMem_DEL. Some stylistic changes and formatting standardization.
* Renamed.Roger E. Masse1996-12-201-380/+406
|
* Several changes. Test program to follow.Barry Warsaw1996-12-201-162/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Where optional arguments were being used, converted to PyArg_ParseTuple() style instead of nested PyArg_Parse() style. - Check for and handle many potential error conditions that were never being tested. - internal reg_* functions renamed to regobj_* (makes it easier to figure out which are global regex functions and which are for regex objects). - reg_group (now regobj_group) was quite extensively reworked. it no longer recurses to do its job (by factoring core functionality into a separate function that knows about string and integer indexes). - some minor formatting fixes. - regex_set_syntax() now invalidates the cache. Without this change (in the example below), the second search would produce different output depending on whether the first search were performed or not (since performing the first search would cache the compiled object with RE_SYNTAX_EMACS, causing the second test to unexpectedly fail). regex.search('(a+)|(b+)', 'cdb') prev = regex.set_syntax(RE_SYNTAX_AWK) regex.search('(a+)|(b+)', 'cdb')
* Renamed.Roger E. Masse1996-12-201-615/+625
|
* 1. Export open(2) flag constants for every defined constantBarry Warsaw1996-12-191-16/+88
| | | | 2. Reworked error checking in initposix() and initnt().
* Minor formatting changes.Barry Warsaw1996-12-191-10/+11
|