406 Commits

Author SHA1 Message Date
Serhiy Storchaka
fa25f16a44 Expand the PySlice_GetIndicesEx macro. (#1023) (#1045)
(cherry picked from commit b879fe82e7)
2017-04-08 11:18:30 +03:00
Vinay Sajip
ae0915e42d Closes bpo-29939: suppress compiler warnings in _ctypes_test (#1039)
Changed test code to suppress a compiler warning, while taking care to avoid the code being optimized out by the compiler.
(cherry picked from commit 164d30eb1e)
2017-04-07 23:24:51 +01:00
Vinay Sajip
8fa7e22134 Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) (#221)
Fixed bpo-29565: Corrected ctypes passing of large structs by value.
(cherry picked from commit a86339b83f)
2017-02-22 06:19:55 +00: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
144f77a981 Issue #28715: Added error checks for PyUnicode_AsUTF8(). 2016-11-20 08:47:21 +02: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
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
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
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
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
886a5f352f Issue #27343: Fixed error message for conflicting initializers of ctypes.Structure. 2016-06-18 09:58:24 +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
adef6460d7 Issue #27330: Fixed possible leaks in the ctypes module. 2016-06-16 22:08:46 +03:00
Martin Panter
a90a4a9651 Issue #27125: Remove duplicated words from documentation and comments 2016-05-30 04:04:50 +00:00
Martin Panter
2dc1bbb659 Remove outdated PEP 291 compatibility requirement comment 2016-05-14 05:55:38 +00:00
Serhiy Storchaka
6a7b3a77b4 Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
Serhiy Storchaka
57a01d3a0e Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
2016-04-10 18:05:40 +03:00
Serhiy Storchaka
48842714b9 Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:45:48 +03:00
Martin Panter
1bb651540e Issue #25498: Fix GC crash due to ctypes objects wrapping a memoryview
This was a regression caused by revision 1da9630e9b7f.  Based on patch by
Eryksun.
2015-11-13 21:43:39 +00:00