mirror of https://github.com/pyodide/pyodide.git
Don't be so pedantic about cleaning up in the main function
This commit is contained in:
parent
50ee86bd36
commit
b42ca205ee
|
@ -54,7 +54,6 @@ main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (PyObject_SetAttrString(sys, "dont_write_bytecode", Py_True)) {
|
if (PyObject_SetAttrString(sys, "dont_write_bytecode", Py_True)) {
|
||||||
Py_DECREF(sys);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,13 +61,10 @@ main(int argc, char** argv)
|
||||||
// importing modules, which saves on filesystem I/O time
|
// importing modules, which saves on filesystem I/O time
|
||||||
PyObject *implementation = PyObject_GetAttrString(sys, "implementation");
|
PyObject *implementation = PyObject_GetAttrString(sys, "implementation");
|
||||||
if (implementation == NULL) {
|
if (implementation == NULL) {
|
||||||
Py_DECREF(sys);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PyObject_SetAttrString(implementation, "cache_tag", Py_None)) {
|
if (PyObject_SetAttrString(implementation, "cache_tag", Py_None)) {
|
||||||
Py_DECREF(implementation);
|
|
||||||
Py_DECREF(sys);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue