added seek to psgi custom object

This commit is contained in:
roberto@natty32
2011-05-05 17:08:52 +02:00
parent 94145bd300
commit f10789965e
2 changed files with 9 additions and 3 deletions
-1
View File
@@ -23,7 +23,6 @@ struct uwsgi_perl {
SV *psgi_main;
SV **psgi_func;
CV *stream_responder;
CV *input_object;
HV *streaming_stash;
HV *input_stash;
+9 -2
View File
@@ -123,6 +123,13 @@ ret:
XSRETURN_IV(bytes);
}
XS(XS_input_seek) {
dXSARGS;
psgi_check_args(1);
XSRETURN(0);
}
XS(XS_input) {
@@ -192,7 +199,7 @@ xs_init(pTHX)
newXS("uwsgi::input::new", XS_input, "uwsgi::input");
newXS("uwsgi::input::read", XS_input_read, "uwsgi::input");
//newXS("uwsgi::input::seek", XS_input_seek, "uwsgi::input");
newXS("uwsgi::input::seek", XS_input_seek, "uwsgi::input");
uperl.input_stash = gv_stashpv("uwsgi::input", 0);
@@ -553,7 +560,7 @@ int uwsgi_perl_request(struct wsgi_request *wsgi_req) {
if (!hv_store(env, "psgi.input", 10, pi, 0)) goto clear;
if (!hv_store(env, "psgix.io", 8, SvREFCNT_inc(pi), 0)) goto clear;
if (!hv_store(env, "psgix.input.buffered", 20, newSViv(1), 0)) goto clear;
if (!hv_store(env, "psgix.input.buffered", 20, newSViv(0), 0)) goto clear;
PUSHMARK(SP);