Thomas Wouters
bd4bc4e9e9
Even more ANSIfication: fix as many function pointers and declarations as
possible.
26 years ago
Thomas Wouters
7e47402264
Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
26 years ago
Jeremy Hylton
03657cfdb0
replace PyXXX_Length calls with PyXXX_Size calls
26 years ago
Peter Schneider-Kamp
286da3b46a
ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
26 years ago
Fred Drake
3cd2ee4037
Remove use of HAVE_OLD_CPP to support non-ANSI preprocessors.
26 years ago
Fred Drake
7797d3692b
Remove warning about local variable possibly being using uninitialized;
noted by Marc-Andre Lemburg <mal@lemburg.com>.
26 years ago
Fred Drake
22269b5976
Andrew Kuchling <akuchlin@mems-exchange.org>:
Typo in string literal: execpt --> except
26 years ago
Guido van Rossum
ffcc3813d8
Change copyright notice - 2nd try.
26 years ago
Guido van Rossum
fd71b9e9d4
Change copyright notice.
26 years ago
Guido van Rossum
b18618dab7
Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
26 years ago
Fred Drake
e7ab64e070
validate_arglist(): Re-written to reflect extended call syntax.
validate_numnodes(): Added comment to explain the sometimes idiomatic
usage pattern.
26 years ago
Fred Drake
ff9ea480eb
ANSI-fy & de-tabify the source.
(4-space indents already used.)
26 years ago
Fred Drake
0dd7507e51
What used to be tp_xxx4 is now tp_flags; set it to Py_TPFLAGS_DEFAULT.
27 years ago
Fred Drake
2a6875e172
parser__pickler(): Don't drop the third argument to
parser_ast2tuple(). Create an temporary empty dictionary to
use. Bug reported by Mark Favas <m.favas@per.dem.csiro.au>.
Fix a couple of comments.
27 years ago
Fred Drake
7a15ba595a
Added keyword parameter support to all public interfaces; keyword
names match the documentation.
Removed broken code that supports the __methods__ attribute on ast
objects; the right magic was added to Py_FindMethod() since this was
originally written. <ast-object>.__methods__ now works, so dir() and
rlcompleter are happy.
27 years ago
Fred Drake
1a566ff2e8
When the parameter to PyInt_AsLong() has already been checked with
PyInt_Check(), use PyInt_AS_LONG() instead (two places).
28 years ago
Guido van Rossum
3886bb6997
Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
28 years ago
Fred Drake
7f875ef749
parser__pickler(): Use Py_DECREF() when reference is known to be non-NULL.
28 years ago
Guido van Rossum
3c8c5981b1
Sorry, the initializer for ob_type must really be NULL,
else the damn thing won't compile on Windows :-(
28 years ago
Fred Drake
ed3da23e44
parser_compare_nodes(): Corrected a minor type error; eliminate one GCC
warning (at least under Linux).
28 years ago
Fred Drake
268397f513
Made lint a bit happier.
Fixed a memory leak in an error handler.
29 years ago
Guido van Rossum
19efc5fb80
Add a declaration for strdup() for the Mac.
(Jack)
29 years ago
Fred Drake
301b5bea3f
In method & function tables, added a cast for the function pointers to keep
compilers happy.
initparser(): Remove unused variable.
gcc -Wall is now happy.
29 years ago
Fred Drake
503d8d66cc
The documentation threatened it would happen -- the functions that should
have been methods now are! Still available as functions for compatibility.
29 years ago
Fred Drake
43f8f9b894
Added support for pickling ast objects.
29 years ago
Guido van Rossum
730806d3d9
Make new gcc -Wall happy
29 years ago
Fred Drake
c542bc79c8
Support raise with no parameters.
29 years ago
Fred Drake
d49266eeed
Remove requirement for strdup() since it causes so many troubles for too many
platforms. Argh!
29 years ago
Guido van Rossum
1f14ccf6d1
Put back the extern declaration for strdup(), between #ifndef MS_WINDOWS.
This should make everybody happy, especially since we don't say what
the argument type is (there is disagreement on that, too :-( ).
29 years ago
Fred Drake
0225a38907
initparser(): Use PyErr_NewException() to create the exception.
29 years ago
Fred Drake
fd9ef4a26d
Removed extern declaration of strdup(). Doesn't appear to be important and
causes ugly noises under Windows.
29 years ago
Fred Drake
69b9ae4e0b
Add doc string to type object.
29 years ago
Guido van Rossum
925e547fcc
Support assert stmt.
30 years ago
Guido van Rossum
f2b2dac5eb
Initialize the ob_type field of PyAST_Type dynamically (in
initparser()) instead of statically (in the initializer). The static
initialization, using the address of an object in a different DLL, is
too much for the Microsoft VC++ compiler, and we want to be able to
build this module as a separate DLL (it's nice to have but we don't
want to increase the core DLL's size by 25K). This same trick has
been applied to a number of modules, e.g. NumPy and _tkinter.
30 years ago
Guido van Rossum
a376cc5cc8
Keep gcc -Wall happy.
30 years ago
Guido van Rossum
d266eb460e
New permission notice, includes CNRI.
30 years ago
Fred Drake
e1607a8d0e
(parsermodule.c): Fixed sloppy typo: '==' -> '='
30 years ago
Guido van Rossum
2a2884645d
Patches to make it compile with K&R C
30 years ago
Guido van Rossum
360a934609
Support for old CPP
30 years ago
Guido van Rossum
4747887880
New batch from Fred
30 years ago
Guido van Rossum
3d602e31b1
New submission by Fred Drake.
30 years ago
Guido van Rossum
c0fd1c0b83
fix argcount bug for build_node_children
31 years ago
Guido van Rossum
d9e9f9c05d
Fred Drake's new parser module
31 years ago
Guido van Rossum
cd938fc5a1
Made some more things static, and other cleanup for new naming scheme
32 years ago
Guido van Rossum
524b588553
Added 1995 to copyright message.
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
32 years ago
Guido van Rossum
3bbc62e9c2
Another bulky set of minor changes.
Note addition of gethostbyaddr() and improved repr() for sockets,
renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
32 years ago
Guido van Rossum
b6775db241
Merge alpha100 branch back to main trunk
32 years ago
Guido van Rossum
52f2c05401
* parsermodule.c, Makefile, config.c: rudimentary interface to the Python
parser.
* mappingobject.c (lookmapping): 'freeslot' was never used due to a bug in
the code.
33 years ago
Guido van Rossum
b73cc04e62
* ceval.c, longobject.c, methodobject.c, listnode.c, arraymodule.c,
pythonrun.c: added static forward declarations
* pythonrun.h, ceval.h, longobject.h, node.h: removed declarations of
static routines
33 years ago
Guido van Rossum
9e90a672b4
* pythonmain.c: -k option, usage message, more environment flags.
(the latter also in frozenmain.c)
* ceval.c: global 'killprint' flag raises exception when printing an
expression statement's value (useful for finding stray output)
* timemodule.c: add asctime() and ctime(). Change julian date to
1-based origin (as intended and documented).
* Removed unused DO_TIMES stuff from timemodule.c. Added 'epoch' and
'day0' globals (year where time.time() == 0 and day of the week the
epoch started).
33 years ago