httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1036059 - /httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs
Date Wed, 17 Nov 2010 14:28:28 GMT
Author: joes
Date: Wed Nov 17 14:28:28 2010
New Revision: 1036059

URL: http://svn.apache.org/viewvc?rev=1036059&view=rev
Log:
remove final clumsy use of APREQ_COOKIE_MAX_LENGTH

Modified:
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs?rev=1036059&r1=1036058&r2=1036059&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs Wed Nov 17 14:28:28
2010
@@ -270,12 +270,13 @@ SV *
 as_string(c)
     APR::Request::Cookie c
   PREINIT:
-    char rv[APREQ_COOKIE_MAX_LENGTH];
     STRLEN len;
 
   CODE:
-    len = apreq_cookie_serialize(c, rv, sizeof rv);
-    RETVAL = newSVpvn(rv, len);
+    len = apreq_cookie_serialize(c, NULL, 0);
+    RETVAL = newSV(len);
+    SvCUR_set(RETVAL, apreq_cookie_serialize(c, SvPVX(RETVAL), len + 1));
+    SvPOK_on(RETVAL);
     if (apreq_cookie_is_tainted(c))
         SvTAINTED_on(RETVAL);
 



Mime
View raw message