Commit Graph

37 Commits

Author SHA1 Message Date
Guido van Rossum db847bd9ea Plug memory leak in Py_BuildValue when using {...} to construct dictionaries. 1997-11-20 20:35:45 +00:00
Guido van Rossum 2e58ff3ef5 Fix importing of shared libraries from inside packages.
This is a bit of a hack: when the shared library is loaded, the module
name is "package.module", but the module calls Py_InitModule*() with just
"module" for the name.  The shared library loader squirrels away the true
name of the module in _Py_PackageContext, and Py_InitModule*() will
substitute this (if the name actually matches).
1997-11-19 18:53:33 +00:00
Guido van Rossum 40b33c648a Removed fatal errors from Py_Initmodule4() (and thus from
Py_Initmodule(), which is a macro wrapper around it).

The return value is now a NULL pointer if the initialization failed.
This may make old modules fail with a SEGFAULT, since they don't
expect this kind of failure.  That's OK, since (a) it "never" happens,
and (b) they would fail with a fatal error otherwise, anyway.

Tons of extension modules should now check the return value of
Py_Initmodule*() -- that's on my TODO list.
1997-08-02 03:07:46 +00:00
Guido van Rossum 79f25d9a7b Quickly renamed the remaining files -- this directory is done. 1997-04-29 20:08:16 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Sjoerd Mullender 996e6dc959 Corrected format string in api_version_warning. 1996-01-23 16:07:29 +00:00
Guido van Rossum 59461c7052 use PROTO macro around fn prototype 1995-03-09 12:10:50 +00:00
Guido van Rossum d1b9393ba5 support "O&" taking an object constructor a void* 1995-01-20 16:56:02 +00:00
Guido van Rossum 2ac3bc2c05 rename method arg because of typedef conflict 1995-01-17 16:31:01 +00:00
Guido van Rossum 970a0a20b8 api version checking 1995-01-09 17:47:20 +00:00
Guido van Rossum 50620fa9b8 New newmethodobject() interface takes struct methodlist pointer
instead of individual components; initmodule3() now has doc string
argument as well
1995-01-07 12:43:18 +00:00
Guido van Rossum 6d023c98b0 Added 1995 to copyright message.
bltinmodule.c: fixed coerce() nightmare in ternary pow().
modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject().
pythonrun.c: move flushline() into and around print_error().
1995-01-04 19:12:13 +00:00
Guido van Rossum 1ae940a587 Lots of changes, most minor (fatal() instead of abort(), use of
err_fetch/err_restore and so on).  But...
NOTE: import.c has been rewritten and all the DL stuff is now in the
new file importdl.c.
1995-01-02 19:04:15 +00:00
Guido van Rossum fe3f1a256b * Python/{modsupport.c,getargs.c,Makefile.in},
Include/modsupport.h: moved getargs() to its own file and
	re-implemented it entirely to support optional arguments, multiple
	arguments without surrounding parentheses
	(when called as newgetargs()), and better error messages
1994-09-29 09:42:55 +00:00
Guido van Rossum 1d5735e846 Merge back to main trunk 1994-08-30 08:27:36 +00:00
Guido van Rossum f1dc566328 * Makefile: added all: and default: targets.
* many files: made some functions static; removed "extern int errno;".
* frozenmain.c: fixed bugs introduced on 24 June...
* flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a
  (and some old functions that were omitted).
* timemodule.c: added MSDOS floatsleep version .
* pgenmain.c: changed exit() to goaway() and added defn of goaway().
* intrcheck.c: add hack (to UNIX only) so interrupting 3 times
  will exit from a hanging program.  The second interrupt prints
  a message explaining this to the user.
1993-07-05 10:31:29 +00:00
Guido van Rossum e537240c25 * Changed many files to use mkvalue() instead of newtupleobject().
* Fixcprt.py: added [-y file] option, do only files younger than file.
* modsupport.[ch]: added vmkvalue().
* intobject.c: use mkvalue().
* stringobject.c: added "formatstring"; renamed string* to string_*;
  ceval.c: call formatstring for string % value.
