Chore: script built

This commit is contained in:
yaling888
2021-10-21 20:22:23 +08:00
parent cbea46b0c8
commit 63d07db4bf
17 changed files with 139 additions and 249 deletions

View File

@@ -37,8 +37,6 @@ void init_python(const char *path) {
import can be deferred until the embedded script
imports it. */
clash_module = PyImport_ImportModule("clash");
main_fn = load_func(CLASH_SCRIPT_MODULE_NAME, "main");
}
// Load function, same as "import module_name.func_name as obj" in Python
@@ -87,6 +85,10 @@ void py_clear(PyObject *obj) {
Py_CLEAR(obj);
}
void load_main_func() {
main_fn = load_func(CLASH_SCRIPT_MODULE_NAME, "main");
}
/** callback function, that call go function by python3 script. **/
resolve_ip_callback resolve_ip_callback_fn;