plugins: python renderer: Fix broken code due to merge. Functions of plugins now have to be exported explicitly.
This commit is contained in:
parent
bd4d91807b
commit
246695610c
@ -18,6 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
#define EXPORT_FUNC __attribute__((visibility("default")))
|
#define EXPORT_FUNC __attribute__((visibility("default")))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This define is used to export a variable symbol from a shared object
|
||||||
|
*/
|
||||||
|
#define EXPORT_VAR EXPORT_FUNC
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Function name expected to be found in external library for rendering.
|
* @brief Function name expected to be found in external library for rendering.
|
||||||
*
|
*
|
||||||
@ -63,8 +68,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Define for declaring exported variables
|
* @brief Define for declaring exported variables
|
||||||
|
*
|
||||||
|
* This not only helps with the declaration but also makes the symbols visible, so they can be accessed form outside the library
|
||||||
*/
|
*/
|
||||||
#define VAR_DECL(VAR) VAR
|
#define EXPORTED_VAR_DECL(VAR) EXPORT_VAR VAR
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FUNC_DECL(EXTERNAL_LIBRARY_FINALIZE_FUNCTION)(void)
|
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_FINALIZE_FUNCTION)(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
|
|
||||||
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
||||||
|
|
||||||
const int VAR_DECL(EXTERNAL_LIBRARY_FORK_REQUEST) = 0;
|
/* The precense of this variable tells the gds-render application to execute this plugin in a separate process
|
||||||
|
* The variable's value is don't care
|
||||||
|
*/
|
||||||
|
const int EXPORTED_VAR_DECL(EXTERNAL_LIBRARY_FORK_REQUEST) = 1;
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
*/
|
*/
|
||||||
static PyObject *p_module = NULL;
|
static PyObject *p_module = NULL;
|
||||||
|
|
||||||
int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
PyObject *p_render_func;
|
PyObject *p_render_func;
|
||||||
@ -83,7 +83,7 @@ return_value:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
|
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
PyObject *p_name;
|
PyObject *p_name;
|
||||||
@ -157,7 +157,7 @@ return_value:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FUNC_DECL(EXTERNAL_LIBRARY_FINALIZE_FUNCTION)(void)
|
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_FINALIZE_FUNCTION)(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user