Commit Graph

76 Commits

Author SHA1 Message Date
Benjamin Peterson 80b59054c6 #4763 PyErr_ExceptionMatches won't blow up with NULL arguments 2008-12-28 21:16:07 +00:00
Alexandre Vassalotti e7d1e7e5d4 Document Py_VaBuildValue. 2008-12-28 02:58:22 +00:00
Georg Brandl 50ae9e7e75 #4682: 'b' is actually unsigned char. 2008-12-27 19:02:59 +00:00
Benjamin Peterson 1c39785256 less attitude 2008-12-22 20:44:58 +00:00
Christian Heimes c70e5f9975 w# requires Py_ssize_t 2008-11-30 21:16:28 +00:00
Gregory P. Smith b07bd10c91 Document PY_SSIZE_T_CLEAN for PyArg_ParseTuple. 2008-11-24 00:41:43 +00:00
Benjamin Peterson 9d1e2cdad6 PyGILState_Acquire -> PyGILState_Ensure 2008-10-10 22:23:41 +00:00
Andrew M. Kuchling 17ff29d061 Markup fix 2008-09-30 13:00:34 +00:00
Benjamin Peterson 14cb6bcf2b sort of backport 66038 by aliasing PyObject_Bytes to PyObject_Str 2008-08-26 17:08:40 +00:00
Nick Coghlan 8e439a16b2 Fix typo 2008-08-18 13:32:19 +00:00
Nick Coghlan 6e8fef07e5 Issue 2235: document PyObject_HashNotImplemented 2008-08-18 13:14:22 +00:00
Benjamin Peterson 4eb993939d fix markup 2008-08-16 03:02:41 +00:00
Martin v. Löwis f91d46a17d Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
by denying s# to parse objects that have a releasebuffer procedure,
and introducing s*.

More module might need to get converted to use s*.
2008-08-12 14:49:50 +00:00
Gregory P. Smith 0470bab697 Issue #2620: Overflow checking when allocating or reallocating memory
was not always being done properly in some python types and extension
modules.  PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
all been updated to perform better checks and places in the code that
would previously leak memory on the error path when such an allocation
failed have been fixed.
2008-07-22 04:46:32 +00:00
Benjamin Peterson 90f36730e2 fix various doc typos #3320 2008-07-12 20:16:19 +00:00
Raymond Hettinger 8dbbb96929 Add cautionary note on the use of PySequence_Fast_ITEMS. 2008-07-11 12:00:21 +00:00
Gregory P. Smith 2fe77060eb - Issue #2862: Make int and float freelist management consistent with other
freelists.  Changes their CompactFreeList apis into ClearFreeList apis and
  calls them via gc.collect().
2008-07-06 03:35:58 +00:00
Martin v. Löwis 99815892f6 New environment variable PYTHONIOENCODING. 2008-06-01 07:20:46 +00:00
Benjamin Peterson 31694ae4a5 fix grammar 2008-05-30 20:44:39 +00:00
Georg Brandl 457501bf20 Two fixes in bytearray docs. 2008-05-29 07:18:17 +00:00
Georg Brandl 74a1deaab3 #2989: add PyType_Modified(). 2008-05-28 11:21:39 +00:00
Benjamin Peterson 2b4b5acf18 add PyByteArray docs 2008-05-26 15:54:26 +00:00
Benjamin Peterson 438e9ac4d4 fix a minor typo 2008-05-26 14:29:09 +00:00
Benjamin Peterson 404d182bba note that PyString and has been aliased to PyBytes 2008-05-26 14:02:09 +00:00
Georg Brandl d23f1f2896 Mention version in which the new marshal version was introduced. 2008-05-12 17:48:56 +00:00
Georg Brandl 70dce223d4 Marshal is at version 2. 2008-05-12 17:47:53 +00:00
Georg Brandl 63b0a2eb21 #2727: clarify tp_iternext docs. 2008-04-30 20:02:37 +00:00
Benjamin Peterson fe4948bcef #2700 Document PyNumber_ToBase 2008-04-27 18:14:39 +00:00
Benjamin Peterson a692c4df63 Added PyErr_WarnPy3k function. (issue 2671) I will be converting current Py3k warnings to the use of this function soon. 2008-04-27 02:28:02 +00:00
Georg Brandl 78b3ee8c7b #2691: document PyLong (s)size_t APIs, patch by Alexander Belopolsky. 2008-04-26 18:31:07 +00:00
Gregory P. Smith aa63d0d4af Make file objects as thread safe as the underlying libc FILE* implementation.
close() will now raise an IOError if any operations on the file object
are currently in progress in other threads.

