0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00
Commit Graph

13667 Commits

Author SHA1 Message Date
Fred Drake
3cd2ee4037 Remove use of HAVE_OLD_CPP to support non-ANSI preprocessors. 2000-07-09 14:36:13 +00:00
Andrew M. Kuchling
ad9b1f8533 Patch from Peter Schneider-Kamp: convert curses module to ANSI prototypes,
and substitute the conventional "args" instead of "arg".
2000-07-09 14:35:00 +00:00
Fred Drake
bd03bfce45 Remove legacy use of __SC__; no longer needed now that ANSI source is
the standard for Python implementation.
2000-07-09 14:22:08 +00:00
Fredrik Lundh
5cccf50931 - added (long) casts to a couple of Py_BuildValue calls,
just for the sake of it.

  note that this only covers the unlikely case that size_t
  is smaller than a long; it's probably more likely that
  there are platforms out there where size_t is *larger*
  than a long, and mmapmodule cannot really deal with that
  today.
2000-07-09 13:16:13 +00:00
Fredrik Lundh
e25cfd8662 - fixed pointer size test in spawn functions. also added
cast to make sure Py_BuildValue gets the right thing.

  this change eliminates bogus return codes from successful
  spawn calls (e.g. 2167387144924954624 instead of 0).
2000-07-09 13:10:40 +00:00
Fredrik Lundh
43298d1fff - win95/98 helper for new os.popen code
this should be built as a console application (link with
  USER32.LIB), and installed in the same directory as the
  Python DLL.
