| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2509,16 +2509,16 @@ PyAPI_FUNC(void) PyUnstable_PerfMapState_Fini(void) { | |||
| 2509 | 2509 | ||
| 2510 | 2510 | PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename) { | |
| 2511 | 2511 | #ifndef MS_WINDOWS | |
| 2512 | - FILE* from = fopen(parent_filename, "r"); | ||
| 2513 | - if (!from) { | ||
| 2514 | - return -1; | ||
| 2515 | - } | ||
| 2516 | 2512 | if (perf_map_state.perf_map == NULL) { | |
| 2517 | 2513 | int ret = PyUnstable_PerfMapState_Init(); | |
| 2518 | 2514 | if (ret != 0) { | |
| 2519 | 2515 | return ret; | |
| 2520 | 2516 | } | |
| 2521 | 2517 | } | |
| 2518 | + FILE* from = fopen(parent_filename, "r"); | ||
| 2519 | + if (!from) { | ||
| 2520 | + return -1; | ||
| 2521 | + } | ||
| 2522 | 2522 | char buf[4096]; | |
| 2523 | 2523 | PyThread_acquire_lock(perf_map_state.map_lock, 1); | |
| 2524 | 2524 | int fflush_result = 0, result = 0; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments