diff options
author | Florian Frank <flori@ping.de> | 2011-01-02 22:16:03 +0100 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2011-01-02 22:25:33 +0100 |
commit | cfa34b24853078f5b91bbed97d8da84fffac0077 (patch) | |
tree | 7694d883a94364ee373f2fab901f0363e16a865f /ext/json | |
parent | a3a4c82b577ea44cbebe7c07a4b08b1d0079bd61 (diff) | |
download | json-cfa34b24853078f5b91bbed97d8da84fffac0077.tar.gz |
query if ruby/st.h exists
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/ext/parser/extconf.rb | 1 | ||||
-rw-r--r-- | ext/json/ext/parser/parser.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/json/ext/parser/extconf.rb b/ext/json/ext/parser/extconf.rb index f61fc94..d2438cd 100644 --- a/ext/json/ext/parser/extconf.rb +++ b/ext/json/ext/parser/extconf.rb @@ -12,4 +12,5 @@ if CONFIG['CC'] =~ /gcc/ end have_header("re.h") +have_header("ruby/st.h") create_makefile 'json/ext/parser' diff --git a/ext/json/ext/parser/parser.h b/ext/json/ext/parser/parser.h index ab02b51..877ef67 100644 --- a/ext/json/ext/parser/parser.h +++ b/ext/json/ext/parser/parser.h @@ -13,7 +13,11 @@ #else #define FORCE_UTF8(obj) #endif +#ifdef HAVE_RUBY_ST_H #include "ruby/st.h" +#else +#include "st.h" +#endif #define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key)) |