Add finalize function as exported function to external renderer and use it in the main app after rendering

This commit is contained in:
2019-11-16 22:44:41 +01:00
parent c7ceef7d66
commit cf2947d2d5
5 changed files with 36 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
#include <stdio.h>
#include <glib.h>
#include <Python.h>
#include <gds-render/gds-utils/gds-types.h>
#include <gds-render/output-renderers/external-renderer-interfaces.h>
@@ -14,6 +16,11 @@ int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList
int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
{
PyObject *p_module_name;
printf("Init with params: %s\ngds-render version: %s\n", params, version);
Py_Initialize();
return 0;
}