| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Use PyTuple_Size() instead of PyTuple_GET_SIZE().
|
Issue found while converting syslog to the limited C API. |
Sorry, something went wrong.
| nargs = 'PyTuple_Size(args)' | ||
| else: | ||
| nargs = 'PyTuple_GET_SIZE(args)' | ||
| add(f"switch ({nargs}) {{\n") |
There was a problem hiding this comment.
Style suggestion -- because of the f-strings needing the duplication of {, perhaps just being explicit in both cases would be worth it?
| nargs = 'PyTuple_Size(args)' | |
| else: | |
| nargs = 'PyTuple_GET_SIZE(args)' | |
| add(f"switch ({nargs}) {{\n") | |
| add("switch (PyTuple_Size(args)) {\n") | |
| else: | |
| add("switch (PyTuple_GET_SIZE(args)) {\n") |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, other than @AA-Turner's style nit, which I agree with :)
Sorry, something went wrong.
|
Merged, thanks for reviews. I prefer to avoid repetition even if the f-string is just a little bit surprising. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Use PyTuple_Size() instead of PyTuple_GET_SIZE().