Thomas Heller
100a4e944b
Make sure the _ctypes extension can be compiled when WITH_THREAD is
...
not defined on Windows, even if that configuration is probably not
supported at all.
2006-07-19 09:09:32 +00:00
Brett Cannon
caebe22038
Fix bug #1520914 . Starting in 2.4, time.strftime() began to check the bounds
...
of values in the time tuple passed in. Unfortunately people came to rely on
undocumented behaviour of setting unneeded values to 0, regardless of if it was
within the valid range. Now those values force the value internally to the
minimum value when 0 is passed in.
2006-07-18 04:41:36 +00:00
Neal Norwitz
5eaf772980
Fix memory leaks in some conditions.
...
Reported by Klocwork #152 .
2006-07-16 02:15:27 +00:00
Neal Norwitz
109f91414f
proto was dereffed above and is known to be good. No need for X.
...
Reported by Klocwork, #39 .
2006-07-16 02:05:35 +00:00
Neal Norwitz
ce5b3c3188
self is dereffed (and passed as first arg), so it's known to be good.
...
func is returned from PyArg_ParseTuple and also dereffed.
Reported by Klocwork, #30 (self one at least).
2006-07-16 02:02:57 +00:00
Thomas Heller
ce049a0aef
Patch #1521817 : The index range checking on ctypes arrays containing
...
exactly one element is enabled again.
2006-07-14 17:51:14 +00:00
Thomas Heller
9f902470da
Make the prototypes of our private PyUnicode_FromWideChar and
...
PyUnicode_AsWideChar replacement functions compatible to the official
functions by using Py_ssize_t instead of int.
2006-07-14 15:01:05 +00:00
Thomas Heller
b4dc2ef5da
A misspelled preprocessor symbol caused ctypes to be always compiled
...
without thread support. Replaced WITH_THREADS with WITH_THREAD.
2006-07-13 09:53:47 +00:00
Georg Brandl
9dceedbb97
Accept long options "--help" and "--version".
2006-07-12 15:31:17 +00:00
Neal Norwitz
41efc14498
Fix function name in error msg
2006-07-12 05:26:35 +00:00
Thomas Heller
3b9be2ae6f
Change the ctypes version number to 1.0.0.
2006-07-11 18:40:50 +00:00
Anthony Baxter
93ab5fa191
#1494314 : Fix a regression with high-numbered sockets in 2.4.3. This
...
means that select() on sockets > FD_SETSIZE (typically 1024) work again.
The patch makes sockets use poll() internally where available.
2006-07-11 02:04:09 +00:00
Thomas Heller
7644262aa5
Assigning None to pointer type structure fields possible overwrote
...
wrong fields.
2006-07-10 11:11:10 +00:00
Thomas Heller
7b1da513fd
Fixed a segfault when ctypes.wintypes were imported on
...
non-Windows machines.
2006-07-10 09:31:06 +00:00
Thomas Heller
dda068dee1
Fix bug #1518190 : accept any integer or long value in the
...
ctypes.c_void_p constructor.
2006-07-10 09:10:28 +00:00
Neal Norwitz
2a30cd0ef0
Patch #1516912 : improve Modules support for OpenVMS.
2006-07-10 01:18:57 +00:00
Thomas Heller
5becdbee96
Patch #1517790 : It is now possible to use custom objects in the ctypes
...
foreign function argtypes sequence as long as they provide a
from_param method, no longer is it required that the object is a
ctypes type.
2006-07-06 08:48:35 +00:00
Thomas Heller
43d9a58dfd
Revert the change done in svn revision 47206:
...
Add a new function uses_seh() to the _ctypes extension module. This
will return True if Windows Structured Exception handling (SEH) is
used when calling functions, False otherwise.
2006-07-06 07:50:18 +00:00
Fred Drake
24a0f41d83
- back out Expat change; the final fix to Expat will be different
...
- change the pyexpat wrapper to not be so sensitive to this detail of the
Expat implementation (the ex-crasher test still passes)
2006-07-06 05:13:22 +00:00
Thomas Heller
9ba7ca8229
Fix the bitfield test when _ctypes is compiled with MingW. Structures
...
containing bitfields may have different layout on MSVC and MingW .
2006-07-05 09:13:56 +00:00
Ronald Oussoren
b4a6a566ff
Sync the darwin/x86 port libffi with the copy in PyObjC. This fixes a number
...
of bugs in that port. The most annoying ones were due to some subtle differences
between the document ABI and the actual implementation :-(
(there are no python unittests that fail without this patch, but without it
some of libffi's unittests fail).
2006-07-04 12:30:22 +00:00
Kristján Valur Jónsson
74c3ea0a0f
Fix build problems with the platform SDK on windows. It is not sufficient to test for the C compiler version when determining if we have the secure CRT from microsoft. Must test with an undocumented macro, __STDC_SECURE_LIB__ too.
2006-07-03 14:59:05 +00:00
Thomas Heller
f780be4239
Add a new function uses_seh() to the _ctypes extension module. This
...
will return True if Windows Structured Exception handling (SEH) is
used when calling functions, False otherwise.
Currently, only MSVC supports SEH.
Fix the test so that it doesn't crash when run with MingW compiled
_ctypes. Note that two tests are still failing when mingw is used, I
suspect structure layout differences and function calling conventions
between MSVC and MingW.
2006-07-03 08:08:14 +00:00
Thomas Heller
638f7addf3
Fixes so that _ctypes can be compiled with the MingW compiler.
...
It seems that the definition of '__attribute__(x)' was responsible for
the compiler ignoring the '__fastcall' attribute on the
ffi_closure_SYSV function in libffi_msvc/ffi.c, took me quite some
time to figure this out.
2006-07-03 08:04:05 +00:00
Thomas Heller
dd854e917f
Cleanup: Remove commented out code.
2006-07-03 07:58:09 +00:00
Martin v. Löwis
ee1e06d497
Correct arithmetic in access on Win32. Fixes #1513646 .
2006-07-02 18:44:00 +00:00
Gerhard Häring
762fbd3485
The sqlite3 module did cut off data from the SQLite database at the first null
...
character before sending it to a custom converter. This has been fixed now.
2006-07-02 17:48:30 +00:00
Fred Drake
6ffe499397
SF bug #1296433 (Expat bug #1515266 ): Unchecked calls to character data
...
handler would cause a segfault. This merges in Expat's lib/xmlparse.c
revisions 1.154 and 1.155, which fix this and a closely related problem
(the later does not affect Python).
Moved the crasher test to the tests for xml.parsers.expat.
2006-07-01 16:28:20 +00:00
Tim Peters
08612926a1
Remove now-unused fidding with PY_FORMAT_SIZE_T.
2006-06-30 18:34:51 +00:00
Thomas Heller
730199275a
Revert the use of PY_FORMAT_SIZE_T in PyErr_Format.
2006-06-30 17:44:54 +00:00
Neal Norwitz
3f2748e775
Silence compiler warning
2006-06-30 07:32:16 +00:00
Thomas Heller
bde081329b
Protect the thread api calls in the _ctypes extension module within
...
#ifdef WITH_THREADS/#endif blocks. Found by Sam Rushing.
2006-06-29 18:34:15 +00:00
Neal Norwitz
0f8b31a2da
Fix bug #1512695 : cPickle.loads could crash if it was interrupted with
...
a KeyboardInterrupt since PyTuple_Pack was passed a NULL.
Will backport.
2006-06-28 06:28:31 +00:00
Trent Mick
624af829a7
[ 1295808 ] expat symbols should be namespaced in pyexpat
...
(http://python.org/sf/1295808 )
2006-06-19 23:57:41 +00:00
Trent Mick
f08d663a2f
Upgrade pyexpat to expat 2.0.0 ( http://python.org/sf/1462338 ).
2006-06-19 23:21:25 +00:00
Gerhard Häring
ecd2010951
Fixed a memory leak that was introduced with incorrect usage of the Python weak
...
reference API in pysqlite 2.2.1.
Bumbed pysqlite version number to upcoming pysqlite 2.3.1 release.
2006-06-19 21:17:35 +00:00
Walter Dörwald
4994d9546c
Patch #1506645 : add Python wrappers for the curses functions
...
is_term_resized, resize_term and resizeterm. This uses three
separate configure checks (one for each function).
2006-06-19 08:07:50 +00:00
Neal Norwitz
e75cad6125
Fix memory leak reported by valgrind while running test_subprocess
2006-06-17 22:38:15 +00:00
Neal Norwitz
fe7d0c3bc6
Speculative checkin (requires approval of Gerhard Haering)
...
This backs out the test changes in 46962 which prevented crashes
by not running the tests via a version check. All the version checks
added in that rev were removed from the tests.
Code was added to the error handler in connection.c that seems
to work with older versions of sqlite including 3.1.3.
2006-06-15 04:54:29 +00:00
Gerhard Häring
b2e8816403
- Added version checks in C code to make sure we don't trigger bugs in older
...
SQLite versions.
- Added version checks in test suite so that we don't execute tests that we
know will fail with older (buggy) SQLite versions.
Now, all tests should run against all SQLite versions from 3.0.8 until 3.3.6
(latest one now). The sqlite3 module can be built against all these SQLite
versions and the sqlite3 module does its best to not trigger bugs in SQLite,
but using SQLite 3.3.3 or later is recommended.
2006-06-14 22:28:37 +00:00
Martin v. Löwis
d825143be1
Patch #1455898 : Incremental mode for "mbcs" codec.
2006-06-14 05:21:04 +00:00
Gerhard Häring
1541ef08af
Merged changes from external pysqlite 2.3.0 release. Documentation updates will
...
follow in a few hours at the latest. Then we should be ready for beta1.
2006-06-13 22:24:47 +00:00
Brett Cannon
6d7db6ecc4
Remove unused variable.
2006-06-13 16:06:55 +00:00
Andrew MacIntyre
9291332de1
Patch #1454481 : Make thread stack size runtime tunable.
...
Heavily revised, comprising revisions:
46640 - original trunk revision (backed out in r46655)
46647 - markup fix (backed out in r46655)
46692:46918 merged from branch aimacintyre-sf1454481
branch tested on buildbots (Windows buildbots had problems
not related to these changes).
2006-06-13 15:04:24 +00:00
Thomas Heller
c2da994585
Add pep-291 compatibility markers.
2006-06-12 20:56:48 +00:00
Kristján Valur Jónsson
f608317061
Fix the CRT argument error handling for VisualStudio .NET 2005. Install a CRT error handler and disable the assertion for debug builds. This causes CRT to set errno to EINVAL.
...
This update fixes crash cases in the test suite where the default CRT error handler would cause process exit.
2006-06-12 15:45:12 +00:00
Nick Coghlan
81f444bb8e
Make the -m switch conform to the documentation of sys.path by behaving like the -c switch
2006-06-12 10:17:11 +00:00
Thomas Heller
ee3ea5418e
I don't know how that happend, but the entire file contents was
...
duplicated. Thanks to Simon Percivall for the heads up.
2006-06-12 06:05:57 +00:00
Martin v. Löwis
70ee3ccd1e
Get rid of function pointer cast.
2006-06-12 04:26:31 +00:00
Neal Norwitz
6e73aaab47
Patch #1503046 , Conditional compilation of zlib.(de)compressobj.copy
...
copy is only in newer versions of zlib. This should allow zlibmodule
to work with older versions like the Tru64 buildbot.
2006-06-12 03:33:09 +00:00