Skip to content

Fixed bpo-29565: Corrected ctypes passing of large structs by value o… #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2017
Merged

Conversation

vsajip
Copy link
Member

@vsajip vsajip commented Feb 21, 2017

…n Windows AMD64. (#168)

Closed bpo-29565: Corrected ctypes passing of large structs by value.

(cherry picked from commit a86339b)

…n Windows AMD64. (#168)

* Fixed bpo-29565: Corrected ctypes passing of large structs by value.

Added code and test to check that when a structure passed by value
is large enough to need to be passed by reference, a copy of the
original structure is passed. The callee updates the passed-in value,
and the test verifies that the caller's copy is unchanged. A similar
change was also added to the test added for bpo-20160 (that test was
passing, but the changes should guard against regressions).

* Reverted unintended whitespace changes.

(cherry picked from commit a86339b)
@codecov
Copy link

codecov bot commented Feb 21, 2017

Codecov Report

❗ No coverage uploaded for pull request base (3.5@9ab8eaf). Click here to learn what that means.
The diff coverage is 100%.

@@          Coverage Diff           @@
##             3.5     #221   +/-   ##
======================================
  Coverage       ?   82.41%           
======================================
  Files          ?     1404           
  Lines          ?   341474           
  Branches       ?        0           
======================================
  Hits           ?   281440           
  Misses         ?    60034           
  Partials       ?        0
Impacted Files Coverage Δ
Lib/ctypes/test/test_callbacks.py 94.59% <100%> (ø)
Lib/ctypes/test/test_structures.py 97.01% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ab8eaf...b133b27. Read the comment docs.

Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thing about ctypes not changing often is it gets really easy to review backports ;)

@vsajip vsajip merged commit 8fa7e22 into python:3.5 Feb 22, 2017
@vsajip vsajip deleted the 3.5 branch February 22, 2017 06:20
@vsajip vsajip restored the 3.5 branch February 22, 2017 06:20
akruis pushed a commit to akruis/cpython that referenced this pull request Jul 1, 2019
These numbers were already 64bit if available until the relevant
preprocessor macro was renamed. This change affects Stackless structures
PyStacklessState and PyCStackObject. Extension authors usually don't
access them directly.
akruis pushed a commit to akruis/cpython that referenced this pull request May 27, 2021
These numbers were already 64bit if available until the relevant
preprocessor macro was renamed. This change affects Stackless structures
PyStacklessState and PyCStackObject. Extension authors usually don't
access them directly.
(cherry picked from commit ce8faba)
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
Replace legacy API implementation with files()
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants