Return-Path: Delivered-To: apmail-httpd-apreq-cvs-archive@www.apache.org Received: (qmail 93704 invoked from network); 16 Feb 2005 03:04:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Feb 2005 03:04:04 -0000 Received: (qmail 77828 invoked by uid 500); 16 Feb 2005 03:04:04 -0000 Delivered-To: apmail-httpd-apreq-cvs-archive@httpd.apache.org Received: (qmail 77808 invoked by uid 500); 16 Feb 2005 03:04:04 -0000 Mailing-List: contact apreq-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: apreq-dev@httpd.apache.org List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-cvs@httpd.apache.org Received: (qmail 77795 invoked by uid 99); 16 Feb 2005 03:04:04 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 15 Feb 2005 19:04:03 -0800 Received: (qmail 93700 invoked by uid 65534); 16 Feb 2005 03:04:02 -0000 Message-ID: <20050216030402.93698.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 16 Feb 2005 03:04:02 -0000 Subject: svn commit: r153984 - in httpd/apreq/branches/multi-env-unstable: glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs glue/perl/xsbuilder/APR/Request/Param/Param.xs glue/perl/xsbuilder/apreq_xs_postperl.h glue/perl/xsbuilder/maps/apreq_functions.map include/apreq.h To: apreq-cvs@httpd.apache.org From: joes@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: joes Date: Tue Feb 15 19:03:59 2005 New Revision: 153984 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D153984 Log: s/apreq_parse_request/apreq_parse/ and add it to APR::Request. Also change apreq_xs_find_obj to return the reference to the desired SV object, instead of the object itself. Since we drop the reference into the mg_obj slot oft= en, it's more useful to have a reference there instead of the raw object. Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request= /Cookie/Cookie.xs httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request= /Param/Param.xs httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_po= stperl.h httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_= functions.map httpd/apreq/branches/multi-env-unstable/include/apreq.h Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/R= equest/Cookie/Cookie.xs URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/= glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs?view=3Ddiff&r1=3D153983&r2= =3D153984 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request= /Cookie/Cookie.xs (original) +++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request= /Cookie/Cookie.xs Tue Feb 15 19:03:59 2005 @@ -44,7 +44,7 @@ =20 sv =3D ST(0); obj =3D apreq_xs_find_obj(aTHX_ sv, "r"); - iv =3D SvIVX(obj); + iv =3D SvIVX(SvRV(obj)); req =3D INT2PTR(apreq_handle_t *, iv); =20 =20 Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/R= equest/Param/Param.xs URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/= glue/perl/xsbuilder/APR/Request/Param/Param.xs?view=3Ddiff&r1=3D153983&r2= =3D153984 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request= /Param/Param.xs (original) +++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request= /Param/Param.xs Tue Feb 15 19:03:59 2005 @@ -57,7 +57,7 @@ =20 sv =3D ST(0); obj =3D apreq_xs_find_obj(aTHX_ sv, "r"); - iv =3D SvIVX(obj); + iv =3D SvIVX(SvRV(obj)); req =3D INT2PTR(apreq_handle_t *, iv); =20 =20 @@ -121,7 +121,7 @@ =20 sv =3D ST(0); obj =3D apreq_xs_find_obj(aTHX_ sv, "r"); - iv =3D SvIVX(obj); + iv =3D SvIVX(SvRV(obj)); req =3D INT2PTR(apreq_handle_t *, iv); =20 =20 Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq= _xs_postperl.h URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/= glue/perl/xsbuilder/apreq_xs_postperl.h?view=3Ddiff&r1=3D153983&r2=3D153984 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_po= stperl.h (original) +++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_po= stperl.h Tue Feb 15 19:03:59 2005 @@ -48,7 +48,7 @@ * @param in The starting SV *. * @param key The first letter of key is used to search a hashref for=20 * the desired object. - * @return The object, if found; otherwise NULL. + * @return Reference to the object. */ APR_INLINE static SV *apreq_xs_find_obj(pTHX_ SV *in, const char *key) @@ -74,13 +74,14 @@ Perl_croak(aTHX_ "attribute hash has no '%s' key!", key); case SVt_PVMG: if (SvOBJECT(sv) && SvIOKp(sv)) - return sv; + return in; default: Perl_croak(aTHX_ "panic: unsupported SV type: %d", SvTYPE(sv)= ); } } =20 - return in; + Perl_croak(aTHX_ "apreq_xs_find_obj: object `%s' not found", key); + return NULL; } =20 /* conversion function templates based on modperl-2's sv2request_rec */ @@ -93,10 +94,8 @@ static void *apreq_xs_perl2c(pTHX_ SV* in, const char *name) { SV *sv =3D apreq_xs_find_obj(aTHX_ in, name); - if (sv =3D=3D NULL) - return NULL; - else=20 - return (void *)SvIVX(sv); + IV iv =3D SvIVX(SvRV(sv)); + return INT2PTR(void *, iv); } =20 APR_INLINE @@ -113,8 +112,9 @@ APR_INLINE static apreq_handle_t *apreq_xs_get_handle(pTHX_ SV *sv) { - MAGIC *mg =3D mg_find(sv, PERL_MAGIC_ext); - IV iv =3D SvIVX(mg->mg_obj); + MAGIC *mg =3D mg_find(SvRV(sv), PERL_MAGIC_ext); + SV *obj =3D apreq_xs_find_obj(aTHX_ mg->mg_obj, "r"); + IV iv =3D SvIVX(SvRV(obj)); return INT2PTR(apreq_handle_t *,iv); } =20 Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/= apreq_functions.map URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/= glue/perl/xsbuilder/maps/apreq_functions.map?view=3Ddiff&r1=3D153983&r2=3D1= 53984 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_= functions.map (original) +++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_= functions.map Tue Feb 15 19:03:59 2005 @@ -106,12 +106,7 @@ #################### APR::Request stuff #################### =20 MODULE=3DAPR::Request PACKAGE=3DAPR::Request PREFIX=3Dapreq_ -apreq_args_get -apreq_jar_get -#DEFINE_jar | apreq_xs_jar | -#DEFINE_args | apreq_xs_args | -#DEFINE_body | apreq_xs_body | -#DEFINE_param | apreq_xs_param | +apreq_parse =20 MODULE=3DAPR::Request::Apache2 PACKAGE=3DAPR::Request::Apache2 apreq_handle_apache2_t *:DEFINE_new | apreq_handle_apache2 (r) | const cha= r *:class, request_rec *:r Modified: httpd/apreq/branches/multi-env-unstable/include/apreq.h URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/= include/apreq.h?view=3Ddiff&r1=3D153983&r2=3D153984 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- httpd/apreq/branches/multi-env-unstable/include/apreq.h (original) +++ httpd/apreq/branches/multi-env-unstable/include/apreq.h Tue Feb 15 19:0= 3:59 2005 @@ -314,7 +314,7 @@ */ =20 static APR_INLINE -apr_status_t apreq_parse_request(apreq_handle_t *req) +apr_status_t apreq_parse(apreq_handle_t *req) { const apr_table_t *dummy; apr_status_t jar_status, args_status, body_status;