Update main.c

This commit is contained in:
blueloveTH 2025-12-09 23:44:56 +08:00
parent d2d4bfa29b
commit 5fd00512bf

View File

@ -94,9 +94,8 @@ int main(int argc, char** argv) {
char* source = read_file(filename); char* source = read_file(filename);
if(source) { if(source) {
if(!py_exec(source, filename, EXEC_MODE, NULL)) if(!py_exec(source, filename, EXEC_MODE, NULL)) py_printexc();
py_printexc();
else {
if(profile) { if(profile) {
char* json_report = py_profiler_report(); char* json_report = py_profiler_report();
FILE* report_file = fopen("profiler_report.json", "w"); FILE* report_file = fopen("profiler_report.json", "w");
@ -106,7 +105,6 @@ int main(int argc, char** argv) {
} }
PK_FREE(json_report); PK_FREE(json_report);
} }
}
PK_FREE(source); PK_FREE(source);
} }