From 9eed1ac33d637c3d7783a5407356272b27e8b50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 18 Nov 2019 22:20:18 +0100 Subject: [PATCH] Add header for foced fork variable. Don't know what it is good for yet. But why not... --- .../external-renderer-interfaces.h | 12 ++++++ .../include/python-renderer/force-fork.h | 43 +++++++++++++++++++ plugins/python-renderer/src/force-fork.c | 4 +- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 plugins/python-renderer/include/python-renderer/force-fork.h diff --git a/include/gds-render/output-renderers/external-renderer-interfaces.h b/include/gds-render/output-renderers/external-renderer-interfaces.h index e6f3043..cd8fc37 100644 --- a/include/gds-render/output-renderers/external-renderer-interfaces.h +++ b/include/gds-render/output-renderers/external-renderer-interfaces.h @@ -73,6 +73,18 @@ */ #define EXPORTED_VAR_DECL(VAR) EXPORT_VAR VAR +/** + * @brief Define for declaring variables based on a define expansion + * @note If you want to declare an exported variable use @ref EXPORTED_VAR_DECL + */ +#define VAR_DECL(VAR) VAR + +/** + * @brief Define for declaring functions based on a define expansion + * @note If you want to declare an exported function use @ref EXPORTED_FUNC_DECL + */ +#define FUNC_DECL(FUNC) FUNC + /** @} */ #endif /* __EXTERNAL_RENDERER_INTERFACES_H__ */ diff --git a/plugins/python-renderer/include/python-renderer/force-fork.h b/plugins/python-renderer/include/python-renderer/force-fork.h new file mode 100644 index 0000000..c43f5c4 --- /dev/null +++ b/plugins/python-renderer/include/python-renderer/force-fork.h @@ -0,0 +1,43 @@ +/* + * GDSII-Converter Python Plugin + * Copyright (C) 2019 Mario Hüttel + * + * This file is part of GDSII-Converter. + * + * GDSII-Converter is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * GDSII-Converter is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GDSII-Converter. If not, see . + */ + +/** + * @file force-fork.h + * @brief Header file force fork variabel definition. + * + * This file makes the force fork variable accessible. + * Actually this is kind of useless. However, here it is :) + * @author Mario Hüttel + */ + +#ifndef __PYTHON_PLUGIN_FORCE_FORK_H__ +#define __PYTHON_PLUGIN_FORCE_FORK_H__ + +/** + * @addtogroup python-plugin + * @{ + */ +#include + +extern const int VAR_DECL(EXTERNAL_LIBRARY_FORK_REQUEST); + +/** @} */ + +#endif /* __PYTHON_PLUGIN_FORCE_FORK_H__ */ + diff --git a/plugins/python-renderer/src/force-fork.c b/plugins/python-renderer/src/force-fork.c index 463a756..2e2a96a 100644 --- a/plugins/python-renderer/src/force-fork.c +++ b/plugins/python-renderer/src/force-fork.c @@ -22,13 +22,13 @@ * @author Mario Hüttel */ +#include + /** * @addtogroup python-plugin * @{ */ -#include - /* 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 */