diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-11 12:52:49 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-11 12:52:49 -0500 |
commit | ef7a60860d18e9be343b6fa5fe8d76fd080cead0 (patch) | |
tree | 640a3f17c9f0e1d133b05f1eb434d13057a78e8d /korundum/bin | |
parent | 46659f992d49f86347c43528a8705657b6896cb7 (diff) | |
download | tdebindings-ef7a60860d18e9be343b6fa5fe8d76fd080cead0.tar.gz tdebindings-ef7a60860d18e9be343b6fa5fe8d76fd080cead0.zip |
Fix FTBS on ruby 1.9.x
Thanks to Darrell Anderson for the majority of the patch!
Diffstat (limited to 'korundum/bin')
-rw-r--r-- | korundum/bin/Makefile.am | 2 | ||||
-rw-r--r-- | korundum/bin/krubyinit.cpp | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/korundum/bin/Makefile.am b/korundum/bin/Makefile.am index f8c09425..4c3e637c 100644 --- a/korundum/bin/Makefile.am +++ b/korundum/bin/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) +INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS) bin_PROGRAMS = krubyinit krubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/kde/ -L$(RUBY_LIBDIR) -lkmdi -lknewstuff diff --git a/korundum/bin/krubyinit.cpp b/korundum/bin/krubyinit.cpp index 7ed0b0a4..f53f8306 100644 --- a/korundum/bin/krubyinit.cpp +++ b/korundum/bin/krubyinit.cpp @@ -1,5 +1,13 @@ #include <ruby.h> +#include "config.h" + +#ifndef HAVE_RUBY_1_9 +#define RARRAY_LEN(x) (RARRAY(x)->len) +#define RSTRING_LEN(x) (RSTRING(x)->len) +#define rb_str_catf_1 rb_str_catf +#endif + /*************************************************************************** krubyinit - makes use of tdeinit_wrapper possible for ruby programs ------------------- @@ -24,6 +32,6 @@ static const char* script_name = "krubyinit_app"; int main(int argc, char **argv) { ruby_init(); ruby_script((char*)script_name); - ruby_options(argc, argv); - ruby_run(); + void* node = ruby_options(argc, argv); + ruby_run_node(node); } |