FreeBSD Bugzilla – Attachment 104429 Details for
Bug 144607
[patch] Get www/ruby-fcgi working under Ruby 1.9.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.44 KB, created by
Aaron D. Gifford
on 2010-03-10 02:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Aaron D. Gifford
Created:
2010-03-10 02:10:01 UTC
Size:
1.44 KB
patch
obsolete
>--- ext/fcgi/fcgi.c.orig 2010-03-08 23:18:38.934686443 -0700 >+++ ext/fcgi/fcgi.c 2010-03-08 23:20:16.669821883 -0700 >@@ -17,6 +17,13 @@ > #include "fcgiapp.h" > #endif > >+#ifdef RUBY_18 >+#define RSTRING_LEN(x) ((x)->len) >+#define RSTRING_PTR(x) ((x)->ptr) >+#define RARRAY_LEN(x) ((x)->len) >+#define RARRAY_PTR(x) ((x)->ptr) >+#endif >+ > static VALUE cFCGI; > static VALUE eFCGIError; > static VALUE cFCGIStream; >@@ -222,7 +229,7 @@ > rb_secure(4); > Data_Get_Struct(self, FCGX_Stream, stream); > str = rb_obj_as_string(str); >- len = FCGX_PutStr(RSTRING(str)->ptr, RSTRING(str)->len, stream); >+ len = FCGX_PutStr(RSTRING_PTR(str), RSTRING_LEN(str), stream); > if (len == EOF) CHECK_STREAM_ERROR(stream); > return INT2NUM(len); > } >@@ -271,8 +278,8 @@ > VALUE tmp; > int i; > >- for (i=0; i<RARRAY(ary)->len; i++) { >- tmp = RARRAY(ary)->ptr[i]; >+ for (i=0; i<RARRAY_LEN(ary); i++) { >+ tmp = RARRAY_PTR(ary)[i]; > if (rb_inspecting_p(tmp)) { > tmp = rb_str_new2("[...]"); > } >@@ -305,7 +312,7 @@ > } > line = rb_obj_as_string(line); > fcgi_stream_write(out, line); >- if (RSTRING(line)->ptr[RSTRING(line)->len-1] != '\n') { >+ if (RSTRING_PTR(line)[RSTRING_LEN(line)-1] != '\n') { > fcgi_stream_write(out, rb_default_rs); > } > } >@@ -379,7 +386,7 @@ > rb_str_cat(str, buff, strlen(buff)); > if (strchr(buff, '\n')) break; > } >- if (RSTRING(str)->len > 0) >+ if (RSTRING_LEN(str) > 0) > return str; > else > return Qnil;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 144607
: 104429 |
104430