Compare commits
No commits in common. "ce8386799b26605177710330a6295f766255136c" and "3651296c3ace5b715bda86e7fbb31e83cc7bb942" have entirely different histories.
ce8386799b
...
3651296c3a
@ -13,11 +13,6 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This define is used to export a function from a shared object
|
|
||||||
*/
|
|
||||||
#define EXPORT_FUNC __attribute__((visibility("default")))
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Function name expected to be found in external library for rendering.
|
* @brief Function name expected to be found in external library for rendering.
|
||||||
*
|
*
|
||||||
@ -42,15 +37,14 @@
|
|||||||
*
|
*
|
||||||
* The pure presence of this symbol name causes forking. The content of this variable is don't care.
|
* The pure presence of this symbol name causes forking. The content of this variable is don't care.
|
||||||
* @note Use this if you mess with the internal structures of gds-render
|
* @note Use this if you mess with the internal structures of gds-render
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request
|
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Define for declaring the exported functions.
|
* @brief Define for declaring the exported functions
|
||||||
*
|
|
||||||
* This not only helps with the declaration but also makes the symbols visible, so they can be called form outside the library
|
|
||||||
*/
|
*/
|
||||||
#define EXPORTED_FUNC_DECL(FUNC) EXPORT_FUNC FUNC
|
#define FUNC_DECL(FUNC) FUNC
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -10,5 +10,3 @@ link_libraries(${PYTHON_LDFLAGS} version)
|
|||||||
|
|
||||||
add_library(${PROJECT_NAME} SHARED EXCLUDE_FROM_ALL ${SOURCES})
|
add_library(${PROJECT_NAME} SHARED EXCLUDE_FROM_ALL ${SOURCES})
|
||||||
add_dependencies(${PROJECT_NAME} version)
|
add_dependencies(${PROJECT_NAME} version)
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES C_VISIBILITY_PRESET hidden)
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <gds-render/gds-utils/gds-types.h>
|
#include <gds-render/gds-utils/gds-types.h>
|
||||||
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
||||||
|
|
||||||
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
||||||
{
|
{
|
||||||
if (!toplevel)
|
if (!toplevel)
|
||||||
return -1000;
|
return -1000;
|
||||||
@ -40,7 +40,7 @@ int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplev
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
|
int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
|
||||||
{
|
{
|
||||||
printf("Init with params: %s\ngds-render version: %s\n", params, version);
|
printf("Init with params: %s\ngds-render version: %s\n", params, version);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user