diff options
Diffstat (limited to 'src/dumm/ext/dumm.c')
-rw-r--r-- | src/dumm/ext/dumm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dumm/ext/dumm.c b/src/dumm/ext/dumm.c index ca9b29388..603fac088 100644 --- a/src/dumm/ext/dumm.c +++ b/src/dumm/ext/dumm.c @@ -21,8 +21,8 @@ #include <library.h> #include <dumm.h> -#include <debug.h> -#include <utils/linked_list.h> +#include <utils/debug.h> +#include <collections/linked_list.h> #undef PACKAGE_NAME #undef PACKAGE_TARNAME @@ -30,6 +30,8 @@ #undef PACKAGE_STRING #undef PACKAGE_BUGREPORT #undef PACKAGE_URL +/* avoid redefintiion of snprintf etc. */ +#define RUBY_DONT_SUBST #include <ruby.h> static dumm_t *dumm; @@ -141,7 +143,11 @@ static VALUE guest_hash(VALUE class) if (!rb_cvar_defined(class, id)) { VALUE hash = guest_hash_create(class); +#ifdef RB_CVAR_SET_4_ARGS rb_cvar_set(class, id, hash, 0); +#else + rb_cvar_set(class, id, hash); +#endif return hash; } return rb_cvar_get(class, id); @@ -627,6 +633,7 @@ static VALUE iface_each_addr(int argc, VALUE *argv, VALUE self) { rb_raise(rb_eArgError, "must be called with a block"); } + list = linked_list_create(); Data_Get_Struct(self, iface_t, iface); enumerator = iface->create_address_enumerator(iface); while (enumerator->enumerate(enumerator, &addr)) |