plugins: python-renderer: Implement first gds_render built-in module with a get_number function

This commit is contained in:
2019-11-17 15:42:17 +01:00
parent 71b500e030
commit aa7f5b4745
3 changed files with 41 additions and 0 deletions

View File

@@ -88,12 +88,20 @@ int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *ve
PyObject *p_name;
PyObject *p_sys_path;
PyObject *p_cwd_string;
PyObject *gds_render_module;
char cwd[256];
if (!params || !version)
return -1000;
printf("Init with params: %s\ngds-render version: %s\n", params, version);
ret = PyImport_AppendInittab("gds_render", &init_gds_render_module);
if (ret) {
fprintf(stderr, "Registration of gds_render python module failed\n");
goto return_value;
}
Py_Initialize();
if (!getcwd(cwd, sizeof(cwd))) {