Skip to content
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

Merged
merged 3 commits into from
Oct 4, 2023
Merged

[break] Refactor call API #179

merged 3 commits into from
Oct 4, 2023

Conversation

gatesn
Copy link
Contributor

@gatesn gatesn commented Oct 4, 2023

Callable objects can now be called using py.call and py.call0, and the PyObject.call methods now take a method name argument.

@gatesn gatesn changed the title Refactor call API [break] Refactor call API Oct 4, 2023
@gatesn gatesn enabled auto-merge (squash) October 4, 2023 14:30
}
defer argsPy.decref();

// TODO(ngates): avoid creating empty dict for kwargs
Copy link
Member

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

Copy link
Contributor Author

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

}
defer kwargsPy.decref();

// We _must_ return a PyObject to the user to let them handle the lifetime of the object.
Copy link
Member

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?

Copy link
Contributor Author

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...

Copy link
Contributor Author

@gatesn gatesn Oct 4, 2023

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

@gatesn gatesn merged commit 4af1843 into develop Oct 4, 2023
@gatesn gatesn deleted the ngates/refactor-call-api branch October 4, 2023 15:10
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