| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Followup to #20460 (comment) |
Sorry, something went wrong.
| if (PyDict_CheckExact(dict)) { | ||
| // Argh this sucks | ||
| if (PyDict_Check(stuff) || _CPyObject_HasAttr(stuff, mypyc_interned_str.keys)) { | ||
| if (PyDict_Check(stuff)|| PyObject_HasAttrWithError(stuff, mypyc_interned_str.keys)) { |
There was a problem hiding this comment.
Wouldn't this return -1 on failure which would be bad and trigger the if? (when would that failure be...)
I'm not very familiar with C so maybe I'm wrong :/
Sorry, something went wrong.
There was a problem hiding this comment.
Wouldn't this return -1 on failure
Yes, but that's already returned from _CPyObject_HasAttr on failure as well.
https://docs.python.org/3/c-api/object.html#c.PyObject_GetOptionalAttr
Sorry, something went wrong.
There was a problem hiding this comment.
I guess if you want minimal PRs this can be fixed in a followup then...
Sorry, something went wrong.
There was a problem hiding this comment.
Just pushed a new commit to explicitly check for > 0. That should resolve that issue as well.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://docs.python.org/3/c-api/object.html#c.PyObject_HasAttrWithError