- still does not compile but at least
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 20 Feb 2008 09:26:33 +0000 (09:26 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 20 Feb 2008 09:26:33 +0000 (09:26 +0000)
swig does not hang on the python part

swig/ResPool.i
swig/ZYppFactory.i
swig/python/CMakeLists.txt
swig/python/python.i

index f929c10..b7f42d0 100644 (file)
@@ -1,4 +1,4 @@
-
+namespace zypp {
 %apply unsigned { ResPool::size_type };
 
 %nodefault ResPool;
@@ -7,6 +7,8 @@
 %ignore ResPool::byNameBegin;
 %ignore ResPool::byNameEnd;
 
+
+
 class ResPool
   {
     friend std::ostream & operator<<( std::ostream & str, const ResPool & obj );
@@ -41,16 +43,10 @@ class ResPool
       /**  */
       size_type size() const;
 
-      /** \name Iterate through all PoolItems (all kinds). */
-      //@{
-      /** */
-      const_iterator begin() const
-      { return make_filter_begin( pool::ByPoolItem(), store() ); }
       /** */
-      const_iterator end() const
-      { return make_filter_end( pool::ByPoolItem(), store() ); }
-      //@}
-
+      const_iterator begin() const;
+      const_iterator end() const;
+      
     public:
       /** Return the corresponding \ref PoolItem.
        * Pool and sat pool should be in sync. Returns an empty
@@ -366,3 +362,5 @@ iter3(ResPool, PoolItem*);
 }
 
 #endif
+
+}
index 971137f..f1f28fa 100644 (file)
@@ -1,4 +1,7 @@
 
+namespace zypp
+{
 %template(ZYpp_Ptr) intrusive_ptr<ZYpp>;
+}
 
 %include <zypp/ZYppFactory.h>
index 52a66b3..c48fd2a 100644 (file)
@@ -16,7 +16,7 @@ SET( SWIG_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/zypp.i" )
 ADD_CUSTOM_COMMAND (
    OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx
    COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for python..."
-   COMMAND ${SWIG_EXECUTABLE} -DZYPP_DEPRECATED -c++ -python  -o ${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx -I${ZYPP_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../zypp.i
+   COMMAND ${SWIG_EXECUTABLE} -v -DZYPP_DEPRECATED -c++ -python  -o ${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx -I${ZYPP_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../zypp.i
    COMMAND ${CMAKE_COMMAND} -E echo "Done."
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i ${CMAKE_CURRENT_SOURCE_DIR}/*.i
index 522adea..6984736 100644 (file)
@@ -12,9 +12,21 @@ namespace zypp
 
     // Just to avoid warnings.
     %ignore operator<<;
+  namespace repo
+  {
+      // These operators must be ignored otherwise the wrapper does
+      // not compile (using swig 1.3.29).
+      %ignore operator==;
+      %ignore operator!=;
+  
+      // Just to avoid warnings.
+      %ignore operator<<;
+  }
+
 }
 
 
+
 %define iter( cls )
 %extend cls {
     %pythoncode %{