[rhythmbox] Avoid getting duplicate PyGtk-related symbols.



commit ab102ef5a954eb87354c3467d1a35c8fa596242b
Author: Charles Reiss <woggling gmail com>
Date:   Sun Feb 21 18:44:51 2010 -0800

    Avoid getting duplicate PyGtk-related symbols.
    
    Defines NO_IMPORT_{PYGOBJECT,PYGTK} everywhere pygobject.h or
    pygtk.h (respectively) are included except for shell/rb-python-module.c.
    This avoids problems with duplicate _PyGObject_API and _PyGtk_API symbols
    on platforms (like Darwin) whose linkers do not handle these well.

 bindings/python/override_common.c |    2 ++
 bindings/python/rb.override       |    1 +
 bindings/python/rhythmdb.override |    1 +
 shell/main.c                      |    2 ++
 shell/rb-python-plugin.c          |    1 +
 5 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/bindings/python/override_common.c b/bindings/python/override_common.c
index 5242d14..9876781 100644
--- a/bindings/python/override_common.c
+++ b/bindings/python/override_common.c
@@ -33,6 +33,8 @@
 
 #include "config.h"
 
+#define NO_IMPORT_PYGOBJECT
+#define NO_IMPORT_PYGTK
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
 
diff --git a/bindings/python/rb.override b/bindings/python/rb.override
index 4282aed..4e89d31 100644
--- a/bindings/python/rb.override
+++ b/bindings/python/rb.override
@@ -4,6 +4,7 @@ headers
 #include "config.h"
 
 #define NO_IMPORT_PYGOBJECT
+#define NO_IMPORT_PYGTK
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
 
diff --git a/bindings/python/rhythmdb.override b/bindings/python/rhythmdb.override
index b55888c..cf98d27 100644
--- a/bindings/python/rhythmdb.override
+++ b/bindings/python/rhythmdb.override
@@ -3,6 +3,7 @@ headers
 #include "config.h"
 
 #define NO_IMPORT_PYGOBJECT
+#define NO_IMPORT_PYGTK
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
 
diff --git a/shell/main.c b/shell/main.c
index 6ba9b2f..1f27fee 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -32,6 +32,8 @@
 #ifdef ENABLE_PYTHON
 /* pyconfig.h usually defines _XOPEN_SOURCE */
 #undef _XOPEN_SOURCE
+#define NO_IMPORT_PYGOBJECT
+#define NO_IMPORT_PYGTK
 #include <pygobject.h>
 
 /* make sure it's defined somehow */
diff --git a/shell/rb-python-plugin.c b/shell/rb-python-plugin.c
index e3e1d5a..3217c44 100644
--- a/shell/rb-python-plugin.c
+++ b/shell/rb-python-plugin.c
@@ -35,6 +35,7 @@
 #include "rb-plugin.h"
 #include "rb-debug.h"
 
+#define NO_IMPORT_PYGOBJECT
 #include <pygobject.h>
 #include <string.h>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]