Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-127183: Add_ctypes.CopyComPointer tests#127184
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
f48bcf1 to638487bCompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you.
I seeCopyComPointer is undocumented. Would you be willing to add some documentation for it as well?
| dst_orig=create_shelllink_persist(self.IPersist) | ||
| dst=self.IPersist() | ||
| CopyComPointer(dst_orig,byref(dst)) | ||
| dst_orig.Release()# The refcount of `dst_orig` is 1 here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could the refcount be checked usingRelease's return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Indeed, since this assertion is not costly, it is better to simply callassertEqual than to leave a comment about it.
I have changed these lines.
That's my intention, but as discussed ingh-126686, I believe publicizing it is also necessary for proper documentation. Before moving forward with documentation or publicizing, I want to backport this test to 3.13 and 3.12, where |
c7f1e3e intopython:mainUh oh!
There was an error while loading.Please reload this page.
* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
GH-127251 is a backport of this pull request to the3.13 branch. |
* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
GH-127252 is a backport of this pull request to the3.12 branch. |
Makes sense. Thank you for the test! |
…127251)gh-127183: Add `_ctypes.CopyComPointer` tests (GH-127184)* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
…127252)gh-127183: Add `_ctypes.CopyComPointer` tests (GH-127184)* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.(cherry picked from commitc7f1e3e)Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
* Make `create_shelllink_persist` top level function.* Add `CopyComPointerTests`.* Add more tests.* Update tests.* Add assertions for `Release`'s return value.
Uh oh!
There was an error while loading.Please reload this page.
I would like to backport this to 3.12 and 3.13 as well.
This is internal-only, so I don’t think it needs a NEWS entry.
_ctypes.CopyComPointer. #127183