Thomas Heller
91ac42243c
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
...
See also https://bugs.launchpad.net/bugs/72505 .
Ported from release25-maint branch.
2007-10-19 18:11:41 +00:00
Neal Norwitz
c740d834ee
Get rid of warnings on a bunch of platforms by using a proper prototype.
2007-10-12 03:01:30 +00:00
Thomas Heller
49c7c71d9f
Remove unneeded #include.
2007-09-07 09:30:40 +00:00
Thomas Heller
2825b2ea44
Add a 'c_longdouble' type to the ctypes module.
2007-09-07 06:32:17 +00:00
Matthias Klose
38336406eb
- Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*.
2007-09-04 20:46:02 +00:00
Thomas Wouters
dcb3c382ac
Somewhat-preliminary slice-object and extended slicing support for ctypes.
...
The exact behaviour of omitted and negative indices for the Pointer type may
need a closer look (especially as it's subtly different from simple slices)
but there's time yet before 2.6, and not enough before 3.0a1 :-)
2007-08-30 21:01:17 +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
Thomas Heller
fe31d77dc0
PyType_stgdict() returns a borrowed reference which must not be
...
Py_DECREF'd.
2007-07-13 19:51:55 +00:00
Thomas Heller
ef4fff3435
Fix for SF# 1649098: avoid zero-sized array declaration in structure.
2007-07-13 17:46:54 +00:00
Thomas Heller
1421b00162
Repair COMError. Since exceptions are new style classes now, setting
...
the methods and docstring after the type creation does not work, they
must be in the dictionary before creating the type.
2007-07-13 13:59:39 +00:00
Thomas Heller
410c3b58c9
Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k"
...
or "K" codes.
2007-06-11 15:58:33 +00:00
Thomas Heller
ea7f88e3d9
Fix warnings by using proper function prototype.
2007-06-08 19:14:23 +00:00
Thomas Heller
6088f24df2
Fix gcc warnings intruduced by passing Py_ssize_t to PyErr_Format calls.
2007-06-08 19:01:06 +00:00
Thomas Heller
e81c9f6d5e
[ 1715718 ] x64 clean compile patch for _ctypes, by Kristj?n Valur
...
with small modifications.
2007-06-08 18:20:09 +00:00
Thomas Heller
601aa414b2
Fix compiler warnings.
2007-05-30 06:58:30 +00:00
Thomas Heller
1ad576c267
Do not truncate 64-bit pointers to 32-bit integers.
...
Fixes SF #1703286 , will backport to release25-maint.
2007-05-04 19:54:22 +00:00
Thomas Heller
db3bfdf141
On 64-bit Windows, ffi_arg must be 8 bytes long. This fixes the
...
remaining crashes in the ctypes tests, when functions return float or
double types.
2007-05-04 08:20:41 +00:00
Thomas Heller
9b73d0aed5
Don't truncate pointers to integers (on win64 platform).
2007-05-03 12:05:20 +00:00
Thomas Heller
68bb9a1418
When accessing the .value attribute of a c_wchar_p instance, and the
...
instance does not point to a valid wchar_t zero-terminated string,
raise a ValueError. c_char_p does this already.
The ValueError message now contains the correct pointer address.
Will backport to release25-maint.
2007-04-30 16:04:57 +00:00
Thomas Heller
5a901bd3cc
Make sure to call PyErr_NoMemory() in several places where
...
PyMem_Malloc() could potentially fail.
Will backport to the release25-maint branch.
2007-04-30 15:44:17 +00:00
Kristján Valur Jónsson
17b8e97e2e
Merge change 54909 from release25-maint: Fix several minor issues discovered using code analysis in VisualStudio 2005 Team Edition
2007-04-25 00:10:50 +00:00
Thomas Heller
e6a7039451
Prevent creation (followed by a segfault) of array types when the size
...
overflows the valid Py_ssize_t range. Check return values of
PyMem_Malloc.
Will backport to release25-maint.
2007-03-23 19:55:27 +00:00
Thomas Heller
82730f8d11
Explain the purpose of the b_needsfree flag (forward ported from release25-maint).
2007-03-22 20:34:37 +00:00
Thomas Heller
f493cbd824
Back out "Patch #1643874 : memory leak in ctypes fixed."
...
The code in this patch leaves no way to give up the ownership of a
BSTR instance.
2007-03-22 19:44:31 +00:00
Thomas Heller
5dc4fe09b7
Patch #1649190 : Adding support for _Bool to ctypes as c_bool, by David Remahl.
2007-03-13 20:42:52 +00:00