FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add PyMapping_HasKeyWithError() function by vstinner · Pull Request #73 · python/pythoncapi-compat · GitHub

Add PyMapping_HasKeyWithError() function - #73

Merged
vstinner merged 2 commits into
mainfrom
mapping_hasattr
Sep 19, 2023
Merged

Add PyMapping_HasKeyWithError() function#73
vstinner merged 2 commits into
mainfrom
mapping_hasattr

Conversation

Copy link
Copy Markdown
Member

Add PyMapping_HasKeyWithError() and PyMapping_HasKeyStringWithError() functions.

Fix also undefined behavior in PyMapping_GetOptionalItemString() when PyUnicode_FromString() fails: set '*result' to NULL.

Add PyMapping_HasKeyWithError() and PyMapping_HasKeyStringWithError()
functions.

Fix also undefined behavior in PyMapping_GetOptionalItemString() when
PyUnicode_FromString() fails: set '*result' to NULL.

Copy link
Copy Markdown
Member Author

cc @serhiy-storchaka

Copy link
Copy Markdown
Member Author

Then I will add:

  • PyObject_HasAttrWithError()
  • PyObject_HasAttrStringWithError()

Comment thread tests/test_pythoncapi_compat_cext.c Outdated
Comment on lines +53 to +54
// Marker to check that pointer value was set
#define UNINITIALIZED_OBJ ((PyObject *)"uninitialized")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

vstinner merged commit 309c56d into main Sep 19, 2023
vstinner deleted the mapping_hasattr branch September 19, 2023 12:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL