Commit 842c160
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 842c160
1 file changed
+17
-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 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
310 | 315 | | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
315 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
316 | 326 | | |
317 | 327 | | |
318 | 328 | | |
| |||
3901 | 3911 | | |
3902 | 3912 | | |
3903 | 3913 | | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
3904 | 3918 | | |
3905 | 3919 | | |
3906 | 3920 | | |
| |||
0 commit comments