Most code was written by Antoine Pitrou (pitrou).  Additional testing,
documentation and test suite cleanup done by me (gregory.p.smith).

Fixes issue 815646 and 595601 (as well as many other bugs and
references to this problem dating back to the dawn of Python).
2008-04-06 23:11:17 +00:00
Georg Brandl 8ca6c84b6f Phase out has_key usage in the tutorial; correct docs for PyMapping_HasKey*. 2008-03-28 12:22:12 +00:00
Mark Dickinson 0cb3e86c47 Typo: "objects reference count" -> "object's reference count" 2008-03-26 21:41:36 +00:00
Georg Brandl 4ab9febdde #2160: document PyImport_GetImporter. 2008-03-21 20:55:20 +00:00
Georg Brandl 372d55e3e6 #1533486: fix types in refcount intro. 2008-03-08 10:05:24 +00:00
Georg Brandl fd6cabfe21 #2230: document that PyArg_* leaves addresses alone on error. 2008-03-04 07:33:30 +00:00
Georg Brandl 907a720f89 A lot more typo fixes by Ori Avtalion. 2008-02-22 12:31:45 +00:00
Georg Brandl 27cca3cca7 Fix function name. 2008-02-17 15:14:10 +00:00
Christian Heimes 3b718a79af Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
Christian Heimes 422051a367 Patch #1953
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
2008-02-04 18:00:12 +00:00
Amaury Forgeot d'Arc cab3d98ca1 Ensure that PySet_Add() operates on a newly created frozenset, like PyTuple_SetItem does.
Add PyFrozenSet_Check(), which was not needed before; The list of Py*Set_Check* macros seems to be complete now.

Add missing NEWS entries about all this.
2008-02-03 22:51:43 +00:00
Raymond Hettinger e84ada3d95 Factor-out common code with a new macro 2008-01-28 21:48:07 +00:00
Raymond Hettinger ecdcb58950 Make PySet_Add() work with frozensets.
Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Also, PyFrozenSet_New() is now guaranteed to produce a distinct new frozenset.
2008-01-28 20:34:33 +00:00
Christian Heimes 908caac52e Added clear cache methods to clear the internal type lookup cache for ref leak test runs. 2008-01-27 23:34:59 +00:00
Georg Brandl a7364408cd Fix markup again. 2008-01-26 13:41:21 +00:00
Raymond Hettinger dee3f65d98 Revert PySet_Add() changes. 2008-01-26 09:31:11 +00:00
Raymond Hettinger 7c1be2a3b1 Make PySet_Add() work with frozensets. Works like PyTuple_SetItem() to build-up values in a brand new frozenset. 2008-01-26 08:19:06 +00:00
Christian Heimes 74b8e76ec1 Don't repeat yourself
Added the macros PyModule_AddIntMacro and PyModule_AddStringMacro. They shorten PyModule_AddIntConstant(m, "AF_INET", AF_INET) to PyModule_AddIntMacro(m, AF_INET)
2008-01-22 15:25:18 +00:00
Georg Brandl 27f7ab725b #1219903: fix tp_richcompare docs. 2008-01-20 19:48:40 +00:00
Georg Brandl 79e3d55be4 Missed one big file to split up. 2008-01-19 22:14:27 +00:00