diff options
author | Josef Reidinger <jreidinger@suse.cz> | 2012-06-04 14:03:02 +0000 |
---|---|---|
committer | Josef Reidinger <jreidinger@suse.cz> | 2012-06-04 14:03:02 +0000 |
commit | 8b8ab34fff9c10cdbc65a14aab819351f4ad22ca (patch) | |
tree | 684d424bda9fcf79926009b155b0b91017c159d2 | |
parent | 6e0d2b1074585c1036d9c67f48570f863d8c136b (diff) | |
download | libzypp-bindings-8b8ab34fff9c10cdbc65a14aab819351f4ad22ca.tar.gz libzypp-bindings-8b8ab34fff9c10cdbc65a14aab819351f4ad22ca.tar.bz2 libzypp-bindings-8b8ab34fff9c10cdbc65a14aab819351f4ad22ca.zip |
port ruby bindings to version 1.9
-rw-r--r-- | VERSION.cmake | 2 | ||||
-rw-r--r-- | swig/ruby/std_list.i | 48 | ||||
-rw-r--r-- | swig/ruby/std_set.i | 48 | ||||
-rw-r--r-- | swig/zypp.i | 1 |
4 files changed, 49 insertions, 50 deletions
diff --git a/VERSION.cmake b/VERSION.cmake index 3ddd9bd..45b3cd2 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "0") SET(VERSION_MINOR "5") -SET(VERSION_PATCH "11") +SET(VERSION_PATCH "12") diff --git a/swig/ruby/std_list.i b/swig/ruby/std_list.i index f6d36e6..0d9515c 100644 --- a/swig/ruby/std_list.i +++ b/swig/ruby/std_list.i @@ -48,10 +48,10 @@ namespace std { template<class T> class list { %typemap(in) list<T> { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); $1.push_back(*x); @@ -65,10 +65,10 @@ namespace std { %typemap(in) const list<T>& (std::list<T> temp), const list<T>* (std::list<T> temp) { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1 = &temp; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); temp.push_back(*x); @@ -107,14 +107,14 @@ namespace std { %typecheck(SWIG_TYPECHECK_VECTOR) list<T> { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -135,14 +135,14 @@ namespace std { const list<T>* { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -217,10 +217,10 @@ namespace std { template<class T> class list<T*> { %typemap(in) list<T*> { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1 = std::list<T* >(size); for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); (($1_type &)$1)[i] = x; @@ -234,11 +234,11 @@ namespace std { %typemap(in) const list<T*>& (std::list<T*> temp), const list<T*>* (std::list<T*> temp) { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); temp = std::list<T* >(size); $1 = &temp; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); temp[i] = x; @@ -259,14 +259,14 @@ namespace std { %typecheck(SWIG_TYPECHECK_VECTOR) list<T*> { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -287,14 +287,14 @@ namespace std { const list<T*>* { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -371,10 +371,10 @@ namespace std { template<> class list<T> { %typemap(in) list<T> { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1 = std::list<T >(size); for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; if (CHECK(o)) (($1_type &)$1)[i] = (T)(CONVERT_FROM(o)); else @@ -391,11 +391,11 @@ namespace std { %typemap(in) const list<T>& (std::list<T> temp), const list<T>* (std::list<T> temp) { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); temp = std::list<T >(size); $1 = &temp; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; if (CHECK(o)) temp[i] = (T)(CONVERT_FROM(o)); else @@ -415,13 +415,13 @@ namespace std { %typecheck(SWIG_TYPECHECK_VECTOR) list<T> { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if (CHECK(o)) $1 = 1; else @@ -441,13 +441,13 @@ namespace std { const list<T>* { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if (CHECK(o)) $1 = 1; else diff --git a/swig/ruby/std_set.i b/swig/ruby/std_set.i index af2a146..9c9544c 100644 --- a/swig/ruby/std_set.i +++ b/swig/ruby/std_set.i @@ -48,10 +48,10 @@ namespace std { template<class T> class set { %typemap(in) set<T> { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); $1.insert(*x); @@ -65,10 +65,10 @@ namespace std { %typemap(in) const set<T>& (std::set<T> temp), const set<T>* (std::set<T> temp) { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1 = &temp; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); temp.insert(*x); @@ -107,14 +107,14 @@ namespace std { %typecheck(SWIG_TYPECHECK_VECTOR) set<T> { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -135,14 +135,14 @@ namespace std { const set<T>* { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -215,10 +215,10 @@ namespace std { template<class T> class set<T*> { %typemap(in) set<T*> { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1 = std::set<T* >(size); for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); (($1_type &)$1)[i] = x; @@ -232,11 +232,11 @@ namespace std { %typemap(in) const set<T*>& (std::set<T*> temp), const set<T*>* (std::set<T*> temp) { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); temp = std::set<T* >(size); $1 = &temp; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; T* x; SWIG_ConvertPtr(o, (void **) &x, $descriptor(T *), 1); temp[i] = x; @@ -257,14 +257,14 @@ namespace std { %typecheck(SWIG_TYPECHECK_VECTOR) set<T*> { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -285,14 +285,14 @@ namespace std { const set<T*>* { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ T* x; - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if ((SWIG_ConvertPtr(o,(void **) &x, $descriptor(T *),0)) != -1) $1 = 1; @@ -367,10 +367,10 @@ namespace std { template<> class set<T> { %typemap(in) set<T> { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); $1 = std::set<T >(size); for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; if (CHECK(o)) (($1_type &)$1)[i] = (T)(CONVERT_FROM(o)); else @@ -387,11 +387,11 @@ namespace std { %typemap(in) const set<T>& (std::set<T> temp), const set<T>* (std::set<T> temp) { if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); temp = std::set<T >(size); $1 = &temp; for (unsigned int i=0; i<size; i++) { - VALUE o = RARRAY($input)->ptr[i]; + VALUE o = RARRAY_PTR($input)[i]; if (CHECK(o)) temp[i] = (T)(CONVERT_FROM(o)); else @@ -411,13 +411,13 @@ namespace std { %typecheck(SWIG_TYPECHECK_VECTOR) set<T> { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if (CHECK(o)) $1 = 1; else @@ -437,13 +437,13 @@ namespace std { const set<T>* { /* native sequence? */ if (rb_obj_is_kind_of($input,rb_cArray)) { - unsigned int size = RARRAY($input)->len; + unsigned int size = RARRAY_LEN($input); if (size == 0) { /* an empty sequence can be of any type */ $1 = 1; } else { /* check the first element only */ - VALUE o = RARRAY($input)->ptr[0]; + VALUE o = RARRAY_PTR($input)[0]; if (CHECK(o)) $1 = 1; else diff --git a/swig/zypp.i b/swig/zypp.i index a84ca38..69ff44a 100644 --- a/swig/zypp.i +++ b/swig/zypp.i @@ -74,7 +74,6 @@ #define TARGET_THREAD_BEGIN_ALLOW do {} while(0) #define TARGET_THREAD_END_ALLOW do {} while(0) #include <ruby.h> -#include <rubyio.h> #endif #if defined(SWIGPERL) |