Serhiy Storchaka
5ab81d787f
Issue #28959 : Added private macro PyDict_GET_SIZE for retrieving the size of dict.
2016-12-16 16:18:57 +02:00
Victor Stinner
5670764812
Use _PyObject_CallMethodIdObjArgs() in _ctypes
...
Issue #28915 : Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() in unpickle(). _PyObject_CallMethodIdObjArgs()
avoids the creation of a temporary tuple and doesn't have to parse a format
string.
Replace _PyObject_CallMethodId() with _PyObject_GetAttrId()+PyObject_Call() for
the second call since it requires to "unpack" a tuple.
Add also a check in the type of the second parameter (state): it must be a
tuple.
2016-12-09 15:18:31 +01:00
Victor Stinner
070c4d7ca7
Issue #28915 : Use _PyObject_CallNoArg()
...
Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func).
2016-12-09 12:29:18 +01:00
Victor Stinner
f17c3de263
Use _PyObject_CallNoArg()
...
Replace:
PyObject_CallFunctionObjArgs(callable, NULL)
with:
_PyObject_CallNoArg(callable)
2016-12-06 18:46:19 +01:00
Victor Stinner
a5ed5f000a
Use _PyObject_CallNoArg()
...
Replace:
PyObject_CallObject(callable, NULL)
with:
_PyObject_CallNoArg(callable)
2016-12-06 18:45:50 +01:00
Martin Panter
7d6e9232b1
Issue #25659 : Merge ctypes fix from 3.6
2016-11-20 22:17:44 +00:00
Martin Panter
04b35753f7
Issue #25659 : Merge ctypes fix from 3.5
2016-11-20 22:07:29 +00:00
Serhiy Storchaka
85b0f5beb1
Added the const qualifier to char* variables that refer to readonly internal
...
UTF-8 represenatation of Unicode objects.
2016-11-20 10:16:47 +02:00
Martin Panter
6e723d2d11
Issue #25659 : Change assert to TypeError in from_buffer/_copy()
...
Based on suggestion by Eryk Sun.
2016-11-20 07:58:35 +00:00
Serhiy Storchaka
a98c4a984b
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
...
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-20 09:13:40 +02:00
Serhiy Storchaka
06515833fe
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
...
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-20 09:13:07 +02:00
Serhiy Storchaka
f6f1591808
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:48:30 +02:00
Serhiy Storchaka
e20973926a
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:48:07 +02:00
Serhiy Storchaka
144f77a981
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:47:21 +02:00
Ned Deily
ae8ca1c0e2
Issue #24381 : merge from 3.6
2016-10-20 15:40:56 -04:00
Ned Deily
82919ec44f
Issue #24381 : merge from 3.5
2016-10-20 15:40:22 -04:00
Ned Deily
f536af1fcd
Issue #24381 : Avoid unused function warning when building bundled macOS libffi.
...
Patch by Vajrasky Kok.
2016-10-20 15:38:27 -04:00
Zachary Ware
f40d4ddff3
Closes #27979 : Remove bundled copy of libffi
...
An installed copy of libffi is now required for building _ctypes on
any platform but OSX and Windows.
2016-09-17 01:25:24 -05:00
Martin Panter
6d57fe1c23
Issue #28139 : Fix messed up indentation
...
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
2016-09-17 03:26:16 +00:00
Martin Panter
0be894b2f6
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
2016-09-07 12:03:06 +00:00
Martin Panter
be8da9c990
Issue #27570 : Avoid zero-length memcpy() calls with null source pointers
2016-09-07 11:04:41 +00:00
Benjamin Peterson
5130a4d5d7
Backed out changeset 8b6be1341770
2016-09-05 17:22:09 -07:00
Benjamin Peterson
6d999803a0
remove long double from ctypes value union
...
It is unused. It also forces a 16-byte alignment, which creates problems because
Python's allocator only uses 8-byte alignment.
2016-09-05 16:24:52 -07:00
Benjamin Peterson
c235af47f1
fix a PY_LONG_LONG straggler
2016-09-08 09:25:03 -07:00
Benjamin Peterson
47ff0734b8
more PY_LONG_LONG to long long
2016-09-08 09:15:54 -07:00
Martin Panter
1c748f3830
Issue #27570 : Merge null pointer fixes from 3.5
2016-09-07 23:31:39 +00:00
Benjamin Peterson
840ef8f84b
more linux -> __linux__
2016-09-07 14:45:10 -07:00
Benjamin Peterson
a9296e7f3b
require C99 bool
2016-09-07 11:06:17 -07:00
Steve Dower
a439191efa
Fix some warnings from MSVC
2016-09-06 19:09:15 -07:00
Benjamin Peterson
ed4aa83ff7
require a long long data type ( closes #27961 )
2016-09-05 17:44:18 -07:00
Benjamin Peterson
f3dd32950b
merge 3.5
2016-09-05 17:22:22 -07:00
Benjamin Peterson
63604032af
merge 3.5
2016-09-05 16:27:08 -07:00
Larry Hastings
10108a7b9a
Issue #27355 : Removed support for Windows CE. It was never finished,
...
and Windows CE is no longer a relevant platform for Python.
2016-09-05 15:11:23 -07:00
Raymond Hettinger
15f44ab043
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
2016-08-30 10:47:49 -07:00
Vinay Sajip
a9391a4522
Closes #20160 : Merged fix from 3.5.
2016-08-05 21:44:52 +01:00
Vinay Sajip
0b588869ee
Issue #20160 : Merged fix from 3.4.
2016-08-05 21:44:15 +01:00
Vinay Sajip
a0b2568627
Issue #20160 : Merged fix from 3.3.
2016-08-05 21:43:25 +01:00
Vinay Sajip
6f25003291
Issue #20160 : Handled passing of large structs to callbacks correctly.
2016-08-05 21:24:27 +01:00
Martin Panter
8bde911115
Issue #27626 : Merge spelling fixes from 3.5
2016-07-28 01:30:58 +00:00
Martin Panter
eb9957065a
Issue #27626 : Spelling fixes in docs, comments and internal names
...
Based on patch by Ville Skyttä.
2016-07-28 01:11:04 +00:00
Victor Stinner
2561726aa6
Merge 3.5 (issue #11048 )
2016-07-27 16:59:22 +02:00
Victor Stinner
e33797b686
ctypes: fix CThunkObject_new()
...
* Initialize restype and flags fields to fix a crash when Python runs on a
read-only file system
* Use Py_ssize_t type rather than int for the "i" iterator variable
* Reorder assignements to be able to more easily check if all fields are
initialized
Issue #11048 . Initial patch written by Marcin Bachry.
2016-07-27 16:58:47 +02:00
Serhiy Storchaka
d91e676fd5
Issue #27343 : Fixed error message for conflicting initializers of ctypes.Structure.
2016-06-18 09:58:55 +03:00
Serhiy Storchaka
886a5f352f
Issue #27343 : Fixed error message for conflicting initializers of ctypes.Structure.
2016-06-18 09:58:24 +03:00
Serhiy Storchaka
d4b45cb9ca
ctypes: the type of b_size is Py_ssize_t.
2016-06-17 11:13:03 +03:00
Serhiy Storchaka
85e6635edf
ctypes: the type of b_size is Py_ssize_t.
2016-06-17 11:11:07 +03:00
Serhiy Storchaka
74108614b1
Issue #27330 : Fixed possible leaks in the ctypes module.
2016-06-16 22:10:13 +03:00
Serhiy Storchaka
adef6460d7
Issue #27330 : Fixed possible leaks in the ctypes module.
2016-06-16 22:08:46 +03:00
Martin Panter
e2e71685f3
Issue #27171 : Fix typo in exception message
2016-06-02 10:13:47 +00:00
Martin Panter
e514093a2f
Issue #27125 : Merge typo fixes from 3.5
2016-05-30 05:24:49 +00:00