summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* ANSIfy functions that were hiding inside a macro.Thomas Wouters2000-07-231-1/+1
|
* ANSIfication: remove very-old-varargs code, fix function declarations soThomas Wouters2000-07-221-34/+0
| | | | they include prototypes.
* Miscelaneous ANSIfications. I'm assuming here 'main' should take (int,Thomas Wouters2000-07-222-21/+5
| | | | | char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P
* Fixed problems with UTF error reporting macros and some formatting bugs.Marc-André Lemburg2000-07-171-45/+64
|
* Restore PyXXX_Length() APIs for binary compatibility.Marc-André Lemburg2000-07-171-0/+24
| | | | | | New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters.
* gcc is being stupid with if/else constructsGreg Stein2000-07-171-6/+14
| | | | clean out some other warnings
* stop messing around with goto and just write the macro correctly.Greg Stein2000-07-161-7/+6
|
* - change \x to mean "byte" also in unicode literalsFredrik Lundh2000-07-161-3/+5
| | | | (patch #100912)
* Fix fatal compiler (MSVC6) error:Tim Peters2000-07-161-0/+1
| | | | | unicodeobject.c(735) : error C2143: syntax error : missing ';' before '}'
* Fix to a bug found by Florian Weimer:Marc-André Lemburg2000-07-161-1/+2
| | | | | | | | | | | | | | | | The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's stress test), mainly due to the following construct: #define UTF8_ERROR(details) do { \ if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ continue; \ } while (0) (The "continue" statement is supposed to exit from the outer loop, but of course, it doesn't. Indeed, this is a marvelous example of the dangers of the C programming language and especially of the C preprocessor.)
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-166-12/+12
| | | | | | | | | | 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 ;)
* Fix in PyList_New(). With GC enabled and when out of memory,Vladimir Marangozov2000-07-151-1/+1
| | | | free() the GC pointer, not the object pointer.
* Added PyObject_AsFileDescriptor, which checks for integer, long integer,Andrew M. Kuchling2000-07-131-0/+58
| | | | or .fileno() method
* Propagate the current exception in get_inprogress_dict() -- it doesn'tVladimir Marangozov2000-07-121-1/+0
| | | | need to be cleared.
* replace PyXXX_Length calls with PyXXX_Size callsJeremy Hylton2000-07-123-4/+4
|
* change abstract size functions PySequence_Size &c.Jeremy Hylton2000-07-122-9/+9
| | | | add macros for backwards compatibility with C source
* Fix typo in error messageAndrew M. Kuchling2000-07-121-1/+1
|
* Include macglue.h on the macintosh, so function prototypes are in scope.Jack Jansen2000-07-111-0/+4
|
* small updates to string_join:Jeremy Hylton2000-07-111-6/+9
| | | | | | | use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing
* Jeremy Hylton:Marc-André Lemburg2000-07-111-2/+4
| | | | better error message for unicode coercion failure
* string_join(): Some cleaning up of reference counting. In theBarry Warsaw2000-07-111-7/+10
| | | | | | | | seqlen==1 clause, before returning item, we need to DECREF seq. In the res=PyString... failure clause, we need to goto finally to also decref seq (and the DECREF of res in finally is changed to a XDECREF). Also, we need to DECREF seq just before the PyUnicode_Join() return.
* fix two refcount bugs in new string_join implementation:Jeremy Hylton2000-07-111-6/+2
| | | | | 1. PySequence_Fast_GET_ITEM is a macro and borrows a reference 2. The seq returned from PySequence_Fast must be decref'd
* two changes to string_join:Jeremy Hylton2000-07-101-82/+42
| | | | | | implementation -- use PySequence_Fast interface to iterate over elements interface -- if instance object reports wrong length, ignore it; previous version raised an IndexError if reported length was too high
* - changed hash calculation for unicode strings. the newFredrik Lundh2000-07-101-18/+20
| | | | | | | | | | value is calculated from the character values, in a way that makes sure an 8-bit ASCII string and a unicode string with the same contents get the same hash value. (as a side effect, this also works for ISO Latin 1 strings). for more details, see the python-dev discussion.
* 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
|