diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index 0981101c..31e05959 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -31,11 +31,10 @@ #include "audio.h" #include "boost-hash.h" -#ifndef OLD_RUBY #include + +#ifndef OLD_RUBY #include -#else -#include #endif #include diff --git a/binding/binding-util.h b/binding/binding-util.h index 3159b49c..ae37c3e1 100644 --- a/binding/binding-util.h +++ b/binding/binding-util.h @@ -22,11 +22,7 @@ #ifndef BINDING_UTIL_H #define BINDING_UTIL_H -#ifndef OLD_RUBY #include -#else -#include -#endif #include "exception.h" @@ -69,7 +65,7 @@ raiseRbExc(const Exception &exc); #ifndef OLD_RUBY #define DECL_TYPE(Klass) \ extern rb_data_type_t Klass##Type -#endif + /* 2.1 has added a new field (flags) to rb_data_type_t */ #include @@ -79,6 +75,7 @@ raiseRbExc(const Exception &exc); #else #define DEF_TYPE_FLAGS #endif +#endif #ifndef OLD_RUBY #define DEF_TYPE_CUSTOMNAME_AND_FREE(Klass, Name, Free) \ @@ -130,8 +127,7 @@ raiseRbExc(const Exception &exc); #define DEF_ALLOCFUNC_CUSTOMFREE(type,free) \ static VALUE type##Allocate(VALUE klass)\ { \ - void *sval = 0; \ - return Data_Wrap_Struct(klass, 0, free, sval); \ + return Data_Wrap_Struct(klass, 0, free, 0); \ } #define DEF_ALLOCFUNC(type) DEF_ALLOCFUNC_CUSTOMFREE(type, freeInstance) diff --git a/binding/filesystem-binding.cpp b/binding/filesystem-binding.cpp index 41163d44..c8630079 100644 --- a/binding/filesystem-binding.cpp +++ b/binding/filesystem-binding.cpp @@ -27,8 +27,10 @@ #ifndef OLD_RUBY #include "ruby/encoding.h" -#endif #include "ruby/intern.h" +#else +#include "intern.h" +#endif static void fileIntFreeInstance(void *inst) diff --git a/binding/minidl-binding.cpp b/binding/minidl-binding.cpp index 02b857bf..365e58ce 100644 --- a/binding/minidl-binding.cpp +++ b/binding/minidl-binding.cpp @@ -1,7 +1,7 @@ // Most of the MiniDL class was taken from Ruby 1.8's Win32API.c, // it's just as basic but should work fine for the moment -#include +#include #include #if defined(__WIN32__) && defined(USE_ESSENTIALS_FIXES) #include