summaryrefslogtreecommitdiffstats
path: root/Include/intobject.h
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 55342-55406 via svnmerge fromGuido van Rossum2007-05-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55360 | guido.van.rossum | 2007-05-15 14:57:59 -0700 (Tue, 15 May 2007) | 2 lines obcheckin. ........ r55361 | guido.van.rossum | 2007-05-15 14:59:18 -0700 (Tue, 15 May 2007) | 2 lines Get rid of strop module. ........ r55367 | brett.cannon | 2007-05-15 21:06:28 -0700 (Tue, 15 May 2007) | 2 lines Remove the 'pure' module. ........ r55369 | brett.cannon | 2007-05-15 21:07:31 -0700 (Tue, 15 May 2007) | 2 lines Remove the lib-old directory (already empty). ........ r55370 | neal.norwitz | 2007-05-15 21:30:40 -0700 (Tue, 15 May 2007) | 1 line Get rid of a bunch more references to strop ........ r55374 | brett.cannon | 2007-05-15 21:39:00 -0700 (Tue, 15 May 2007) | 2 lines Complete the removal of IRIX-specific modules. ........ r55379 | brett.cannon | 2007-05-15 22:31:54 -0700 (Tue, 15 May 2007) | 2 lines Update removed IRIX modules based on what is gone from removing plat-irix6. ........ r55388 | brett.cannon | 2007-05-16 14:34:52 -0700 (Wed, 16 May 2007) | 2 lines Clean up the docstring for the compiler resource. ........ r55406 | brett.cannon | 2007-05-17 11:05:37 -0700 (Thu, 17 May 2007) | 2 lines Remove BaseException.message (deprecated in Python 2.6). ........
* Merged the int/long unification branch, by very crude means (sorry Thomas!).Guido van Rossum2007-01-141-17/+14
| | | | | | | | | | I banged on the code (beyond what's in that branch) to make fewer tests fail; the only tests that fail now are: test_descr -- can't pickle ints?! test_pickletools -- ??? test_socket -- See python.org/sf/1619659 test_sqlite -- ??? I'll deal with those later.
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+4
|
* Wrote down the invariants of some common objects whose structure isArmin Rigo2004-10-281-1/+1
| | | | | | | | | | exposed in header files. Fixed a few comments in these headers. As we might have expected, writing down invariants systematically exposed a (minor) bug. In this case, function objects have a writeable func_code attribute, which could be set to code objects with the wrong number of free variables. Calling the resulting function segfaulted the interpreter. Added a corresponding test.
* SF # 595026: support for masks in getargs.c.Thomas Heller2003-04-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functions: unsigned long PyInt_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); unsigned long PyLong_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); New and changed format codes: b unsigned char 0..UCHAR_MAX B unsigned char none ** h unsigned short 0..USHRT_MAX H unsigned short none ** i int INT_MIN..INT_MAX I * unsigned int 0..UINT_MAX l long LONG_MIN..LONG_MAX k * unsigned long none L long long LLONG_MIN..LLONG_MAX K * unsigned long long none Notes: * New format codes. ** Changed from previous "range-and-a-half" to "none"; the range-and-a-half checking wasn't particularly useful. New test test_getargs2.py, to verify all this.
* Move _PyInt_Init() into pythonrun.h, since all the other _Init()Neal Norwitz2003-01-011-1/+0
| | | | functions are here. Suggested by Skip.
* Since the *_Init() are private, prefix with _, suggested by SkipNeal Norwitz2002-12-311-1/+1
|
* SF #561244, Micro optimizationsNeal Norwitz2002-12-301-0/+1
| | | | | | Initialize the small integers and __builtins__ in startup. This removes some if conditions. Change XDECREF to DECREF for values which shouldn't be NULL.
* Excise DL_EXPORT from Include.Mark Hammond2002-08-121-9/+9
| | | | Thanks to Skip Montanaro and Kalle Svensson for the patches.
* Add the 'bool' type and its values 'False' and 'True', as described inGuido van Rossum2002-04-031-15/+0
| | | | | | | | | | | | | PEP 285. Everything described in the PEP is here, and there is even some documentation. I had to fix 12 unit tests; all but one of these were printing Boolean outcomes that changed from 0/1 to False/True. (The exception is test_unicode.py, which did a type(x) == type(y) style comparison. I could've fixed that with a single line using issubtype(x, type(y)), but instead chose to be explicit about those places where a bool is expected. Still to do: perhaps more documentation; change standard library modules to return False/True from predicates.
* SF bug #460020: bug or feature: unicode() and subclasses.Tim Peters2001-09-101-0/+1
| | | | | | | | | | | Given an immutable type M, and an instance I of a subclass of M, the constructor call M(I) was just returning I as-is; but it should return a new instance of M. This fixes it for M in {int, long}. Strings, floats and tuples remain to be done. Added new macros PyInt_CheckExact and PyLong_CheckExact, to more easily distinguish between "is" and "is a" (i.e., only an int passes PyInt_CheckExact, while any sublass of int passes PyInt_Check). Added private API function _PyLong_Copy.
* Make the PyXXX_Check() macros for the numeric types inheritance-aware.Guido van Rossum2001-08-291-1/+1
|
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-171-0/+2
| | | | | | | | - 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.
* 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.
* ANSI-fication and Py_PROTO extermination.Fred Drake2000-07-091-15/+15
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Marc-Andre's third try at this bulk patch seems to work (except thatGuido van Rossum2000-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | his copy of test_contains.py seems to be broken -- the lines he deleted were already absent). Checkin messages: New Unicode support for int(), float(), complex() and long(). - new APIs PyInt_FromUnicode() and PyLong_FromUnicode() - added support for Unicode to PyFloat_FromString() - new encoding API PyUnicode_EncodeDecimal() which converts Unicode to a decimal char* string (used in the above new APIs) - shortcuts for calls like int(<int object>) and float(<float obj>) - tests for all of the above Unicode compares and contains checks: - comparing Unicode and non-string types now works; TypeErrors are masked, all other errors such as ValueError during Unicode coercion are passed through (note that PyUnicode_Compare does not implement the masking -- PyObject_Compare does this) - contains now works for non-string types too; TypeErrors are masked and 0 returned; all other errors are passed through Better testing support for the standard codecs. Misc minor enhancements, such as an alias dbcs for the mbcs codec. Changes: - PyLong_FromString() now applies the same error checks as does PyInt_FromString(): trailing garbage is reported as error and not longer silently ignored. The only characters which may be trailing the digits are 'L' and 'l' -- these are still silently ignored. - string.ato?() now directly interface to int(), long() and float(). The error strings are now a little different, but the type still remains the same. These functions are now ready to get declared obsolete ;-) - PyNumber_Int() now also does a check for embedded NULL chars in the input string; PyNumber_Long() already did this (and still does) Followed by: Looks like I've gone a step too far there... (and test_contains.py seem to have a bug too). I've changed back to reporting all errors in PyUnicode_Contains() and added a few more test cases to test_contains.py (plus corrected the join() NameError).
* Got rid of silly "123456789-..." lines in comments.Guido van Rossum2000-03-011-4/+0
|
* Mainlining the string_methods branch. See branch revision logBarry Warsaw1999-10-121-0/+1
| | | | messages for specific changes.
* Add prototypes for PyOS_strto[u]l -- Chris Herborth.Guido van Rossum1998-12-101-0/+9
|
* Add DL_IMPORT(returntype) for all officially exported functions.Guido van Rossum1998-12-041-3/+3
|
* Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg.Guido van Rossum1997-08-021-1/+1
|
* Added decl for PyInt_GetMax().Guido van Rossum1997-07-191-0/+1
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* make the type a parameter of the DL_IMPORT macro, for Borland CGuido van Rossum1995-02-271-2/+2
|
* The great renaming, phase two: all header files have been updated toGuido van Rossum1995-01-121-15/+15
| | | | | | | 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".
* 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.
* Changes for dynamic linking under NTGuido van Rossum1994-08-181-2/+2
|
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-1/+1
|
* * 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++.
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-2/+2
| | | | | | | | | | | | | | | | | * Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* Initial revisionGuido van Rossum1990-10-141-0/+48