Commit 7077033
authored
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 <clalancette@gmail.com>1 parent acf97aa commit 7077033
1 file changed
+24
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 167 | | |
169 | 168 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
194 | 177 | | |
195 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
196 | 192 | | |
197 | 193 | | |
198 | 194 | | |
| |||
0 commit comments