Use proper Ruby 1.8 header path

This commit is contained in:
Inori 2019-08-01 14:55:45 -04:00 committed by Inori
parent ce4fdf3104
commit 18bd8084ec
4 changed files with 9 additions and 12 deletions

View file

@ -31,11 +31,10 @@
#include "audio.h"
#include "boost-hash.h"
#ifndef OLD_RUBY
#include <ruby.h>
#ifndef OLD_RUBY
#include <ruby/encoding.h>
#else
#include <ruby/ruby.h>
#endif
#include <assert.h>

View file

@ -22,11 +22,7 @@
#ifndef BINDING_UTIL_H
#define BINDING_UTIL_H
#ifndef OLD_RUBY
#include <ruby.h>
#else
#include <ruby/ruby.h>
#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 <ruby/version.h>
@ -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<type>)

View file

@ -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)

View file

@ -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 <ruby/ruby.h>
#include <ruby.h>
#include <SDL.h>
#if defined(__WIN32__) && defined(USE_ESSENTIALS_FIXES)
#include <SDL_syswm.h>