-
Notifications
You must be signed in to change notification settings - Fork 22
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
[break] Refactor call API #179
Conversation
} | ||
defer argsPy.decref(); | ||
|
||
// TODO(ngates): avoid creating empty dict for kwargs |
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.
it's valid to pass NULL for kwargs in PyObject_Call
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.
Yeah I know, we just don't atm
pydust/src/builtins.zig
Outdated
} | ||
defer kwargsPy.decref(); | ||
|
||
// We _must_ return a PyObject to the user to let them handle the lifetime of the object. |
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.
This comment is wrong now?
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.
Oh, hmm.... the comment is actually valid...
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.
Added a comment to address pass the buck
Callable objects can now be called using
py.call
andpy.call0
, and thePyObject.call
methods now take a method name argument.