plugins: python-renderer: Implement first gds_render built-in module with a get_number function
This commit is contained in:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user