summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Move declaration of 'clnt_create()' NIS function to pyport.h, as it'sThomas Wouters2001-01-211-0/+3
| | | | | | supposed to be declared in system include files (with a proper prototype.) Should be moved to a platform-specific block if anyone finds out which broken platforms need it :-)
* Fix comment.Neil Schemenauer2001-01-201-2/+2
|
* refactored the unicodeobject/ucnhash interface, to hide theFredrik Lundh2001-01-191-18/+27
| | | | | | | implementation details inside the ucnhash module. also cleaned up the unicode copyright blurb a little; Secret Labs' internal revision history isn't that interesting...
* Move distributed and duplicated config for stat() and fstat() into pyport.h.Tim Peters2001-01-181-2/+34
|
* Get rid of the declaration for _PyCompareState_Key.Guido van Rossum2001-01-171-3/+0
|
* This patch adds a new builtin unistr() which behaves like str()Marc-André Lemburg2001-01-172-0/+13
| | | | | | | | | | except that it always returns Unicode objects. A new C API PyObject_Unicode() is also provided. This closes patch #101664. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Rich comparisons: ensure that LT == Py_LT, etc.Guido van Rossum2001-01-171-1/+2
|
* Introduction to rich comparisons:Guido van Rossum2001-01-171-12/+22
| | | | | | | | | | | | | | - Removed the nb_add slot from the PyNumberMethods struct. - Renamed Py_TPFLAGS_NEWSTYLENUMBER to Py_TPFLAGS_CHECKTYPES. - Added typedef richcmpfunc. - Added tp_richcompare slot to PyTypeObject (replacing spare tp_xxx7). - Added APIs PyObject_RichCompare() and PyObject_RichCompareBool(). - Added rich comparison operators Py_LT through Py_GE.
* Bump version to 2.1a1. (To be released Friday.)Guido van Rossum2001-01-171-4/+4
|
* Committing PEP 232, function attribute feature, approved by Guido.Barry Warsaw2001-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes SF patch #103123. funcobject.h: PyFunctionObject: add the func_dict slot. funcobject.c: PyFunction_New(): Initialize the func_dict slot to NULL. func_getattr(): Rename to func_getattro() and change the signature. It's more efficient to use attro methods and dig the C string out than it is to re-convert a C string to a PyString. Also, add support for getting the __dict__ (a.k.a. func_dict) attribute, and for getting an arbitrary function attribute. func_setattr(): Rename to func_setattro() and change the signature for the same reason. Also add support for setting __dict__ (a.k.a. func_dict) and any arbitrary function attribute. func_dealloc(): Be sure to DECREF the func_dict slot. func_traverse(): Be sure to traverse func_dict too. PyFunction_Type: make the necessary func_?etattro() changes. classobject.c: instancemethod_memberlist: Add __dict__ instancemethod_setattro(): New method to set arbitrary attributes on methods (really the underlying im_func). Raise TypeError when the instance is bound or when you're trying to set one of the reserved im_* attributes. instancemethod_getattr(): Renamed to instancemethod_getattro() since that's what it really is. Also, added support fo getting arbitrary attributes through the im_func. PyMethod_Type: Do the ?etattr{,o} dance.
* Change LONG_BIT error warning to mention glibc, too, since this is reallyAndrew M. Kuchling2001-01-121-1/+1
| | | | a glibc, not a gcc, problem.
* - Add nb_cmp slot for new style nubmers.Neil Schemenauer2001-01-041-0/+22
| | | | | - Define type flag for new style numbers. - Add Py_NotImplemented.
* Remove PyInstance_*BinOp functions.Neil Schemenauer2001-01-041-8/+0
|
* Added header file for C API exported by _cursesmodule.cAndrew M. Kuchling2000-12-221-0/+133
|
* Add declarations for PySys_ResetWarnOptions() andGuido van Rossum2000-12-151-0/+3
| | | | PySys_AddWarnOption().
* Add declarations for standard warning category classes (PyExc_WarningGuido van Rossum2000-12-151-0/+10
| | | | etc.) and the PyErr_Warn() function.
* Move our own getopt() implementation to _PyOS_GetOpt(), and use itThomas Wouters2000-11-031-0/+17
| | | | | | | | | regardless of whether the system getopt() does what we want. This avoids the hassle with prototypes and externs, and the check to see if the system getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to avoid name clashes. Add new include file to define the right symbols. Fix Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on Python to provide it.
* getting closeJeremy Hylton2000-10-131-3/+3
|
* Use suggested workaround for PyOS_CheckStack causing failure of test_[s]re.pyTrent Mick2000-10-111-1/+1
| | | | | | on Win64. This closes bug http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=116516
* bump patchlevel to 2.0c1Jeremy Hylton2000-10-091-4/+4
|
* Added Py_FPROTO macro which was available in Python 1.5.x and below.Marc-André Lemburg2000-10-051-0/+3
| | | | | | | This should not be used for new code, but will probably make porting old extensions to 2.0 a lot easier. Also see Bug #116011.
* Move LONG_BIT from intobject.c to pyport.h. #error if it's already beenTim Peters2000-10-051-0/+13
| | | | | | #define'd to an unreasonable value (several recent gcc systems have misdefined it, causing bogus overflows in integer multiplication). Nuke CHAR_BIT entirely.
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-263-7/+36
| | | | | | | | 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.
* It's.....Guido van Rossum2000-09-261-3/+3
| | | | | | | Python 2.0b2! (Note: Jeremy will finish the release on Sept. 26; I have to go on an unexpected business trip.)
* 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.
* Derived from Martin's SF patch 110609: support unbounded ints in ↵Tim Peters2000-09-211-0/+2
| | | | | | | | | | | | | | | | %d,i,u,x,X,o formats. Note a curious extension to the std C rules: x, X and o formatting can never produce a sign character in C, so the '+' and ' ' flags are meaningless for them. But unbounded ints *can* produce a sign character under these conversions (no fixed- width bitstring is wide enough to hold all negative values in 2's-comp form). So these flags become meaningful in Python when formatting a Python long which is too big to fit in a C long. This required shuffling around existing code, which hacked x and X conversions to death when both the '#' and '0' flags were specified: the hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or '+' flags too, since signs were always meaningless before for x and X conversions. Isomorphic shuffling was required in unicodeobject.c. Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
* This patch adds a new Python C API called PyString_AsStringAndSize()Marc-André Lemburg2000-09-191-0/+15
| | | | | | | | | | | | | which implements the automatic conversion from Unicode to a string object using the default encoding. The new API is then put to use to have eval() and exec accept Unicode objects as code parameter. This closes bugs #110924 and #113890. As side-effect, the traditional C APIs PyString_Size() and PyString_AsString() will also accept Unicode objects as parameters.
* Make better use of GNU Pth -- patch by Andy Dustman.Guido van Rossum2000-09-191-1/+1
| | | | | | | | | | | | | | | I can't test this, so I'm just checking it in with blind faith in Andy. I've tested that it doesn't broeak a non-Pth build on Linux. Changes include: - There's a --with-pth configure option. - Instead of _GNU_PTH, we test for HAVE_PTH. - Better signal handling. - (The config.h.in file is regenerated in a slightly different order.)
* Add typedef PyOS_sighandler_t and prototypes for PyOS_getsig() andGuido van Rossum2000-09-161-0/+6
| | | | PyOS_setsig().
* RET_SAVE references should be Py_BLOCK_THREADS referencesSkip Montanaro2000-09-151-2/+2
|
* Close SF bug 110826: a complaint about the way Python #define'd NULL.Tim Peters2000-09-103-11/+4
| | | | | | | | | | | | | | | It's hard to sort out what the bug was, exactly. So, Big Hammer: 1. Python shouldn't be in the business of #define'ing NULL, period. 2. Users of the Python C API shouldn't be in the business of not including Python.h, period. Hence: 1. Removed all #define's of NULL in Python source code (pyport.h and object.h). 2. Since we're *relying* on stdio.h defining NULL, put an #error in Python.h after its #include of stdio.h if NULL isn't defined then.
* A #define didn't start in column 1. Closes SF bug 113888.Tim Peters2000-09-081-1/+1
|
* Add missing Py_PROTO macro for backward compatibility with old extensionsVladimir Marangozov2000-09-081-1/+7
| | | | | (sources) which may still use it and now fail to compile. Reported by M-A Lemburg. Closes [ Bug #113576 ].
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-0148-431/+0
| | | | This should match the situation in the 1.6b1 tree.
* refactor __del__ exception handler into PyErr_WriteUnraisableJeremy Hylton2000-09-011-0/+1
| | | | | add sanity check to gc: if an exception occurs during GC, call PyErr_WriteUnraisable and then call Py_FatalEror.
* Supply missing prototypes for new Py_{Get,Set}RecursionLimit; fixes compiler ↵Tim Peters2000-09-011-0/+2
| | | | | | | wngs; un-analize Get's definition ("void" is needed only in declarations, not defns, & is generally considered bad style in the latter).
* Added prototype for PyToken_ThreeChars(), to remove compiler warningFred Drake2000-08-311-0/+1
| | | | in Parser/grammar.c.
* The new PyEval_ReInitThreads wasn't declared in ceval.h; compiler wngs.Tim Peters2000-08-271-0/+1
|
* Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),Guido van Rossum2000-08-271-0/+4
| | | | | | | | | | | | | | PyRun_FileEx(). These are the same as their non-Ex counterparts but have an extra argument, a flag telling them to close the file when done. Then this is used by Py_Main() and execfile() to close the file after it is parsed but before it is executed. Adding APIs seems strange given the feature freeze but it's the only way I see to close the bug report without incompatible changes. [ Bug #110616 ] source file stays open after parsing is done (PR#209)
* implements PyOS_CheckStack for Windows and MSVC. this fixes aFredrik Lundh2000-08-271-1/+13
| | | | | | couple of potential stack overflows, including bug #110615. closes patch #101238
* Improve the exceptions raised by PyErr_BadInternalCall(); adding theFred Drake2000-08-241-0/+5
| | | | | | filename and line number of the call site to allow esier debugging. This closes SourceForge patch #101214.
* The real suport for augmented assignment: new opcodes, new PyNumber andThomas Wouters2000-08-246-58/+223
| | | | PySequence methods and functions, new tokens.
* Charles G. Waldman <cgw@fnal.gov>:Fred Drake2000-08-242-2/+5
| | | | | | | | | Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit arguments to opcodes instead of being forced to stick to the 16-bit limit. This is especially useful for machine-generated code, which can be too long for the SET_LINENO parameter to fit into 16 bits. This closes the implementation portion of SourceForge patch #100893.
* PEP 214, Extended print Statement, has been accepted by the BDFL.Barry Warsaw2000-08-211-0/+2
| | | | | This adds the two new opcodes to support this feature: PRINT_ITEM_TO, PRINT_NEWLINE_TO.
* Moved LONG_LONG #define from here to pyport.h.Barry Warsaw2000-08-181-3/+0
|
* Moved LONG_LONG #define from longobject.h to here, since it's neededBarry Warsaw2000-08-181-0/+43
| | | | | | | | | | by the following. typedef in a portable way the Python name for the C9X uintptr_t type. This latter is the most portable way to spell an integral type to which a void* can be cast to and back again without losing information. Parallel checkin hacks configure to check if the platform/compiler supports the C9X name.
* Apply SF patch #101135, adding 'import module as m' and 'from module importThomas Wouters2000-08-172-41/+43
| | | | | | | | name as n'. By doing some twists and turns, "as" is not a reserved word. There is a slight change in semantics for 'from module import name' (it will now honour the 'global' keyword) but only in cases that are explicitly undocumented.
* Updated commentAndrew M. Kuchling2000-08-161-1/+1
|
* Deleted now-unused include filesAndrew M. Kuchling2000-08-165-441/+0
|
* Fix for http://sourceforge.net/bugs/?func=detailbug&bug_id=111866&group_id=5470.Tim Peters2000-08-151-1/+9
| | | | | | | | | | | This was a misleading bug -- the true "bug" was that hash(x) gave an error return when x is an infinity. Fixed that. Added new Py_IS_INFINITY macro to pyport.h. Rearranged code to reduce growing duplication in hashing of float and complex numbers, pushing Trent's earlier stab at that to a logical conclusion. Fixed exceedingly rare bug where hashing of floats could return -1 even if there wasn't an error (didn't waste time trying to construct a test case, it was simply obvious from the code that it *could* happen). Improved complex hash so that hash(complex(x, y)) doesn't systematically equal hash(complex(y, x)) anymore.