2000-07-09 11:35:36 +00:00
Tim Peters
c2e7da9859 Somebody started playing with const, so of course the outcome
was cascades of warnings about mismatching const decls.  Overall,
I think const creates lots of headaches and solves almost
nothing.  Added enough consts to shut up the warnings, but
this did require casting away const in one spot too (another
usual outcome of starting down this path):  the function
mymemreplace can't return const char*, but sometimes wants to
return its first argument as-is, which latter must be declared
const char* in order to avoid const warnings at mymemreplace's
call sites.  So, in the case the function wants to return the
first arg, that arg's declared constness must be subverted.
2000-07-09 08:02:21 +00:00
Fred Drake
ba09633e1e ANSI-fication of the sources. 2000-07-09 07:04:36 +00:00
Fred Drake
45cfbcccc2 ANSI-fication of the sources. 2000-07-09 06:21:27 +00:00
Fred Drake
ee238b977f ANSI-fication of the sources. 2000-07-09 06:03:25 +00:00
Fred Drake
1b190b4636 ANSI-fication of the sources. 2000-07-09 05:40:56 +00:00
Fred Drake
1f0968c5f8 Remove legacy use of __SC__; no longer needed now that ANSI source is
the standard for Python implementation.
2000-07-09 05:31:24 +00:00
Fred Drake
fd99de6470 ANSI-fication of the sources. 2000-07-09 05:02:18 +00:00
Barry Warsaw
7dfeb42939 EnvironmentError__init__(): The two case clauses were missing
`break's.  This first missing break caused a memory leak when case 3
fell through case 2 in the following example:

import os
os.chmod('/missing', 0600)
2000-07-09 04:56:25 +00:00
Fred Drake
4288c80599 ANSI-fication of the sources. 2000-07-09 04:36:04 +00:00
Fred Drake
4201b9e420 type_error(): Added "const" to signature to eliminate warning with -Wall. 2000-07-09 04:34:13 +00:00
Fred Drake
3be9a8a5ed ANSI-fication of the source.
Make the indentation and brace placement internally consistent.
2000-07-09 04:14:42 +00:00
Fred Drake
799124718d ANSI-fication of the sources. 2000-07-09 04:06:11 +00:00
Fred Drake
a83b68a143 Remove the only Py_PROTO in the docs. 2000-07-09 03:35:10 +00:00
Tim Peters
dbd9ba6a6c Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. 2000-07-09 03:09:57 +00:00
Tim Peters
4be47c0f76 Get rid of unused vars in builtin_unicode (they were causing
legit warnings).
2000-07-09 02:11:18 +00:00
Fred Drake
3cf4d2b3ea ANSI-fication and Py_PROTO extermination. 2000-07-09 00:55:06 +00:00
Fred Drake
ea9cb5aebf ANSI-fication and Py_PROTO extermination. 2000-07-09 00:20:36 +00:00
Fred Drake
5eb6d4e3bf ANSI-fication and Py_PROTO extermination. 2000-07-08 23:37:28 +00:00
Fredrik Lundh
ff7df9d7b8 this one's a bit risky, but I've spent some considerable time
staring at the diffs before checking this one in.  let me know
asap if it breaks things on your platform.

-- ANSI-fying
   (patch #100763 by Peter Schneider-Kamp, minus the
    indentation changes and minus the changes the broke
    the windows build)
2000-07-08 22:48:53 +00:00
Fredrik Lundh
54cf3dc88c -- ANSI-fying, names
(patch #100762 by Peter Schneider-Kamp, minus the
    indentation changes)

-- added INT_PTR workaround to make it build under VC 5.0
2000-07-08 22:05:01 +00:00
Fredrik Lundh
c0348ac670 - removed barry's workaround, to make room for
bill's more complete solution.
2000-07-08 20:49:58 +00:00
Fredrik Lundh
89610a4d50 - _getdefaultlocale shouldn't accept arguments
- some more spacification...
2000-07-08 20:07:24 +00:00
Fredrik Lundh
8f017a01f8 - added _getdefaultlocale implementation for WIN32
- ansified, reindentified, spacified, nullified
2000-07-08 19:57:37 +00:00
Fredrik Lundh
ddbc11893f - this is a tentative checkin of the #100764 patch (by
Barry Scott).  it appears to solve the problem on NT
  and 2000, but not on Windows 95.

  in other words, it's better than before, but not per-
  fect.  I'll leave the patch open for now.
2000-07-08 18:06:41 +00:00
Fredrik Lundh
2a1e060619 - changed __repr__ to use "unicode escape" encoding for unicode
strings, instead of the default encoding.
  (see "minidom" thread for discussion, and also patch #100706)
2000-07-08 17:43:32 +00:00
Fred Drake
d5c84ede06 ANSI-fication of the sources -- remove Py_PROTO! 2000-07-08 17:25:55 +00:00
Fred Drake
146b28086f Minor revisions similar to some information in the new docstrings. 2000-07-08 16:59:03 +00:00
Fred Drake
51b6bc55e3 ANSI-fication of the sources, convert to 4-space indents.
Use PyArg_ParseTuple() to get better error messages.
Add docstrings all around.
2000-07-08 16:56:26 +00:00
Skip Montanaro
4cbc9f7650 delete unused local variable from _PyTrash_deposit_object 2000-07-08 12:06:36 +00:00
Andrew M. Kuchling
35e8afb76e Rearrange order of sections
Fix some incorrect module names
2000-07-08 12:06:31 +00:00
Skip Montanaro
4ca150bdb2 _Py_RefTotal should only be declared here when Py_TRACE_REFS are #define'd 2000-07-08 12:04:57 +00:00
Fred Drake
2c4a3dceaf ANSI-fied sources, converted to four-space indentation.
Converted to PyArg_ParseTuple() with method names to get better error
messages.
2000-07-08 06:41:03 +00:00
Fred Drake
edabdc1e9e ANSI-fied sources, converted to four-space indentation. 2000-07-08 06:16:37 +00:00
Fred Drake
da940d8f8d Add method names to PyArg_ParseTuple() calls for better error messages.
Convert to four-space indents.
2000-07-08 06:05:58 +00:00
Fred Drake
5443c49fbb Markup improvements in sections relating to interactive behavior.
Clarify some of the details of readline-related configuration.
2000-07-08 05:18:54 +00:00
Fred Drake
e3a41c653a ANSI-fy the sources.
Convert to using PyArg_ParseTuple() as appropriate to allow method names
in error messages.
Re-indent to four-space indentation.
2000-07-08 05:00:07 +00:00
Fred Drake
0c89d4ec9a Pretensions of the 20th century... remove old-style preprocessor
hackery (/**/), leaving only new-style preprocessor hackery (##).
2000-07-08 04:53:48 +00:00
Tim Peters
7d3a511a40 Cray J90 fixes for long ints.
This was a convenient excuse to create the pyport.h file recently
discussed!
Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a
signed int and you *need* sign-extension.  This is #define'd in
pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS.
If you're running on a platform that needs that symbol #define'd,
the std tests never would have worked for you (in particular,
at least test_long would have failed).
The autoconfig stuff got added to Python after my Unix days, so
I don't know how that works.  Would someone please look into doing
& testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS
symbol?  It needs to be defined if & only if, e.g., (-1) >> 3 is
not -1.
2000-07-08 04:17:21 +00:00
Fred Drake
5639ba4896 ANSI-fy the sources. 2000-07-08 04:12:08 +00:00
Fred Drake
509d79adaf Removed Py_PROTO, ANSI-fied sources. 2000-07-08 04:04:38 +00:00
Tim Peters
43f04a36cf The tail end of x_sub implicitly assumed that an unsigned short
contains 16 bits.  Not true on Cray J90.
2000-07-08 02:26:47 +00:00
Greg Stein
a90b23c571 One of the new prototypes was missing the "void" args. 2000-07-08 00:46:19 +00:00
Tim Peters
9ace6bc7ef Got RID of redundant coercions in longobject.c (as spotted by Greg
Stein -- thanks!).  Incidentally removed all the Py_PROTO macros
from object.h, as they prevented my editor from magically finding
the definitions of the "coercion", "cmpfunc" and "reprfunc"
typedefs that were being redundantly applied in longobject.c.
2000-07-08 00:32:04 +00:00
Guido van Rossum
74b2677593 delete bogus file 2000-07-07 21:57:20 +00:00