mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-13 18:35:34 +02:00
Use proper Ruby 1.8 header path
This commit is contained in:
parent
ce4fdf3104
commit
18bd8084ec
4 changed files with 9 additions and 12 deletions
|
@ -31,11 +31,10 @@
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "boost-hash.h"
|
#include "boost-hash.h"
|
||||||
|
|
||||||
#ifndef OLD_RUBY
|
|
||||||
#include <ruby.h>
|
#include <ruby.h>
|
||||||
|
|
||||||
|
#ifndef OLD_RUBY
|
||||||
#include <ruby/encoding.h>
|
#include <ruby/encoding.h>
|
||||||
#else
|
|
||||||
#include <ruby/ruby.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -22,11 +22,7 @@
|
||||||
#ifndef BINDING_UTIL_H
|
#ifndef BINDING_UTIL_H
|
||||||
#define BINDING_UTIL_H
|
#define BINDING_UTIL_H
|
||||||
|
|
||||||
#ifndef OLD_RUBY
|
|
||||||
#include <ruby.h>
|
#include <ruby.h>
|
||||||
#else
|
|
||||||
#include <ruby/ruby.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "exception.h"
|
#include "exception.h"
|
||||||
|
|
||||||
|
@ -69,7 +65,7 @@ raiseRbExc(const Exception &exc);
|
||||||
#ifndef OLD_RUBY
|
#ifndef OLD_RUBY
|
||||||
#define DECL_TYPE(Klass) \
|
#define DECL_TYPE(Klass) \
|
||||||
extern rb_data_type_t Klass##Type
|
extern rb_data_type_t Klass##Type
|
||||||
#endif
|
|
||||||
|
|
||||||
/* 2.1 has added a new field (flags) to rb_data_type_t */
|
/* 2.1 has added a new field (flags) to rb_data_type_t */
|
||||||
#include <ruby/version.h>
|
#include <ruby/version.h>
|
||||||
|
@ -79,6 +75,7 @@ raiseRbExc(const Exception &exc);
|
||||||
#else
|
#else
|
||||||
#define DEF_TYPE_FLAGS
|
#define DEF_TYPE_FLAGS
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OLD_RUBY
|
#ifndef OLD_RUBY
|
||||||
#define DEF_TYPE_CUSTOMNAME_AND_FREE(Klass, Name, Free) \
|
#define DEF_TYPE_CUSTOMNAME_AND_FREE(Klass, Name, Free) \
|
||||||
|
@ -130,8 +127,7 @@ raiseRbExc(const Exception &exc);
|
||||||
#define DEF_ALLOCFUNC_CUSTOMFREE(type,free) \
|
#define DEF_ALLOCFUNC_CUSTOMFREE(type,free) \
|
||||||
static VALUE type##Allocate(VALUE klass)\
|
static VALUE type##Allocate(VALUE klass)\
|
||||||
{ \
|
{ \
|
||||||
void *sval = 0; \
|
return Data_Wrap_Struct(klass, 0, free, 0); \
|
||||||
return Data_Wrap_Struct(klass, 0, free, sval); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEF_ALLOCFUNC(type) DEF_ALLOCFUNC_CUSTOMFREE(type, freeInstance<type>)
|
#define DEF_ALLOCFUNC(type) DEF_ALLOCFUNC_CUSTOMFREE(type, freeInstance<type>)
|
||||||
|
|
|
@ -27,8 +27,10 @@
|
||||||
|
|
||||||
#ifndef OLD_RUBY
|
#ifndef OLD_RUBY
|
||||||
#include "ruby/encoding.h"
|
#include "ruby/encoding.h"
|
||||||
#endif
|
|
||||||
#include "ruby/intern.h"
|
#include "ruby/intern.h"
|
||||||
|
#else
|
||||||
|
#include "intern.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fileIntFreeInstance(void *inst)
|
fileIntFreeInstance(void *inst)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Most of the MiniDL class was taken from Ruby 1.8's Win32API.c,
|
// 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
|
// it's just as basic but should work fine for the moment
|
||||||
|
|
||||||
#include <ruby/ruby.h>
|
#include <ruby.h>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#if defined(__WIN32__) && defined(USE_ESSENTIALS_FIXES)
|
#if defined(__WIN32__) && defined(USE_ESSENTIALS_FIXES)
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue