Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Matthew Brush matt@geany.org Date: Wed, 13 Nov 2013 03:02:35 UTC Commit: add44778fd12390b57b5f8741aa6e4ebd23c85d5 https://github.com/geany/geany-plugins/commit/add44778fd12390b57b5f8741aa6e4...
Log Message: ----------- GeanyPy: Fix build with -fno-common: use extern and NO_IMPORT_PYGOBJECT
Define global variables as extern in the header files to fix build with the gcc option -fno-common. Also, define NO_IMPORT_PYGOBJECT and NO_IMPORT_PYGTK for PyGTK as this also fails to build with linker errors if the headers are included multiple times.
Closes #120
Modified Paths: -------------- geanypy/src/geanypy-editor.h geanypy/src/geanypy-encoding.h geanypy/src/geanypy-plugin.c geanypy/src/geanypy-project.h geanypy/src/geanypy-scintilla.h geanypy/src/geanypy-uiutils.h geanypy/src/geanypy.h
Modified: geanypy/src/geanypy-editor.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,7 @@ #ifndef GEANYPY_EDITOR_H__ #define GEANYPY_EDITOR_H__
-PyTypeObject IndentPrefsType; +extern PyTypeObject IndentPrefsType;
typedef struct {
Modified: geanypy/src/geanypy-encoding.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,7 @@ #ifndef GEANYPY_ENCODING_H__ #define GEANYPY_ENCODING_H__
-PyTypeObject EncodingType; +extern PyTypeObject EncodingType;
typedef struct {
Modified: geanypy/src/geanypy-plugin.c 2 files changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,8 @@ * MA 02110-1301, USA. */
+#define INCLUDE_PYGOBJECT_ONCE_FULL + #include "geanypy.h"
G_MODULE_EXPORT GeanyPlugin *geany_plugin;
Modified: geanypy/src/geanypy-project.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,7 @@ #ifndef GEANYPY_PROJECT_H__ #define GEANYPY_PROJECT_H__
-PyTypeObject ProjectType; +extern PyTypeObject ProjectType;
typedef struct {
Modified: geanypy/src/geanypy-scintilla.h 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -1,8 +1,8 @@ #ifndef GEANYPY_SCINTILLA_H__ #define GEANYPY_SCINTILLA_H__
-PyTypeObject NotificationType; -PyTypeObject NotifyHeaderType; +extern PyTypeObject NotificationType; +extern PyTypeObject NotifyHeaderType;
typedef struct {
Modified: geanypy/src/geanypy-uiutils.h 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -1,8 +1,8 @@ #ifndef GEANYPY_UI_UTILS_H__ #define GEANYPY_UI_UTILS_H__
-PyTypeObject InterfacePrefsType; -PyTypeObject MainWidgetsType; +extern PyTypeObject InterfacePrefsType; +extern PyTypeObject MainWidgetsType;
typedef struct {
Modified: geanypy/src/geanypy.h 9 files changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -75,6 +75,15 @@ #include <string.h>
#include <gtk/gtk.h> + +/* necessary for compilation with -fno-common, + * see https://bugzilla.gnome.org/show_bug.cgi?id=610657 for details, + * INCLUDE_PYGOBJECT_ONCE_FULL is set only once in geanypy-plugin.c */ +#ifndef INCLUDE_PYGOBJECT_ONCE_FULL +# define NO_IMPORT_PYGOBJECT +# define NO_IMPORT_PYGTK +#endif + #include <pygobject.h>
#ifndef GEANYPY_WINDOWS
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).