-
Notifications
You must be signed in to change notification settings - Fork 958
Add new dictionary functions and extern declarations #5947
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
Open
clin1234
wants to merge
20
commits into
PyO3:main
Choose a base branch
from
clin1234:patch-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+59
−11
Open
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2bc751b
Add new dictionary functions and extern declarations
clin1234 607ecf2
Add PyDict_SetDefaultRef function declaration
clin1234 f093984
Create 5947.added.md
clin1234 6807fcc
Fix syntax errors in dictobject.rs configuration flags
clin1234 fb3a9a1
Reorder imports in dictobject.rs
clin1234 728a911
Update PyDict_SetDefaultRef and PyDict_Pop signatures
clin1234 59c92c4
Fix pointer type in PyDict_SetDefaultRef function
clin1234 81ec769
Fmt
clin1234 0c1b437
Fix conditional compilation directive for PyDict_SetDefaultRef
clin1234 73cb54b
Update conditional compilation for PyDict_SetDefaultRef
clin1234 8067d5c
Change key parameter type from char to c_char
clin1234 85df96f
Update imports for Python version compatibility
clin1234 30f89df
Fix typo in import statement for c_int
clin1234 614c268
Reintroduce PyDict_SetDefaultRef for Python 3.15
clin1234 87b4dd1
Fix cfg attribute syntax in dictobject.rs
clin1234 e493c64
Reorganize use statements in dictobject.rs
clin1234 3ac9a04
Remove PyObject_GenericGetDict declaration
clin1234 b268453
Remove unused c_void import in dictobject.rs
clin1234 bfdbe1b
Update PyDict_SetDefaultRef for Python 3.13 compatibility
clin1234 d8ff2f7
Comment out PyDict_SetDefaultRef function
clin1234 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| Added the following functions: | ||
|
|
||
| * pub fn PyDict_SetDefault(mp: *mut PyObject, key: *mut PyObject, default_obj: *mut PyObject) -> *mut PyObject; | ||
| * pub fn PyDict_SetDefaultRef(mp: *mut PyObject, key: *mut PyObject, default_obj: *mut PyObject, result: **mut PyObject) -> c_int; | ||
| * pub fn PyDict_ContainsString(mp: *mut PyObject, key: *const char) -> c_int; | ||
| * pub fn PyDict_Pop(dict: *mut PyObject, key: *mut PyObject, result: **mut PyObject) -> c_int; | ||
| * pub fn PyDict_PopString(dict: *mut PyObject, key: *const c_char, result: **mut PyObject) -> c_int; | ||
| * pub fn PyDict_ClearWatcher(watcher_id: c_int) -> c_int; | ||
| * pub fn PyDict_Watch(watcher_id: c_int, dict: *mut PyObject) -> c_int; | ||
| * pub fn PyDict_Unwatch(watcher_id: c_int, dict: *mut PyObject) -> c_int; | ||
| * pub fn PyFrozenDict_New(iterable: *mut PyObject) -> *mut PyObject; |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
sorry, forgot to talk about about pypy and graalpy. Have you checked if these functions are defined there?
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.
I don't use either PyPy or GraalPy, so I can't tell you if these functions are used by either
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.
Please place these functions in the correct locations in the file (makes it easier to compare against upstream in the future).