summaryrefslogtreecommitdiff
path: root/swig
diff options
context:
space:
mode:
authorDuncan Mac-Vicar P <dmacvicar@suse.de>2007-12-05 15:45:39 +0000
committerDuncan Mac-Vicar P <dmacvicar@suse.de>2007-12-05 15:45:39 +0000
commitf6208345c58add73cc8038b62c77b6a97cf2a3e9 (patch)
treea6ae7cf2677296367d009d81427ccfdaed91ed3b /swig
parentd665f322eca9b7b753e79c1eae949d8e7986aad7 (diff)
downloadlibzypp-bindings-f6208345c58add73cc8038b62c77b6a97cf2a3e9.tar.gz
libzypp-bindings-f6208345c58add73cc8038b62c77b6a97cf2a3e9.tar.bz2
libzypp-bindings-f6208345c58add73cc8038b62c77b6a97cf2a3e9.zip
When using shared .i files across language bindings use #idef SWIG_LANG
so the directves are not included in other languages (which fails) or use a per-language file for them.
Diffstat (limited to 'swig')
-rw-r--r--swig/ResTraits.i43
-rw-r--r--swig/zypp.i12
2 files changed, 28 insertions, 27 deletions
diff --git a/swig/ResTraits.i b/swig/ResTraits.i
index d58e827..fb165df 100644
--- a/swig/ResTraits.i
+++ b/swig/ResTraits.i
@@ -15,24 +15,25 @@ template<typename _Res>
%template(ResTraitsResolvable) ResTraits<Resolvable>;
-%pythoncode
-{
- def KindOfPackage():
- return KindOfResolvable( "package" )
- def KindOfSrcPackage():
- return KindOfResolvable( "srcpackage" )
- def KindOfPatch():
- return KindOfResolvable( "patch" )
- def KindOfPattern():
- return KindOfResolvable( "pattern" )
- def KindOfProduct():
- return KindOfResolvable( "product" )
- def KindOfAtom():
- return KindOfResolvable( "atom" )
- def KindOfScript():
- return KindOfResolvable( "script" )
- def KindOfMessage():
- return KindOfResolvable( "message" )
- def KindOfLanguage():
- return KindOfResolvable( "language" )
-}
+#ifdef SWIGPYTHON
+%pythoncode %{
+def KindOfPackage():
+ return KindOfResolvable( "package" )
+def KindOfSrcPackage():
+ return KindOfResolvable( "srcpackage" )
+def KindOfPatch():
+ return KindOfResolvable( "patch" )
+def KindOfPattern():
+ return KindOfResolvable( "pattern" )
+def KindOfProduct():
+ return KindOfResolvable( "product" )
+def KindOfAtom():
+ return KindOfResolvable( "atom" )
+def KindOfScript():
+ return KindOfResolvable( "script" )
+def KindOfMessage():
+ return KindOfResolvable( "message" )
+def KindOfLanguage():
+ return KindOfResolvable( "language" )
+%}
+#endif
diff --git a/swig/zypp.i b/swig/zypp.i
index 4375d7f..72ed0e6 100644
--- a/swig/zypp.i
+++ b/swig/zypp.i
@@ -13,12 +13,12 @@
%{
/* Includes the header in the wrapper code */
#include "zypp/base/PtrTypes.h"
-#include <zypp/Edition.h>
-#include <zypp/ResTraits.h>
-#include <zypp/ResStore.h>
-#include <zypp/ZYppFactory.h>
-#include <zypp/ZYpp.h>
-#include <zypp/Pathname.h>
+#include "zypp/Edition.h"
+#include "zypp/ResTraits.h"
+#include "zypp/ResStore.h"
+#include "zypp/ZYppFactory.h"
+#include "zypp/ZYpp.h"
+#include "zypp/Pathname.h"
#include "zypp/base/ReferenceCounted.h"
#include "zypp/ResObject.h"
#include "zypp/ResPoolManager.h"