int size, i;
VALUE *o;
queue_init(&$1);
- size = RARRAY($input)->len;
+ size = RARRAY_LEN($input);
i = 0;
- o = RARRAY($input)->ptr;
+ o = RARRAY_PTR($input);
for (i = 0; i < size; i++, o++) {
int v;
int e = SWIG_AsVal_int(*o, &v);
#endif
#include "solv_xfopen.h"
+/* for old ruby versions */
+#ifndef RARRAY_PTR
+#define RARRAY_PTR(ary) (RARRAY(ary)->ptr)
+#endif
+#ifndef RARRAY_LEN
+#define RARRAY_LEN(ary) (RARRAY(ary)->len)
+#endif
+
#define true 1
#define false 1
%nodefaultctor Repo;
%nodefaultdtor Repo;
-typedef struct _Repo {
+typedef struct {
Pool * const pool;
const char * const name;
int priority;
Pool * const pool;
} Solver;
-typedef struct chksum {
+typedef struct {
} Chksum;
%rename(xfopen) solv_xfopen;
%}
void set_loadcallback(PyObject *callable) {
if ($self->loadcallback == loadcallback) {
- Py_DECREF($self->loadcallbackdata);
+ PyObject *obj = $self->loadcallbackdata;
+ Py_DECREF(obj);
}
if (callable) {
Py_INCREF(callable);
static const int REPO_USE_LOADING = REPO_USE_LOADING;
static const int REPO_EXTEND_SOLVABLES = REPO_EXTEND_SOLVABLES;
static const int SOLV_ADD_NO_STUBS = SOLV_ADD_NO_STUBS; /* repo_solv */
-#ifdef ENABLE_SUSETAGS
+#ifdef ENABLE_SUSEREPO
static const int SUSETAGS_RECORD_SHARES = SUSETAGS_RECORD_SHARES; /* repo_susetags */
#endif
void each() {
Repo *n;
while ((n = Pool_repo_iterator___next__($self)) != 0) {
- rb_yield(SWIG_NewPointerObj(SWIG_as_voidptr(n), SWIGTYPE_p__Repo, SWIG_POINTER_OWN | 0));
+ rb_yield(SWIG_NewPointerObj(SWIG_as_voidptr(n), SWIGTYPE_p_Repo, SWIG_POINTER_OWN | 0));
}
}
#endif