Commit Graph

16 Commits

Author SHA1 Message Date
Thomas Heller fdc1bd305b Fix for Bug #216405:
use the correct base for a buffer object in _PyBuffer_FromObject.
2001-10-19 13:49:35 +00:00
Barry Warsaw 7ce3694a52 repr's converted to using PyString_FromFormat() instead of sprintf'ing
into a hardcoded char* buffer.

Closes patch #454743.
2001-08-24 18:34:26 +00:00
Tim Peters 6d6c1a35e0 Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Moshe Zadka cf703f04ad Removing warnings found by gcc -Wall 2000-08-04 15:36:13 +00:00
Fred Drake 799124718d ANSI-fication of the sources. 2000-07-09 04:06:11 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Fred Drake a44d353e2b Trent Mick <trentm@activestate.com>:
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.
2000-06-30 15:01:00 +00:00
Guido van Rossum b18618dab7 Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.

(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode.  I'm also holding back on his
change to main.c, which seems unnecessary to me.)
2000-05-03 23:44:39 +00:00
Fred Drake 4574f23115 PyBuffer_New(): Raise ValueError if size is negative (the other
constructors didn't miss this).

		 Raise MemoryError if malloc() fails, instead of just
		 returning NULL.
1999-08-04 13:08:19 +00:00
Guido van Rossum cd037e7bed Folded long lines. 1999-03-24 19:05:31 +00:00
Guido van Rossum 49ded3ec00 Added check for negative offset for PyBuffer_FromObject and check for
negative size for PyBuffer_FromMemory.  Greg Stein.
1999-03-19 19:04:25 +00:00
Guido van Rossum 1db7070217 Greg Stein: Implement the new bf_getcharbuffer function, indicating
that (as far as the data type is concerned!) this is character data.
1998-10-08 02:18:52 +00:00
Guido van Rossum 7148ca9d14 Make gcc -Wall happy. 1998-10-07 16:22:12 +00:00
Guido van Rossum 2e19bd7cc7 Add Greg Stein's buffer object API. 1998-10-07 14:36:10 +00:00