summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Boost buffer sizes in the absence of snprintf on Windows.Tim Peters2000-08-041-14/+19
| | | | Ensure that # of args to sprintf always matches # of format specifiers.
* snprintf() is not portable, so continue to use sprintf() until a portableFred Drake2000-08-041-8/+6
| | | | snprintf() is available.
* This patch finalizes the move from UTF-8 to a default encoding inMarc-André Lemburg2000-08-031-40/+40
| | | | | | | | | | | | | | | | | | the Python Unicode implementation. The internal buffer used for implementing the buffer protocol is renamed to defenc to make this change visible. It now holds the default encoded version of the Unicode object and is calculated on demand (NULL otherwise). Since the default encoding defaults to ASCII, this will mean that Unicode objects which hold non-ASCII characters will no longer work on C APIs using the "s" or "t" parser markers. C APIs must now explicitly provide Unicode support via the "u", "U" or "es"/"es#" parser markers in order to work with non-ASCII Unicode strings. (Note: this patch will also have to be applied to the 1.6 branch of the CVS tree.)
* Remove the tp_print handler.Fred Drake2000-08-031-31/+27
| | | | | Revise the tp_repr handler to produce a more "minimal" presentation. Make the tolist() method use PyArg_ParseTuple() and provide a docstring.
* Remobe beopen/cnri/cwi copyrights, according to CNRI instructions.Guido van Rossum2000-08-031-10/+0
| | | | | | This doesn't change the copyright status for these files -- just the markings! Doing it on the main branch for these three files for which the HEAD revision was pushed back into 1.6.
* Changing the CNRI copyright notice according to CNRI's instructions.Guido van Rossum2000-08-032-2/+2
| | | | | This is a notice without a date, which apparently is not a claim to copyright but only advice to the reader. IANAL. :-)
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-316-7/+0
| | | | marked my*.h as obsolete
* Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters2000-07-252-10/+10
| | | | Leave the actual #define in for API compatibility.
* 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.