Commit 45c02dc
Address review: handle import_get_module errors in race condition fix
Add error checking inside the `if (mod_check != mod)` block to properly
handle the case where import_get_module itself fails with an exception.
Also refactor PyImport_GetModule to use an error label for cleanup.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 0a682cd commit 45c02dc
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
| 300 | + | |
303 | 301 | | |
304 | 302 | | |
305 | 303 | | |
306 | 304 | | |
307 | 305 | | |
308 | 306 | | |
309 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
316 | 322 | | |
317 | 323 | | |
318 | 324 | | |
| |||
3901 | 3907 | | |
3902 | 3908 | | |
3903 | 3909 | | |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
3904 | 3914 | | |
3905 | 3915 | | |
3906 | 3916 | | |
| |||
0 commit comments