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
Antoine Pitrou
016b366df4
#3205 : bz2 iterator fails silently on MemoryError
2008-08-09 17:22:25 +00:00
Gregory P. Smith
3b1e6b2f83
- Issue #3309 : Fix bz2.BZFile itererator to release its internal lock
...
properly when raising an exception due to the bz2file being closed.
Prevents a deadlock.
2008-07-07 04:31:58 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Gregory P. Smith
73bee444ab
fix compiler warnings
2008-04-12 20:37:48 +00:00
Gregory P. Smith
c20adf8ef2
Use the new PyFile_IncUseCount & PyFile_DecUseCount calls appropriatly
...
within the standard library. These modules use PyFile_AsFile and later
release the GIL while operating on the previously returned FILE*.
2008-04-07 06:33:21 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Sean Reifscheider
8335acbf24
issue1597011: Fix for bz2 module corner-case error due to error checking bug.
2007-09-17 05:45:04 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Georg Brandl
a47337fba5
Bug #1622896 : fix a rare corner case where the bz2 module raised an
...
error in spite of a succesful compression.
2007-03-13 12:34:25 +00:00
Andrew M. Kuchling
44b054b84a
[Patch #1615868 by Lars Gustaebel] Use Py_off_t to fix BZ2File.seek() for offsets > 2Gb
2006-12-18 19:22:24 +00:00
Neal Norwitz
d3f91908dd
Remove extra semi-colons reported by Johnny Lee on python-dev. Backport if anyone cares.
2006-09-23 04:11:38 +00:00
Georg Brandl
3335a7ad63
Patch #1535500 : fix segfault in BZ2File.writelines and make sure it
...
raises the correct exceptions.
2006-08-14 21:42:55 +00:00
Neal Norwitz
b59d08c2fb
Fix more memory allocation issues found with failmalloc.
2006-07-22 16:20:49 +00:00
Neal Norwitz
2a30cd0ef0
Patch #1516912 : improve Modules support for OpenVMS.
2006-07-10 01:18:57 +00:00
Neal Norwitz
047f3c7ffa
Fix some Py_ssize_t issues
2006-06-12 02:06:42 +00:00
Martin v. Löwis
15e62742fa
Revert backwards-incompatible const changes.
2006-02-27 16:46:16 +00:00
Neal Norwitz
093ab1aa03
Remove unused variable
2006-02-18 23:26:27 +00:00
Georg Brandl
47fab92542
Bug #1366000 : cleanup BZ2File.seek() logic. Fixes the case of whence=2, offset>=0.
2006-02-18 21:57:25 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Neal Norwitz
1ac754fa10
Check return result from Py_InitModule*(). This API can fail.
...
Probably should be backported.
2006-01-19 06:09:39 +00:00
Neal Norwitz
20bad74d63
SF Bug #1407069 , Remove extra semi-colon if there is no long long
2006-01-17 05:27:39 +00:00
Jeremy Hylton
af68c874a6
Add const to several API functions that take char *.
...
In C++, it's an error to pass a string literal to a char* function
without a const_cast(). Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.
I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc. Predictably, there were a large set of functions that
needed to be fixed as a result of these changes. The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
One cast was required as a result of the changes: A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
2005-12-10 18:50:16 +00:00
Georg Brandl
a8bcecc872
bug [ 1274069 ] bz2module.c compiler warning
2005-09-03 07:49:53 +00:00