diff options
author | swills <swills@FreeBSD.org> | 2011-07-27 09:33:00 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2011-07-27 09:33:00 +0800 |
commit | aec62b2dc914ff2eaf213048f8630bcbeaf95e3c (patch) | |
tree | d54b1e62d2c6ff516f3aece8d55363bf43a2b8db /textproc | |
parent | 64ac3d7598cd6e7d8b59fffe93965648154ab704 (diff) | |
download | freebsd-ports-gnome-aec62b2dc914ff2eaf213048f8630bcbeaf95e3c.tar.gz freebsd-ports-gnome-aec62b2dc914ff2eaf213048f8630bcbeaf95e3c.tar.zst freebsd-ports-gnome-aec62b2dc914ff2eaf213048f8630bcbeaf95e3c.zip |
- Fix build with Ruby 1.9
With hat: ruby@
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/eruby/files/patch-eruby_lib.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/textproc/eruby/files/patch-eruby_lib.c b/textproc/eruby/files/patch-eruby_lib.c index 77aee0fddb81..dc195cbdaf0e 100644 --- a/textproc/eruby/files/patch-eruby_lib.c +++ b/textproc/eruby/files/patch-eruby_lib.c @@ -1,5 +1,5 @@ ---- eruby_lib.c.orig 2010-02-17 16:52:48.000000000 +0100 -+++ eruby_lib.c 2010-02-17 16:52:48.000000000 +0100 +--- eruby_lib.c.orig 2011-07-27 01:20:00.000000000 +0000 ++++ eruby_lib.c 2011-07-27 01:27:56.000000000 +0000 @@ -34,10 +34,18 @@ #include <signal.h> @@ -36,6 +36,15 @@ case 'C': s++; if (isspace(*s)) s++; +@@ -397,7 +407,7 @@ + static void compile_error(eruby_compiler_t *compiler, char *msg) + { + rb_raise(eERubyCompileError, "%s:%d:%s", +- STR2CSTR(compiler->sourcefile), compiler->sourceline, msg); ++ StringValuePtr(compiler->sourcefile), compiler->sourceline, msg); + } + + static void parse_embedded_program(eruby_compiler_t *compiler, @@ -592,8 +602,13 @@ if (prevc < 0) output_literal(compiler, "print \""); output_char(compiler, c); @@ -50,3 +59,12 @@ for (i = 0; i < len; i++) { c = nextc(compiler); +@@ -697,7 +712,7 @@ + VALUE compiler, file, code; + + compiler = eruby_compiler_new(); +- file = rb_file_open(STR2CSTR(filename), "r"); ++ file = rb_file_open(StringValuePtr(filename), "r"); + code = eruby_compiler_compile_file(compiler, file); + rb_funcall(ruby_top_self, rb_intern("eval"), 3, code, Qnil, filename); + return Qnil; |