- 12 Apr, 2002 40 commits
-
-
Barry Warsaw authored
-
Barry Warsaw authored
-
Tim Peters authored
_PyObject_DebugMalloc: explicitly cast PyObject_Malloc's result to the target pointer type. _PyObject_DebugDumpStats: change decl of arena_alignment from unsigned int to unsigned long. This is for the 2.3 release only (it's new code).
-
Fred Drake authored
-
Fred Drake authored
-
Fred Drake authored
(The real issue is whether modules can benefit from an alternate implementation strategy rather than using a dictionary. We should migrate away from direct dictionary manipulation to allow more room for Jeremy to flex the implementation with changes in globals lookup.)
-
Guido van Rossum authored
-
Fred Drake authored
Clean up the example of exporting a C-callable API from an extension module. Add a hyperlink to a related section in the Python/C API reference.
-
Fred Drake authored
PyModule_GetDict(), which is also more flexible: it does not assume that the "module" is a real module.
-
Fred Drake authored
Change a section title to fit in better.
-
Martin v. Löwis authored
-
Guido van Rossum authored
The test function's signature should be test(methodname, input, output, *args) but the output argument was omitted. This caused all tests to fail, because the expected output was passed as the initial argument to the method call. But because of the way the test works (it compares the results for a regular string to the results for a UserString instance with the same value, and it's OK if both raise the same exception) the test never failed! I've fixed this, and also cleaned up a few warts in the verbose output. Finally, I've made it possible to run the test stand-alone in verbose mode by passing -v as a command line argument. Now, the test will report failure related to zfill. That's not my fault, that's a legitimate problem: the string_tests.py file contains a test for the zfill() method (just added) but this method is not implemented. The responsible party will surely fix this soon now.
-
Fred Drake authored
-
Fred Drake authored
-
Fred Drake authored
-
Neal Norwitz authored
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Jack Jansen authored
- Added a debug class variable to enable parser debugging.
-
Jack Jansen authored
or v.v.
-
Martin v. Löwis authored
-
Martin v. Löwis authored
-
Martin v. Löwis authored
-
Tim Peters authored
most of the work. In particular, if the underlying realloc is able to grow the memory block in place, great (this routine used to do a fresh malloc + memcpy every time a block grew). BTW, I'm not so keen here on avoiding possible quadratic-time realloc patterns as I am on making the debug pymalloc more invisible (the more it uses memory "just like" the underlying allocator, the better the chance that a suspected memory corruption bug won't vanish when the debug malloc is turned on).
-
Tim Peters authored
-
Tim Peters authored
prefix. These symbols are private to the file, and the PYMALLOC_ gets in the way (overly long code lines, comments, and error messages).
-
Tim Peters authored
PyMem_{Del, DEL} doesn't work yet (compilation problems). pyport.h: _PyMem_EXTRA is gone. pmem.h: Repaired comments. PyMem_{Malloc, MALLOC} and PyMem_{Realloc, REALLOC} now make the same x-platform guarantees when asking for 0 bytes, and when passing a NULL pointer to the latter. object.c: PyMem_{Malloc, Realloc} just call their macro versions now, since the latter take care of the x-platform 0 and NULL stuff by themselves now. pypcre.c, grow_stack(): So sue me. On two lines, this called PyMem_RESIZE to grow a "const" area. It's not legit to realloc a const area, so the compiler warned given the new expansion of PyMem_RESIZE. It would have gotten the same warning before if it had used PyMem_Resize() instead; the older macro version, but not the function version, silently cast away the constness. IMO that was a wrong thing to do, and the docs say the macro versions of PyMem_xyz are deprecated anyway. If somebody else is resizing const areas with the macro spelling, they'll get a warning when they recompile now too.
-
Tim Peters authored
all the same within the #ifdef WITH_PYMALLOC block.
-
Neil Schemenauer authored
PyMalloc_ prefix and use PyObject_ instead. I'm not sure about the debugging functions. Perhaps they should stay as PyMalloc_.
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Neil Schemenauer authored
PyObject_Del and PyObject_GC_Del can now be used as a function designators.
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Neil Schemenauer authored
designators. Remove PyMalloc_New.
-
Neil Schemenauer authored
compatibility function. Make PyObject_GC_Track and PyObject_GC_UnTrack functions instead of trivial macros wrapping functions. Provide binary compatibility functions.
-