* longobject.c: close memory leak in divmod.
* parsetok.c: set result node to NULL when returning an error.
1993-03-16 12:15:04 +00:00
Guido van Rossum bf80e5407f * stdwinmodule.c: various new commands: setwin{pos,size},
listfontnames, bitmap ops.
* listobject.c: use mkvalue() when possible; avoid weird error when
  calling append() without args.
* modsupport.c: new feature in getargs(): if the format string
  contains a semicolor the string after that is used as the error
  message instead of "bad argument list (format %s)" when there's an
  error.
1993-02-08 15:49:17 +00:00
Guido van Rossum 34679b7661 * Added Fixcprt.py: script to fix copyright message.
* various modules: added 1993 to copyright.
* thread.c: added copyright notice.
* ceval.c: minor change to error message for "+"
* stdwinmodule.c: check for error from wfetchcolor
* config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h)
* Add declaration of inittab to import.h
* sysmodule.c: added sys.builtin_module_names
* xxmodule.c, xxobject.c: fix minor errors
1993-01-26 13:33:44 +00:00
Guido van Rossum a2b7f40513 * Configure.py: use #!/usr/local/bin/python
* posixmodule.c: move extern function declarations to top
* listobject.c: cmp() arguments must be void* if __STDC__
* Makefile, allobjects.h, panelmodule.c, modsupport.c: get rid of
  strdup() -- it is a portability risk
* Makefile: enclosed ranlib command in parentheses for Sequent Make
  which aborts if the command is not found even if '-' is present
* timemodule.c: time() returns a floating point number, in microsecond
  precision if BSD_TIME is defined.
1993-01-04 09:09:59 +00:00
Guido van Rossum a93265a666 suppress unnecessary error message if too many arguments are passed 1992-08-27 07:45:12 +00:00
Guido van Rossum 96caaee836 check for embedded \0 in strings for z and s formats 1992-08-14 15:12:03 +00:00
Guido van Rossum 899dcf36a0 Added parameter decls to do_mkvalue for non-template machines 1992-05-15 11:04:59 +00:00
Guido van Rossum fc61adb5f1 Merged with Steve Miale's version 1992-04-13 15:53:41 +00:00
Guido van Rossum 3cfe6faffe Added mkvalue() function 1992-04-13 10:48:55 +00:00
Guido van Rossum bab9d03855 Copyright for 1992 added 1992-04-05 14:26:55 +00:00
Guido van Rossum 292bb8ea33 Shut up lint 1992-03-27 17:23:29 +00:00
Guido van Rossum 922cfad5a3 New getargs() function: a single varargs function,
guided by a format string, makes all get*arg() functions unnecessary.
1992-01-27 16:47:03 +00:00
Guido van Rossum c06022966f Add "varargs" attribute. 1991-12-16 13:07:24 +00:00
Guido van Rossum c5da350310 getlonglongargs --> getlonglongarg
Added getlongobjectarg.
1991-09-10 14:56:32 +00:00
Guido van Rossum 139e57b2a4 Support for long integers 1991-07-27 21:39:31 +00:00
Guido van Rossum ef0068ff9d Added getintintintarg() (3 int args) 1991-07-01 18:47:30 +00:00
Guido van Rossum 7a904edcbf Moved get*doublearg() routines here from mathmodule.c 1991-04-03 19:06:26 +00:00
Guido van Rossum f70e43a073 Added copyright notice. 1991-02-19 12:39:46 +00:00
Guido van Rossum 3f5da24ea3 "Compiling" version 1990-12-20 15:06:42 +00:00
Guido van Rossum 68c35d01d6 Move err_badarg() and err_nomme() to errors.c. 1990-10-14 20:02:48 +00:00
Guido van Rossum 85a5fbbdfe Initial revision 1990-10-14 12:07:46 +00:00