summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* ANSI-fication of the sources.Fred Drake2000-07-091-105/+46
|
* ANSI-fication of the sources.Fred Drake2000-07-092-214/+83
|
* Somebody started playing with const, so of course the outcomeTim Peters2000-07-091-8/+8
| | | | | | | | | | | | | was cascades of warnings about mismatching const decls. Overall, I think const creates lots of headaches and solves almost nothing. Added enough consts to shut up the warnings, but this did require casting away const in one spot too (another usual outcome of starting down this path): the function mymemreplace can't return const char*, but sometimes wants to return its first argument as-is, which latter must be declared const char* in order to avoid const warnings at mymemreplace's call sites. So, in the case the function wants to return the first arg, that arg's declared constness must be subverted.
* ANSI-fication of the sources.Fred Drake2000-07-093-252/+102
|
* ANSI-fication of the sources.Fred Drake2000-07-093-60/+22
|
* ANSI-fication of the sources.Fred Drake2000-07-093-79/+33
|
* ANSI-fication of the sources.Fred Drake2000-07-091-27/+10
|
* Remove legacy use of __SC__; no longer needed now that ANSI source isFred Drake2000-07-091-5/+0
| | | | the standard for Python implementation.
* ANSI-fication of the sources.Fred Drake2000-07-092-155/+59
|
* ANSI-fication of the sources.Fred Drake2000-07-091-98/+48
|
* type_error(): Added "const" to signature to eliminate warning with -Wall.Fred Drake2000-07-091-1/+1
|
* ANSI-fication of the source.Fred Drake2000-07-091-109/+95
| | | | Make the indentation and brace placement internally consistent.
* ANSI-fication of the sources.Fred Drake2000-07-093-360/+135
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-096-33/+33
|
* - changed __repr__ to use "unicode escape" encoding for unicodeFredrik Lundh2000-07-081-1/+1
| | | | | strings, instead of the default encoding. (see "minidom" thread for discussion, and also patch #100706)
* delete unused local variable from _PyTrash_deposit_objectSkip Montanaro2000-07-081-1/+0
|
* _Py_RefTotal should only be declared here when Py_TRACE_REFS are #define'dSkip Montanaro2000-07-081-0/+2
|
* Cray J90 fixes for long ints.Tim Peters2000-07-082-9/+9
| | | | | | | | | | | | | | | | This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1.
* The tail end of x_sub implicitly assumed that an unsigned shortTim Peters2000-07-081-0/+1
| | | | contains 16 bits. Not true on Cray J90.
* Got RID of redundant coercions in longobject.c (as spotted by GregTim Peters2000-07-081-6/+3
| | | | | | | Stein -- thanks!). Incidentally removed all the Py_PROTO macros from object.h, as they prevented my editor from magically finding the definitions of the "coercion", "cmpfunc" and "reprfunc" typedefs that were being redundantly applied in longobject.c.
* New surrogate support in the UTF-8 codec. By Bill Tutt.Marc-André Lemburg2000-07-071-29/+80
|
* Some cleanup of longs in prepartion for Cray J90 fixes: gotTim Peters2000-07-071-241/+105
| | | | | rid of Py_PROTO, switched to ANSI function decls, and did some minor fiddling.
* Added new API PyUnicode_FromEncodedObject() which supports decodingMarc-André Lemburg2000-07-071-6/+49
| | | | | | objects including instance objects. The old API PyUnicode_FromObject() is still available as shortcut.
* Fix to bug #393 (UTF16 codec didn't like empty strings) andMarc-André Lemburg2000-07-071-7/+6
| | | | | corrected some usage of 'unsigned long' where Py_UNICODE should have been used.
* Two more places where long should be used instead of int. EspeciallySjoerd Mullender2000-07-071-2/+2
| | | | true after revision 2.36 was checked in...
* Fixed some code that used 'short' to use 'long' instead.Marc-André Lemburg2000-07-061-3/+3
|
* Fixed a couple of places where 'int' was used where 'long'Marc-André Lemburg2000-07-061-7/+7
| | | | should have been used.
* Conditionally (currently on ifdef macintosh) break the large switch upJack Jansen2000-07-061-0/+15
| | | | into 1000-case smaller ones.
* Added new codec APIs and a new interface method .encode() whichMarc-André Lemburg2000-07-061-0/+114
| | | | | | | | | works just like the Unicode one. The C APIs match the ones in the Unicode implementation, but were extended to be able to reuse the existing Unicode codecs for string purposes too. Conversions from string to Unicode and back are done using the default encoding.
* Fix to bug #389:Marc-André Lemburg2000-07-051-4/+4
| | | | | | | Full_Name: Bastian Kleineidam Version: 2.0b1 CVS 5.7.2000 OS: Debian Linux 2.2 Submission from: earth.cs.uni-sb.de (134.96.252.92)
* Added new .isalpha() and .isalnum() methods which provide interfacesMarc-André Lemburg2000-07-051-0/+66
| | | | to the new alphabetic lookup APIs in unicodectype.c.
* Added new lookup API which matches all alphabetic Unicode characters,Marc-André Lemburg2000-07-051-0/+5295
| | | | i.e the ones with category 'Ll','Lu','Lt','Lo','Lm'.
* Added new .isalpha() and .isalnum() methods to match the sameMarc-André Lemburg2000-07-051-0/+68
| | | | | ones on the Unicode objects. Note that the string versions use the (locale aware) C lib APIs isalpha() and isalnum().
* Removed Py_PROTO and switched to ANSI C declarations in the dictTim Peters2000-07-041-104/+34
| | | | | | | implementation. This was really to test whether my new CVS+SSH setup is more usable than the old one -- and turns out it is (for whatever reason, it was impossible to do a commit before that involved more than one directory).
* Bill Tutt:Marc-André Lemburg2000-07-041-6/+29
| | | | | Make unicode_compare a true UTF-16 compare function (includes support for surrogates).
* If auto-conversion fails, the Unicode codecs will return NULL.Marc-André Lemburg2000-07-031-11/+13
| | | | This is now checked and the error passed on to the caller.
* changed repr and str to always convert unicode stringsFredrik Lundh2000-07-011-0/+16
| | | | to 8-bit strings, using the default encoding.
* Neil Schemenauer: small fixes for GCGuido van Rossum2000-07-016-7/+14
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-3021-126/+0
|
* Change copyright notice.Guido van Rossum2000-06-3021-458/+143
|
* Fix an error on AIX by using a proper cast.Guido van Rossum2000-06-301-1/+1
|
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-308-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | The common technique for printing out a pointer has been to cast to a long and use the "%lx" printf modifier. This is incorrect on Win64 where casting to a long truncates the pointer. The "%p" formatter should be used instead. The problem as stated by Tim: > Unfortunately, the C committee refused to define what %p conversion "looks > like" -- they explicitly allowed it to be implementation-defined. Older > versions of Microsoft C even stuck a colon in the middle of the address (in > the days of segment+offset addressing)! The result is that the hex value of a pointer will maybe/maybe not have a 0x prepended to it. Notes on the patch: There are two main classes of changes: - in the various repr() functions that print out pointers - debugging printf's in the various thread_*.h files (these are why the patch is large) Closes SourceForge patch #100505.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-301-1/+1
| | | | A previous patch by Jack Jansen was accidently reverted.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-302-49/+129
| | | | | | New buffer overflow checks for formatting strings. By Trent Mick.
* final patches from Neil Schemenauer for garbage collectionJeremy Hylton2000-06-306-14/+80
|
* This patch addresses two main issues: (1) There exist some non-fatalFred Drake2000-06-296-48/+94
| | | | | | | | | | | | | | | | | | | | errors in some of the hash algorithms. For exmaple, in float_hash and complex_hash a certain part of the value is not included in the hash calculation. See Tim's, Guido's, and my discussion of this on python-dev in May under the title "fix float_hash and complex_hash for 64-bit *nix" (2) The hash algorithms that use pointers (e.g. func_hash, code_hash) are universally not correct on Win64 (they assume that sizeof(long) == sizeof(void*)) As well, this patch significantly cleans up the hash code. It adds the two function _Py_HashDouble and _PyHash_VoidPtr that the various hashing routine are changed to use. These help maintain the hash function invariant: (a==b) => (hash(a)==hash(b))) I have added Lib/test/test_hash.py and Lib/test/output/test_hash to test this for some cases.
* Jack Jansen: Use include "" instead of <>; and staticforward declarationsGuido van Rossum2000-06-291-1/+1
|
* Vladimir Marangozov:Guido van Rossum2000-06-281-3/+3
| | | | | | Avoid calling the dealloc function, previously triggered with DECREF(inst). This caused a segfault in PyDict_GetItem, called with a NULL dict, whenever inst->in_dict fails under low-memory conditions.
* Trent Mick: change a few casts for Win64 compatibility.Guido van Rossum2000-06-282-2/+2
|
* Jack Jansen: Moved includes to the top, removed think C supportGuido van Rossum2000-06-281-18/+20
|