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

Use NULL for zero-argument PyObject_CallMethod format #1100

Merged
merged 1 commit into from
May 19, 2020

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented May 19, 2020

This PR is a minor refactor changing the format for PyObject_CallMethod calls with no arguments from "()" to NULL.

Fixes #1099.

May conflict with #1086. I'll hold off merging this until after #1086 is merged.

if (value == NULL) {
return -1;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Drive-by spacing consistency nitpicks.

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2020

Codecov Report

Merging #1100 into master will decrease coverage by 2.32%.
The diff coverage is 66.40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1100      +/-   ##
==========================================
- Coverage   76.15%   73.83%   -2.33%     
==========================================
  Files          54       75      +21     
  Lines        6493     8357    +1864     
  Branches     1263     1592     +329     
==========================================
+ Hits         4945     6170    +1225     
- Misses       1205     1807     +602     
- Partials      343      380      +37     
Impacted Files Coverage Δ
traits/api.py 100.00% <ø> (+9.67%) ⬆️
traits/base_trait_handler.py 61.76% <ø> (ø)
traits/has_traits.py 72.40% <ø> (-0.37%) ⬇️
traits/observers/_i_notifier.py 0.00% <0.00%> (ø)
traits/observers/events.py 0.00% <0.00%> (ø)
traits/traits.py 75.10% <ø> (-2.45%) ⬇️
traits/util/resource.py 15.25% <ø> (ø)
traits/observers/_generated_parser.py 51.96% <51.96%> (ø)
traits/trait_types.py 72.29% <80.00%> (-0.16%) ⬇️
traits/observers/parsing.py 95.34% <95.34%> (ø)
... and 51 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef2483d...4f552c2. Read the comment docs.

Copy link
Contributor

@kitchoi kitchoi left a comment

Choose a reason for hiding this comment

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

LGTM

@mdickinson mdickinson merged commit 928caa7 into master May 19, 2020
@mdickinson mdickinson deleted the fix/call-method-no-args branch May 19, 2020 09:28
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.

Fix uses of "()" format string in PyObject_CallMethod
3 participants