summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* experimental UCS-4 support: added USE_UCS4_STORAGE define toFredrik Lundh2001-06-261-0/+4
| | | | | | unicodeobject.h, which forces sizeof(Py_UNICODE) == sizeof(Py_UCS4). (this may be good enough for platforms that doesn't have a 16-bit type. the UTF-16 codecs don't work, though)
* experimental UCS-4 support: don't assume that MS_WIN32 impliesFredrik Lundh2001-06-261-3/+3
| | | | HAVE_USABLE_WCHAR_T
* Remove const-ness in inet_pton declaration.Martin v. Löwis2001-06-251-1/+1
|
* Replace snprintf with sprintf.Martin v. Löwis2001-06-251-1/+1
|
* Fix typos in inet_pton/inet_ntop.Martin v. Löwis2001-06-241-2/+3
|
* Provide a definition for offsetof.Martin v. Löwis2001-06-241-0/+8
|
* Emulate inet_{pton,ntop} on systems that don't provide it.Martin v. Löwis2001-06-241-0/+41
|
* Pure brute-force hackery to allow Python to build on Windows again,Tim Peters2001-06-241-0/+12
| | | | | because I need to make progress and don't have time now to think about whatever it is the new code is trying to accomplish.
* Properly use &&. Closes bug #434988.Martin v. Löwis2001-06-231-2/+2
|
* Properly use &&. Closes bug #434989.Martin v. Löwis2001-06-231-1/+1
|
* Patch #401196: Configuration machinery for IPv6.Martin v. Löwis2001-06-234-0/+983
| | | | | Contributed by Jun-ichiro "itojun" Hagino. get{addr,name}info emulation code taken from WIDE.
* [Bug #433047, reported by Armin Rigo] Remove extra 'i' character inAndrew M. Kuchling2001-06-181-1/+2
| | | | | | PyArg_ParseTuple() call. (2.1.1 bugfix candidate.)
* Fix for bug [ #433047 ] missing args to PyArg_ParseTupleMarc-André Lemburg2001-06-171-2/+2
|
* Fix error in comment, and in test_long_api and test_longlong_api removeTim Peters2001-06-162-26/+21
| | | | the need for the F_ERROR macro.
* Forward-port revision 2.24.2.4 from the release21-maint branch:Thomas Wouters2001-06-151-0/+10
| | | | | | Protect several more uses of constants with #ifdefs; these are necessary on (at least) SCO OpenServer 5. Fixes a non-SF-submitted bugreport by Michael Kent.
* Fixed typo in comment.Tim Peters2001-06-141-1/+1
|
* Add tests of PyLong_{As,From}{Unsigned,}Long. These are very much likeTim Peters2001-06-142-158/+238
| | | | | | | | | | | the new PyLong_{As,From}{Unsigned,}LongLong tests, so the bulk of the code is in the new #include file testcapi_long.h, which generates different code depending on how macros are set. This sucks, but I couldn't think of anything that sucked less. UNIX headache? If we still maintain dependencies by hand, someone who knows what they're doing should teach whatever needs it that _testcapimodule.c includes testcapi_long.h.
* The new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.Tim Peters2001-06-131-0/+8
| | | | Repaired that, and added appropriate tests for it to test_struct.py.
* longobject.c:Tim Peters2001-06-131-15/+158
| | | | | | | | | | | Replaced PyLong_{As,From}{Unsigned,}LongLong guts with calls to _PyLong_{As,From}ByteArray. _testcapimodule.c: Added strong tests of PyLong_{As,From}{Unsigned,}LongLong. Fixes SF bug #432552 PyLong_AsLongLong() problems. Possible bugfix candidate, but the fix relies on code added to longobject to support the new q/Q structmodule format codes.
* The merest start of a test for the PyLong_{As,From}{Unsigned,}LongLong()Tim Peters2001-06-121-4/+57
| | | | | | | | | | functions. I intend to replace their guts with calls to the new _PyLong_{As,From}ByteArray() functions, but AFAICT there's no tests for them at all now; I also suspect PyLong_AsLongLong() isn't catching all overflow cases, but without a std test to demonstrate that why should you believe me <wink>. Also added a raiseTestError() utility function.
* Removed the Python version from the PYTHONHOMEHELP string. It wasMarc-André Lemburg2001-06-121-1/+1
| | | | still set to python2.0 ...
* Added q/Q standard (x-platform 8-byte ints) mode in struct module.Tim Peters2001-06-121-55/+137
| | | | | | | | | | | | | | This completes the q/Q project. longobject.c _PyLong_AsByteArray: The original code had a gross bug: the most-significant Python digit doesn't necessarily have SHIFT significant bits, and you really need to count how many copies of the sign bit it has else spurious overflow errors result. test_struct.py: This now does exhaustive std q/Q testing at, and on both sides of, all relevant power-of-2 boundaries, both positive and negative. NEWS: Added brief dict news while I was at it.
* Trimmed trailing whitespace.Tim Peters2001-06-111-3/+3
|
* Simplify some convolution by simply not recognizing 'q' and 'Q' at allTim Peters2001-06-111-33/+0
| | | | in native mode on platforms that don't HAVE_LONG_LONG.
* Make clear in the docstring that "std" applies to both size and alignment,Tim Peters2001-06-111-6/+6
| | | | | | not just to alignment. Spotted by Guido. Bugfix candidate.
* Protect the use of the VWERASE symbol by an #ifdef, it's apparently missingThomas Wouters2001-06-111-0/+2
| | | | on (some versions of ?) AIX.
* Initial support for 'q' and 'Q' struct format codes: for now, only inTim Peters2001-06-101-1/+186
| | | | | | | | | | | | | | | | | | native mode, and only when config #defines HAVE_LONG_LONG. Standard mode will eventually treat them as 8-byte ints across all platforms, but that likely requires a new set of routines in longobject.c first (while sizeof(long) >= 4 is guaranteed by C, there's nothing in C we can rely on x-platform to hold 8 bytes of int, so we'll have to roll our own; I'm thinking of a simple pair of conversion functions, Python long to/from sized vector of unsigned bytes; that may be useful for GMP conversions too; std q/Q would call them with size fixed at 8). test_struct.py: In addition to adding some native-mode 'q' and 'Q' tests, got rid of unused code, and repaired a non-portable assumption about native sizeof(short) (it isn't 2 on some Cray boxes). libstruct.tex: In addition to adding a bit of 'q'/'Q' docs (more needed later), removed an erroneous footnote about 'I' behavior.
* annoying whitespace inconsistencyPeter Schneider-Kamp2001-06-101-1/+1
|
* This closes bug #430849 (internal error produced by binascii.a2b_base64)Peter Schneider-Kamp2001-06-071-0/+4
|
* Make it possible to find the use of tp_as_buffer here with a global search.Tim Peters2001-06-051-1/+1
| | | | (Just a change to a comment)
* Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessorNeil Schemenauer2001-06-021-1/+1
| | | | directives, which is the role of CPPFLAGS. Closes SF patch #414991.
* Cruft cleanup: Removed the unused last_is_sticky argument from the internalTim Peters2001-05-281-2/+2
| | | | _PyTuple_Resize().
* Iterator support: made the xreadlines object its own iterator. ThisGuido van Rossum2001-05-221-25/+81
| | | | ought to be faster.
* Correct the sense of a couple of conditional compilations -- used #ifndefFred Drake2001-05-221-2/+2
| | | | | | when #ifdef was needed. This closes (reallu!) SF bug #417418.
* Add :method info to the PyArg_ParseTuple() format strings for poll objects.Fred Drake2001-05-211-3/+3
|
* Add warnings to the strop module, for to those functions that reallyGuido van Rossum2001-05-151-0/+22
| | | | | | | | | *are* obsolete; three variables and the maketrans() function are not (yet) obsolete. Add a compensating warnings.filterwarnings() call to test_strop.py. Add this to the NEWS.
* Fix new compiler warnings. Also boost "start" from (C) int to long andTim Peters2001-05-141-5/+5
| | | | | | | | return a (C) long: PyArg_ParseTuple and Py_BuildValue may not let us get at the size_t we really want, but C int is clearly too small for a 64-bit box, and both the start parameter and the return value should work for large mapped files even on 32-bit boxes. The code really needs to be rethought from scratch (not by me, though ...).
* SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.Tim Peters2001-05-142-13/+13
|
* fcntl.ioctl(): Update error message; necessity noted by Michael Hudson.Fred Drake2001-05-141-1/+3
|
* Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a ↵Mark Hammond2001-05-141-10/+0
| | | | fileobject.h, and initialize it in bltinmodule.
* Fix the .find() method for memory maps.Greg Stein2001-05-141-3/+12
| | | | | | | | | | 1) it didn't obey the "start" parameter (and when it does, we must validate the value) 2) the return value needs to be an absolute index, rather than relative to some arbitrary point in the file (checking CVS, it appears this method never worked; these changes bring it into line with typical .find() behavior)
* Add support for Windows using "mbcs" as the default Unicode encoding when ↵Mark Hammond2001-05-131-40/+99
| | | | dealing with the file system. As discussed on python-dev and in patch 410465.
* Fix a minor style consistency issue.Fred Drake2001-05-111-3/+3
| | | | | | When getting a string buffer for a string we just created, use PyString_AS_STRING() instead of PyString_AsString() to avoid the call overhead and extra type check.
* Include sys/modem.h if we have it; this is needed on HP-UX to provideFred Drake2001-05-111-0/+12
| | | | | | | | constants used by other macros from the headers. Conditionalize VREPRINT and VDISCARD; these are not available on HP-UX. This closes bug #417418.
* Fix the fcntl() docstring so the user is not mis-directed to the FCNTLFred Drake2001-05-101-7/+7
| | | | module for useful constants.
* Guido has Spoken. Restore strop.replace()'s treatment of a 0 count asTim Peters2001-05-101-0/+6
| | | | | | | meaning infinity -- but at least warn about it in the code! I pissed away a couple hours on this today, and don't wish the same on the next in line. Bugfix candidate.
* The strop module and test_strop.py believe replace() with a 0 countTim Peters2001-05-101-1/+1
| | | | | | | means "replace everything". But the string module, string.replace() amd test_string.py believe a 0 count means "replace nothing". "Nothing" wins, strop loses. Bugfix candidate.
* Heh. I need a break. After this: stropmodule & stringobject were moreTim Peters2001-05-101-8/+6
| | | | | | out of synch than I realized, and I managed to break replace's "count" argument when it was 0. All is well again. Maybe. Bugfix candidate.
* Fudge. stropmodule and stringobject both had copies of the buggyTim Peters2001-05-101-8/+13
| | | | | | mymemXXX stuff, and they were already out of synch. Fix the remaining bugs in both and get them back in synch. Bugfix release candidate.
* SF bug #422088: [OSF1 alpha] string.replace().Tim Peters2001-05-091-26/+33
| | | | | | Platform blew up on "123".replace("123", ""). Michael Hudson pinned the blame on platform malloc(0) returning NULL. This is a candidate for all bugfix releases.