summaryrefslogtreecommitdiff
path: root/Python/modsupport.c
AgeCommit message (Collapse)AuthorLines
2002-07-28Patch #554716: Use __va_copy where available.Martin v. Löwis-0/+4
2002-06-17PyModule_AddObject(): Added missing exceptions.Fred Drake-7/+14
Closes SF bug #523473.
2001-08-17Patch #445762: Support --disable-unicodeMartin v. Löwis-0/+4
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
2001-08-04Plug a memory leak in Py_InitModule4(): when PyDict_SetItemString() failed,Fred Drake-2/+6
the object being inserted was not being DECREFed. This closes SF bug #444486.
2001-07-31This patch turns the Python API mismatch notice into a standardMarc-André Lemburg-5/+11
Python warning which can be catched by means of the Python warning framework. It also adds two new APIs which hopefully make it easier for Python to switch to buffer overflow safe [v]snprintf() APIs for error reporting et al. The two new APIs are PyOS_snprintf() and PyOS_vsnprintf() and work just like the standard ones in many C libs. On platforms which have snprintf(), the native APIs are used, on all other an emulation with snprintf() tries to do its best.
2001-03-12Py_BuildValue(): Add "D" conversion to create a Python complex value fromFred Drake-0/+6
a Py_complex C value. Patch by Walter Dörwald. This partially closes SF patch #407148.
2000-09-26Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake-3/+0
Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
2000-09-23Andrew Kuchling <akuchlin@mems-exchange.org>:Fred Drake-0/+27
Add three new convenience functions to the PyModule_*() family: PyModule_AddObject(), PyModule_AddIntConstant(), PyModule_AddStringConstant(). This closes SourceForge patch #101233.
2000-09-15Cast UCHAR_MAX to int before doing the comparison for overflow of theJack Jansen-0/+1
B format char.
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-08-04Add a test that Py_IsInitialized() in Py_InitModule4(). SeeGuido van Rossum-0/+2
python-dev discussion. This should catch future version incompatibilities on Windows. Alas, this doesn't help for 1.5 vs. 1.6; but it will help for 1.6 vs. 2.0.
2000-07-22Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters-68/+8
declarations yet, those come later.
2000-07-09Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters-6/+6
2000-07-06Added support for H (unsigned short) specifier in PyArg_ParseTuple andJack Jansen-0/+3
Py_BuildValue.
2000-07-03Include limits.h if we have it.Jack Jansen-0/+3
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-28Trent Mick's Win64 changes: size_t vs. int or long; also some overflowGuido van Rossum-2/+9
tests.
2000-04-28Brian Hooper <brian_takashi@hotmail.com>:Fred Drake-1/+31
Here's a patch which changes modsupport to add 'u' and 'u#', to support building Unicode objects from a null-terminated Py_UNICODE *, and a Py_UNICODE * with length, respectively. [Conversion from 'U' to 'u' by Fred, based on python-dev comments.] Note that the use of None for NULL values of the Py_UNICODE* value is still in; I'm not sure of the conclusion on that issue.
1999-01-25Change rare occurrences of #if HAVE_LONG_LONG to #ifdef.Guido van Rossum-1/+1
1998-12-23Oops, forgot a pair of {}'s. (Greg Couch)Guido van Rossum-1/+2
1998-12-23Add 'N' format character to Py_BuildValue -- like 'O' but doesn't INCREF.Guido van Rossum-1/+3
Patch and suggestion by Greg Couch.
1998-08-25Patch by Mark Hammond to support 64-bit ints on MS platforms.Guido van Rossum-1/+1
The MS compiler doesn't call it 'long long', it uses __int64, so a new #define, LONG_LONG, has been added and all occurrences of 'long long' are replaced with it.
1998-08-08# Fix strange type (methonname instead of methodname).Guido van Rossum-4/+4
1998-08-04Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum-0/+5
1998-07-07Two error messages still used the old name of the functio mkvalue() --Guido van Rossum-2/+2
which is now Py_BuildValue().
1997-11-20Plug memory leak in Py_BuildValue when using {...} to construct dictionaries.Guido van Rossum-3/+5
1997-11-19Fix importing of shared libraries from inside packages.Guido van Rossum-0/+10
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-08-02Removed fatal errors from Py_Initmodule4() (and thus fromGuido van Rossum-12/+12
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-04-29Quickly renamed the remaining files -- this directory is done.Guido van Rossum-100/+106
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1996-01-23Corrected format string in api_version_warning.Sjoerd Mullender-1/+1
1995-03-09use PROTO macro around fn prototypeGuido van Rossum-1/+1
1995-01-20 support "O&" taking an object constructor a void*Guido van Rossum-2/+10
1995-01-17rename method arg because of typedef conflictGuido van Rossum-4/+4
1995-01-09api version checkingGuido van Rossum-14/+16
1995-01-07New newmethodobject() interface takes struct methodlist pointerGuido van Rossum-15/+14
instead of individual components; initmodule3() now has doc string argument as well
1995-01-04Added 1995 to copyright message.Guido van Rossum-4/+5
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-02Lots of changes, most minor (fatal() instead of abort(), use ofGuido van Rossum-49/+242
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.
1994-09-29 * Python/{modsupport.c,getargs.c,Makefile.in},Guido van Rossum-340/+0
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-08-30Merge back to main trunkGuido van Rossum-47/+98
1993-07-05* Makefile: added all: and default: targets.Guido van Rossum-0/+4
* 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-03-16* Changed many files to use mkvalue() instead of newtupleobject().Guido van Rossum-30/+21
* 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-02-08* stdwinmodule.c: various new commands: setwin{pos,size},Guido van Rossum-8/+18
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-01-26* Added Fixcprt.py: script to fix copyright message.Guido van Rossum-2/+2
* 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-04* Configure.py: use #!/usr/local/bin/pythonGuido van Rossum-3/+6
* 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.
1992-08-27suppress unnecessary error message if too many arguments are passedGuido van Rossum-2/+5
1992-08-14check for embedded \0 in strings for z and s formatsGuido van Rossum-2/+13
1992-05-15Added parameter decls to do_mkvalue for non-template machinesGuido van Rossum-1/+4
1992-04-13Merged with Steve Miale's versionGuido van Rossum-79/+145