| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you.
I see CopyComPointer is undocumented. Would you be willing to add some documentation for it as well?
Sorry, something went wrong.
| 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.
Could the refcount be checked using Release's return value?
Sorry, something went wrong.
There was a problem hiding this comment.
Indeed, since this assertion is not costly, it is better to simply call assertEqual than to leave a comment about it.
I have changed these lines.
Sorry, something went wrong.
That's my intention, but as discussed in gh-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 CopyComPointer, albeit private, already exists. |
Sorry, something went wrong.
* Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value. (cherry picked from commit c7f1e3e) Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
|
GH-127251 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
* Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value. (cherry picked from commit c7f1e3e) Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
|
GH-127252 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
|
Makes sense. Thank you for the test! |
Sorry, something went wrong.
…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 commit c7f1e3e) 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 commit c7f1e3e) 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.
| Back | FazBrowse Home | New Git URL |
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.