From: <and...@us...> - 2008-12-10 11:55:09
|
Revision: 9077 http://plplot.svn.sourceforge.net/plplot/?rev=9077&view=rev Author: andrewross Date: 2008-12-10 11:55:03 +0000 (Wed, 10 Dec 2008) Log Message: ----------- Fix up a couple of visibility issues with python. Modified Paths: -------------- trunk/bindings/gnome2/python/CMakeLists.txt trunk/bindings/gnome2/python/cplplotcanvas.override trunk/bindings/gnome2/python/cplplotcanvasmodule.c trunk/bindings/python/CMakeLists.txt trunk/bindings/python/plplot_widgetmodule.c trunk/include/pldll.h trunk/include/plplotcanvas.h Modified: trunk/bindings/gnome2/python/CMakeLists.txt =================================================================== --- trunk/bindings/gnome2/python/CMakeLists.txt 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/bindings/gnome2/python/CMakeLists.txt 2008-12-10 11:55:03 UTC (rev 9077) @@ -95,7 +95,7 @@ set_source_files_properties( ${gcwmodule_SRCS} ${cplplotcanvasmodule_SRCS} PROPERTIES COMPILE_FLAGS -"${gcw_COMPILE_FLAGS} ${PYGCW_CFLAGS}" +"${gcw_COMPILE_FLAGS} ${PYGCW_CFLAGS} -DUSINGDLL" ) include_directories( Modified: trunk/bindings/gnome2/python/cplplotcanvas.override =================================================================== --- trunk/bindings/gnome2/python/cplplotcanvas.override 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/bindings/gnome2/python/cplplotcanvas.override 2008-12-10 11:55:03 UTC (rev 9077) @@ -60,7 +60,7 @@ %% %%modulename c_plplotcanvas %% -import gnome.canvas.Canvas as PyGnomeCanvas_Type +import gnomecanvas.Canvas as PyGnomeCanvas_Type %% ignore-glob *_get_type Modified: trunk/bindings/gnome2/python/cplplotcanvasmodule.c =================================================================== --- trunk/bindings/gnome2/python/cplplotcanvasmodule.c 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/bindings/gnome2/python/cplplotcanvasmodule.c 2008-12-10 11:55:03 UTC (rev 9077) @@ -30,11 +30,13 @@ #define PY_ARRAY_UNIQUE_SYMBOL plplotcanvasapi #include "Numeric/arrayobject.h" - + +#include "plplot.h" + void cplplotcanvas_register_classes (PyObject *d); extern PyMethodDef cplplotcanvas_functions[]; -DL_EXPORT(void) +PLDLLIMPEXP_CPLPLOTCANVASMODULE DL_EXPORT(void) initcplplotcanvas(void) { PyObject *m, *d; Modified: trunk/bindings/python/CMakeLists.txt =================================================================== --- trunk/bindings/python/CMakeLists.txt 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/bindings/python/CMakeLists.txt 2008-12-10 11:55:03 UTC (rev 9077) @@ -72,6 +72,12 @@ add_library(plplot_widgetmodule MODULE plplot_widgetmodule.c) set_target_properties(plplot_widgetmodule PROPERTIES PREFIX "") +set_source_files_properties( + plplot_widgetmodule.c + PROPERTIES COMPILE_FLAGS + "-DUSINGDLL" +) + target_link_libraries(plplot_widgetmodule plplot${LIB_TAG} ${PYTHON_LIBRARIES}) if(USE_RPATH) set_target_properties( Modified: trunk/bindings/python/plplot_widgetmodule.c =================================================================== --- trunk/bindings/python/plplot_widgetmodule.c 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/bindings/python/plplot_widgetmodule.c 2008-12-10 11:55:03 UTC (rev 9077) @@ -90,7 +90,7 @@ {NULL, NULL, 0, NULL} }; -void initplplot_widget(void) +PLDLLIMPEXP_PLPLOT_WIDGETMODULE void initplplot_widget(void) { PyObject *m; PyObject *d; Modified: trunk/include/pldll.h =================================================================== --- trunk/include/pldll.h 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/include/pldll.h 2008-12-10 11:55:03 UTC (rev 9077) @@ -123,4 +123,20 @@ #define PLDLLIMPEXP_GNOME2_DATA(type) PLDLLIMPORT type #endif +#if defined(cplplotcanvasmodule_EXPORTS) + #define PLDLLIMPEXP_CPLPLOTCANVASMODULE PLDLLEXPORT + #define PLDLLIMPEXP_CPLPLOTCANVASMODULE_DATA(type) PLDLLEXPORT type +#else + #define PLDLLIMPEXP_CPLPLOTCANVASMODULE PLDLLIMPORT + #define PLDLLIMPEXP_CPLPLOTCANVASMODULE_DATA(type) PLDLLIMPORT type +#endif + +#if defined(plplot_widgetmodule_EXPORTS) + #define PLDLLIMPEXP_PLPLOT_WIDGETMODULE PLDLLEXPORT + #define PLDLLIMPEXP_PLPLOT_MODULE_DATA(type) PLDLLEXPORT type +#else + #define PLDLLIMPEXP_PLPLOT_MODULE PLDLLIMPORT + #define PLDLLIMPEXP_PLPLOT_MODULE_DATA(type) PLDLLIMPORT type +#endif + #endif /* __PL_DLL_H */ Modified: trunk/include/plplotcanvas.h =================================================================== --- trunk/include/plplotcanvas.h 2008-12-10 11:30:22 UTC (rev 9076) +++ trunk/include/plplotcanvas.h 2008-12-10 11:55:03 UTC (rev 9077) @@ -64,7 +64,7 @@ GnomeCanvasClass parent; }; -GType plplot_canvas_get_type(); +PLDLLIMPEXP_GNOME2 GType plplot_canvas_get_type(); PLDLLIMPEXP_GNOME2 PlplotCanvas* plplot_canvas_new(); PLDLLIMPEXP_GNOME2 void plplot_canvas_devinit(PlplotCanvas* self); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |