summaryrefslogtreecommitdiffstats
path: root/Include/modsupport.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't repeat yourselfChristian Heimes2008-01-221-1/+2
| | | | Added the macros PyModule_AddIntMacro and PyModule_AddStringMacro. They shorten PyModule_AddIntConstant(m, "AF_INET", AF_INET) to PyModule_AddIntMacro(m, AF_INET)
* Add check for the PyArg_ParseTuple format, and declareMartin v. Löwis2006-10-191-1/+1
| | | | it if it is supported.
* C++ compile cleanup: proper declaration of _Py_BuildValue_SizeTSkip Montanaro2006-04-181-0/+1
|
* Make Py_BuildValue, PyObject_CallFunction andMartin v. Löwis2006-04-141-12/+2
| | | | PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
* aargh. Don't make last minute re-organisations before checkin!Anthony Baxter2006-04-041-1/+1
|
* PyAPI_FUNC() the PyArg_.*SizeT forms. Without this, cygwin has hysterics.Anthony Baxter2006-04-041-0/+12
| | | | (see buildbot)
* Use Py_ssize_t for PyArg_UnpackTuple arguments.Martin v. Löwis2006-03-011-1/+1
|
* Martin owns PEP 353 and did most of the workNeal Norwitz2006-02-281-1/+1
|
* from __future__ import with_statement addon for 'with', mostly written byThomas Wouters2006-02-281-2/+4
| | | | Neal.
* Revert backwards-incompatible const changes.Martin v. Löwis2006-02-271-2/+2
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-4/+28
|
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-15/+15
| | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
* Disallow keyword arguments for type constructors that don't use them.Georg Brandl2005-08-261-0/+1
| | | | (fixes bug #1119418)
* Add PyArg_VaParseTupleAndKeywords(). Document this function andBrett Cannon2004-07-101-0/+2
| | | | | | PyArg_VaParse(). Closes patch #550732. Thanks Greg Chapman.
* SF patch 576101, by Oren Tirosh: alternative implementation ofGuido van Rossum2002-08-191-2/+5
| | | | | | | | interning. I modified Oren's patch significantly, but the basic idea and most of the implementation is unchanged. Interned strings created with PyString_InternInPlace() are now mortal, and you must keep a reference to the resulting string around; use the new function PyString_InternImmortal() to create immortal interned strings.
* Excise DL_EXPORT from Include.Mark Hammond2002-08-121-12/+12
| | | | Thanks to Skip Montanaro and Kalle Svensson for the patches.
* PyArg_UnpackTuple(): New argument unpacking function suggested by JimFred Drake2001-10-231-0/+1
| | | | Fulton, based on code Jim supplied.
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-2/+4
|
* The addition of new parameters to functions in the Python/C API requiresFred Drake2001-01-251-2/+5
| | | | that PYTHON_API_VERSION be incremented.
* Andrew Kuchling <akuchlin@mems-exchange.org>:Fred Drake2000-09-231-0/+4
| | | | | | | Add three new convenience functions to the PyModule_*() family: PyModule_AddObject(), PyModule_AddIntConstant(), PyModule_AddStringConstant(). This closes SourceForge patch #101233.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* ANSIfications: fix empty arglists, and remove the checks forThomas Wouters2000-07-221-13/+0
| | | | 'HAVE_STDARG_PROTOTYPES' (consider it true, remove false branch)
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | 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 ;)
* ANSI-fication of the sources -- remove Py_PROTO!Fred Drake2000-07-081-15/+17
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Version updated to 1.6; API version to 1009.Guido van Rossum2000-03-291-2/+4
|
* New version identification scheme.Guido van Rossum1999-01-031-3/+5
| | | | | The version numbers are now exported by Python.h. Also rolled back the API version change -- it's back to 1007!
* Add DL_IMPORT(returntype) for all officially exported functions.Guido van Rossum1998-12-041-11/+11
|
* New API version (enough has changed!).Guido van Rossum1998-12-031-3/+5
|
* Define new macro Py_InitModule3(name, methods, doc) which callsGuido van Rossum1998-06-271-0/+4
| | | | Py_InitModule4() with appropriate arguments.
* Add declaration for _Py_PackageContext -- needed to fix importingGuido van Rossum1997-11-191-0/+2
| | | | of shared libraries from inside packages.
* Removed special Windows defines, at Mark Hammond's request.Guido van Rossum1997-09-291-8/+4
|
* Bump MS_DLL_ID to 1.5.0.Guido van Rossum1997-08-121-1/+1
|
* Added PyArg_ParseTupleAndKeywords() prototype.Guido van Rossum1997-02-141-0/+2
|
* Bump API version due to the various speedup hacks.Guido van Rossum1997-01-181-2/+4
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Ellipses -> Ellipsis rename (the dictionary really says that it shouldGuido van Rossum1996-10-111-2/+4
| | | | | | | | be Ellipsis!). Bumped the API version because a linker-visible symbol is affected. Old C code will still compile -- there's a b/w compat macro. Similarly, old Python code will still run, builtin exports both Ellipses and Ellipsis.
* Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.Guido van Rossum1996-08-221-0/+22
| | | | | | | | | | Under Windows, add MS_DLL_ID and MS_DLL_VERSION_ID for Mark H. Independent change: if Py_TRACE_REFS is defined, rename Py_InitModule4 so so linking with incompatible modules will create a link time error. [Backing out of previous changes (also for modsupport.c) to test the latter at runtime.]
* Two bumps for the price of one (PYTHON_API_VERSION)Guido van Rossum1996-07-301-2/+9
|
* bump api versionGuido van Rossum1996-01-121-1/+3
|
* The great renaming, phase two: all header files have been updated toGuido van Rossum1995-01-121-19/+16
| | | | | | | use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
* api version checkingGuido van Rossum1995-01-091-3/+16
|
* initmodule2 -> initmodule3 (with doc string)Guido van Rossum1995-01-071-1/+2
|
* Added 1995 copyright.Guido van Rossum1995-01-041-2/+2
| | | | | | object.h: made sizes and refcnts signed ints. stringobject.h: make getstrsize() signed int. methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
* ceval.h: added Py_MakePendingCalls()Guido van Rossum1994-09-281-0/+1
| | | | | | classobject.h: added instancebinop() modsupport.h: added newgetargs() rename1.h: removed Py_FPROTO
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-8/+15
|
* * Added support for X11 modules.Guido van Rossum1993-07-281-0/+11
| | | | | | | * Makefile: change location of FORMS library. * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not) * Almost all .h files: added CPP magic to avoid duplicate inclusions and to support inclusion from C++.
* * Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.Guido van Rossum1993-06-171-22/+1
| | | | | | | | | | Added $(SYSDEF) to its build rule in Makefile. * cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also changed files that still used it... And made several things static that weren't but should have been... And other minor cleanups... * listobject.[ch]: add external interfaces {set,get}listslice * socketmodule.c: fix bugs in new send() argument parsing. * sunaudiodevmodule.c: added flush() and close().
* * Changed many files to use mkvalue() instead of newtupleobject().Guido van Rossum1993-03-161-2/+14
| | | | | | | | | | * 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.