-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Update catom to use fastcalls #232
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
=======================================
Coverage 97.67% 97.67%
=======================================
Files 24 24
Lines 1074 1074
Branches 162 162
=======================================
Hits 1049 1049
Misses 12 12
Partials 13 13 |
I think CAtom_setstate needs reworked, idk what I was doing back then... |
atom/src/catom.cpp
Outdated
{ | ||
if( PyTuple_GET_SIZE( args ) != 1 ) | ||
return cppy::type_error( "__setstate__() takes exactly one argument" ); | ||
PyObject* state = PyTuple_GET_ITEM( args, 0 ); | ||
cppy::ptr itemsptr = PyMapping_Items(state); |
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.
Do we need a PyMapping_Check
before this?
That said, PyMapping_Check
doesn't even check for items()
.
Should we force it to be a dict
?
Some of the below logic is questionable and may need some attention. I don't think that __setstate__
should trigger observers, which means it shouldn't go thru the __setattr__
protocol.
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.
I agree with everything except the __setstate__
method. I think that should be handled in a separate PR where we fix/agree on the behavior of that method.
5cb71b2
to
d12ce27
Compare
Agree, I amended it to remove those changes. |
No description provided.