diff options
author | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2007-12-05 15:45:39 +0000 |
---|---|---|
committer | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2007-12-05 15:45:39 +0000 |
commit | f6208345c58add73cc8038b62c77b6a97cf2a3e9 (patch) | |
tree | a6ae7cf2677296367d009d81427ccfdaed91ed3b /swig | |
parent | d665f322eca9b7b753e79c1eae949d8e7986aad7 (diff) | |
download | libzypp-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.i | 43 | ||||
-rw-r--r-- | swig/zypp.i | 12 |
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" |