mirror of https://github.com/KLayout/klayout.git
Trying to fix a linker issue
This commit is contained in:
parent
4a20a30888
commit
fb16c8c6f6
|
|
@ -32,10 +32,6 @@
|
|||
# include <ruby/debug.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_RUBY_VERSION_CODE < 20200
|
||||
# include <ruby/encoding.h>
|
||||
#endif
|
||||
|
||||
static VALUE ruby_top_self = Qnil;
|
||||
|
||||
VALUE rb_get_top_self ()
|
||||
|
|
@ -192,18 +188,6 @@ rba_check_error (int state)
|
|||
}
|
||||
}
|
||||
|
||||
#if HAVE_RUBY_VERSION_CODE < 20200
|
||||
|
||||
// Ruby <2.2 does not have this useful function
|
||||
VALUE rb_utf8_str_new (const char *ptr, long len)
|
||||
{
|
||||
VALUE str = rb_str_new (ptr, len);
|
||||
rb_enc_associate_index (str, rb_utf8_encindex ());
|
||||
return str;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief needed because StringValue is a macro:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -136,7 +136,17 @@ inline void rb_hash_clear(VALUE hash)
|
|||
#endif
|
||||
|
||||
#if HAVE_RUBY_VERSION_CODE < 20200
|
||||
VALUE rb_utf8_str_new (const char *str, long len);
|
||||
|
||||
#include <ruby/encoding.h>
|
||||
|
||||
// Ruby <2.2 does not have this useful function
|
||||
inline VALUE rb_utf8_str_new (const char *ptr, long len)
|
||||
{
|
||||
VALUE str = rb_str_new (ptr, len);
|
||||
rb_enc_associate_index (str, rb_utf8_encindex ());
|
||||
return str;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
typedef VALUE (*ruby_func)(ANYARGS);
|
||||
|
|
|
|||
Loading…
Reference in New Issue