Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp how we check for the correct class. (#218)
* Revamp how we check for the correct class. In an issue it was pointed out that we are decref'ing before we actually use some of the data, which means that in theory the garbage collector could reclaim the data before we used it. So the original point of this change was to fix that issue. However, while looking at it I realized we could slightly improve performance here by avoiding a copy of the class and module into a combined string. Instead, we can compare them separately, which should reduce the copies. * Fix a warning when building in Release mode. Since the variables are only used in an assert, which can be compiled out, this could lead to a warning. Inline the call instead, which should get rid of the warning. Signed-off-by: Chris Lalancette <[email protected]>
- Loading branch information