Fred Drake
acee69faf8
Switch to using METH_NOARGS where possible.
...
Convert to use PyModule_*() instead of manipulating the module dict directly.
2002-04-01 14:28:58 +00:00
Martin v. Löwis
43c9d8ad23
Remove UNLESS.
2002-04-01 12:34:33 +00:00
Fred Drake
f4e3484692
Use the PyModule_*() API instead of manipulating the module dictionary
...
directly.
2002-04-01 03:45:06 +00:00
Neal Norwitz
02098fa56b
Get rid of all METH_OLDARGS & PyArg_Parse.
...
Fix floating point exception if mpz.powm(10, 1, 0) (modulus == 0).
Add a test.
2002-04-01 01:37:14 +00:00
Neal Norwitz
dfd59e039a
mpz_float() only takes one parameter now
2002-03-31 22:02:37 +00:00
Neal Norwitz
767f83539d
Get rid of warnings due to changing to METH_NOARGS
2002-03-31 16:13:39 +00:00
Neal Norwitz
28faa1bf28
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
...
Use METH_OLDARGS explicitly rather than implicitly.
2002-03-31 15:56:56 +00:00
Neal Norwitz
bb2769f580
Revert use of METH_OLDARGS (use 0) to support 1.5.2
2002-03-31 15:46:00 +00:00
Neal Norwitz
b82d34f91e
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple
...
Please review for correctness.
2002-03-31 15:43:28 +00:00
Neal Norwitz
ba3a16c6c3
Remove METH_OLDARGS:
...
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Please review. All tests pass, but some modules don't have tests.
I spot checked various functions to try to make sure nothing broke.
2002-03-31 15:27:00 +00:00
Neal Norwitz
50905b557b
Convert from using METH_OLDARGS to METH_NOARGS.
...
These should be safe.
2002-03-31 14:57:24 +00:00
Neal Norwitz
01b2694acb
Fix whitespace
2002-03-31 14:55:17 +00:00
Neal Norwitz
b049325e92
Use symbolic METH_VARARGS/METH_OLDARGS instead of 1/0 for ml_flags
2002-03-31 14:44:22 +00:00
Neil Schemenauer
cc07ec17a3
Add missing typecast.
2002-03-29 19:58:25 +00:00
Andrew M. Kuchling
f4a4fb9a11
[Patch #536769 ] Add -Xcompiler flag for adding arguments and switches for
...
the compiler
2002-03-29 18:00:19 +00:00
Neil Schemenauer
b883310d59
Make _PyObject_GC_UnTrack do nothing if WITH_CYCLE_GC is not defined.
2002-03-29 03:04:25 +00:00
Neil Schemenauer
78662cf9a1
Add type cast.
2002-03-28 21:04:14 +00:00
Guido van Rossum
ff413af605
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).
...
The fix makes it possible to call PyObject_GC_UnTrack() more than once
on the same object, and then move the PyObject_GC_UnTrack() call to
*before* the trashcan code is invoked.
BUGFIX CANDIDATE!
2002-03-28 20:34:59 +00:00
Fred Drake
f841aa6fc0
Add a simple test of the METH_CLASS and METH_STATIC flags for type methods.
2002-03-28 15:49:54 +00:00
Martin v. Löwis
2e64c34850
Expose C library's gettext. Fixes #516412 .
2002-03-27 18:49:02 +00:00
Martin v. Löwis
496f9e41ef
Don't imply XPG4 constants from CODESET presence. Fixes #534153 .
...
2.2.2 candiate.
2002-03-27 12:15:57 +00:00
Neal Norwitz
4632117e37
Missed change METH_OLDARGS to METH_NOARGS for two aliased functions
2002-03-26 14:52:00 +00:00
Neal Norwitz
7e78acbb1b
Remove last occurrance of PyArg_GetInt. It is deprecated,
2002-03-25 22:23:53 +00:00
Neal Norwitz
2358425146
Missed change METH_OLDARGS to METH_NOARGS for two aliased functions
2002-03-25 21:05:50 +00:00
Neal Norwitz
3a6f97850b
Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
2002-03-25 20:46:46 +00:00
Jack Jansen
6d8898b5eb
Due to interaction between the MSL C library and the GUSI I/O library I can get reads from sockets to work consistently either for unbuffered binary files or for buffered binary files, but not for both:-(
...
The workaround is to force socket.makefile() to disable buffering for binary files.
Fixes bug 534625. 2.2.1 candidate.
2002-03-25 15:32:01 +00:00
Neil Schemenauer
29ac3cb7ed
Expose RLIM_INFINITY constant. Closes SF patch 489066.
2002-03-24 22:27:39 +00:00
Neil Schemenauer
0f75e0dcad
Add get_history_item, get_current_history_length, and redisplay functions.
...
Clarify the docstring for get_history_length. Closes SF patch 494066.
2002-03-24 01:09:04 +00:00
Neil Schemenauer
fa79c65235
Match behavior of the pickle.py module more closely.
2002-03-22 23:02:53 +00:00
Neil Schemenauer
94b866a030
Handle os.listdir("") case correctly on Windows. Closes bug 500705.
2002-03-22 20:51:58 +00:00
Neil Schemenauer
1b0e4fcc29
Use pymalloc for realloc() as well.
2002-03-22 15:41:03 +00:00
Neil Schemenauer
dcc819a5c9
Use pymalloc if it's enabled.
2002-03-22 15:33:15 +00:00
Neal Norwitz
3afb2d2bba
Remove compiler warnings on Solaris 8.
...
Can go into 2.2.x, but not necessary.
2002-03-20 21:32:07 +00:00
Neal Norwitz
5909402cde
Remove extraneous #define as per effbot's instructions in:
...
[ 530285 ] redefining SRE_CODE in Modules/sre.h
2002-03-18 18:46:14 +00:00
Martin v. Löwis
d4233b2b8c
Include Python.h first. Fixes #530159 .
2002-03-15 09:16:40 +00:00
Martin v. Löwis
dc0b61d0b1
Verify arguments for nl_langinfo. Fixes #528879 .
2002-03-12 22:05:02 +00:00
Fred Drake
1de5a722d6
Change the example code to prefer PyModule_Add*() instead of using the
...
module dictionary directly. Also, be more careful about not re-initializing
globals in the event of re-initialization of a C extension.
2002-03-12 21:49:44 +00:00
Fred Drake
193a3f6d37
Update docstrings to use te attribute names of the new structures returned
...
by stat and time functions.
This closes SF patch #523271 .
2002-03-12 21:38:49 +00:00
Sjoerd Mullender
556a938d10
Changed C++ comment into standard comment.
2002-03-11 09:20:47 +00:00
Tim Peters
dc5a508761
SF bug 525705: [2.2] underflow raise OverflowException.
...
Another year in the quest to out-guess random C behavior.
Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y). The latter
is useful for functions with complex results. Two corrections to errno-
after-libm-call are attempted:
1. If the platform set errno to ERANGE due to underflow, clear errno.
Some unknown subset of libm versions and link options do this. It's
allowed by C89, but I never figured anyone would do it.
2. If the platform did not set errno but overflow occurred, force
errno to ERANGE. C89 required setting errno to ERANGE, but C99
doesn't. Some unknown subset of libm versions and link options do
it the C99 way now.
Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee. I'll send a help plea to Python-Dev.
2002-03-09 04:58:24 +00:00
Jeremy Hylton
b189b07dcc
Fix SF bug #526518
...
The doc string for cStringIO suggested that str() of a StringIO object
was equivalent to getvalue(). This was never true, so repair the doc
string. (doctest would have helped here.)
Bug fix candidate for any past versions.
2002-03-08 17:17:33 +00:00
Tim Peters
c9ffa068d1
SF bug 515943: searching for data with \0 in mmap.
...
mmap_find_method(): this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.
Someone please run on Linux too (the extended test_mmap works on Windows).
Bugfix candidate.
2002-03-08 05:43:32 +00:00
Martin v. Löwis
aa158be623
Remove tp_print.
2002-03-04 09:38:52 +00:00
Tim Peters
bc2e10e7b6
Python no longer compiled on Windows, due to #include file confusion
...
over SEP, ALTSEP and MAXPATHLEN.
Patched up posixmodule.c for MSVC, but unsure what the story is now on
other non-Unixish platforms -- the preprocessor maze has no exit <wink>.
2002-03-03 23:17:02 +00:00
Andrew MacIntyre
6c73af2754
OS/2 EMX port changes (Modules part of patch #450267 ):
...
Modules/
posixmodule.c
- use SEP,ALTSEP #defines instead of hard coded path separator chars
- use EMX specific variants of chdir2(),getcwd() that support drive letters
- OS/2+EMX spawnv(),spawnve() support
- EMX specific popen[234]() derived from Win32 popen[234]() code
2002-03-03 03:07:07 +00:00
Andrew MacIntyre
ba43e8700b
OS/2 EMX port changes (Modules part of patch #450267 ):
...
Modules/
socketmodule.c
EMX handles sockets like Posix, rather than use native APIs
2002-03-03 03:03:52 +00:00
Andrew MacIntyre
7bf6833e17
OS/2 EMX port changes (Modules part of patch #450267 ):
...
Modules/
_hotshot.c
dbmmodule.c
fcntlmodule.c
main.c
pwdmodule.c
readline.c
selectmodule.c
signalmodule.c
termios.c
timemodule.c
unicodedata.c
2002-03-03 02:59:16 +00:00
Guido van Rossum
6f33250ef9
SF patch 517245 by Marc Recht.
...
Support GMP version >= 2.
Bugfix candidate.
2002-03-01 21:31:27 +00:00
Martin v. Löwis
dbd55b3737
Patch #523268 , #522027 : return enhanced tuples.
2002-03-01 10:38:44 +00:00
Martin v. Löwis
9986633609
Patch 520694: arraymodule.c improvements:
...
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
2002-03-01 10:27:01 +00:00