[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apreq-cvs
Subject:    svn commit: r164685 - in /httpd/apreq/trunk: CHANGES
From:       joes () apache ! org
Date:       2005-04-25 23:23:35
Message-ID: 20050425232336.81115.qmail () minotaur ! apache ! org
[Download RAW message or body]

Author: joes
Date: Mon Apr 25 16:23:34 2005
New Revision: 164685

URL: http://svn.apache.org/viewcvs?rev=164685&view=rev
Log:
  Expose pool, bucket_alloc to APR::Request.


Modified:
    httpd/apreq/trunk/CHANGES
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.xs
    httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h
    httpd/apreq/trunk/glue/perl/xsbuilder/typemap

Modified: httpd/apreq/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/CHANGES?rev=164685&r1=164684&r2=164685&view=diff
 ==============================================================================
--- httpd/apreq/trunk/CHANGES (original)
+++ httpd/apreq/trunk/CHANGES Mon Apr 25 16:23:34 2005
@@ -5,7 +5,7 @@
 @section v2_05_dev Changes with libapreq2-2.05-dev
 
 
-- C API [joes]
+- C, Perl API [joes]
   Add pool, bucket_alloc to apreq_handle_t.
 
 - Perl API [joes]

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.xs
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.xs?rev=164685&r1=164684&r2=164685&view=diff
 ==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.xs (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Request.xs Mon Apr 25 16:23:34 \
2005 @@ -186,14 +186,14 @@
     RETVAL
 
 SV*
-disable_uploads(req, pool)
+disable_uploads(req)
     APR::Request req
     APR::Pool pool
   PREINIT:
     apreq_hook_t *h;
     apr_status_t s;
   CODE:
-    h = apreq_hook_make(pool, apreq_hook_disable_uploads, NULL, NULL);
+    h = apreq_hook_make(req->pool, apreq_hook_disable_uploads, NULL, NULL);
     s = apreq_hook_add(req, h);
     RETVAL = apreq_xs_error2sv(aTHX_ s);
 
@@ -201,9 +201,8 @@
     RETVAL
 
 void
-upload_hook(obj, pool, sub)
+upload_hook(obj, sub)
     SV *obj
-    APR::Pool pool
     SV *sub
   PREINIT:
     struct hook_ctx *ctx;
@@ -211,7 +210,9 @@
     apreq_handle_t *req;
   CODE:
     obj = apreq_xs_sv2object(aTHX_ obj, "APR::Request", 'r');
-    ctx = apr_palloc(pool, sizeof *ctx);
+    iv = SvIVX(obj);
+    req = INT2PTR(apreq_handle_t *, iv);
+    ctx = apr_palloc(req->pool, sizeof *ctx);
     ctx->hook = newSVsv(sub);
     ctx->bucket_data = newSV(8000);
     ctx->parent = SvREFCNT_inc(obj);
@@ -220,10 +221,21 @@
     ctx->perl = aTHX;
 #endif
 
-    iv = SvIVX(obj);
-    req = INT2PTR(apreq_handle_t *, iv);
-    apreq_hook_add(req, apreq_hook_make(pool, apreq_xs_upload_hook, NULL, ctx));
-    apr_pool_cleanup_register(pool, ctx, upload_hook_cleanup, NULL);
+    apreq_hook_add(req, apreq_hook_make(req->pool, apreq_xs_upload_hook, NULL, \
ctx)); +    apr_pool_cleanup_register(req->pool, ctx, upload_hook_cleanup, NULL);
+
+
+APR::Pool
+pool(req)
+    APR::Request req
+  CODE:
+    RETVAL = req->pool;
+
+APR::BucketAlloc
+bucket_alloc(req)
+    APR::Request req
+  CODE:
+    RETVAL = req->bucket_alloc;
 
 BOOT:
     {

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h?rev=164685&r1=164684&r2=164685&view=diff
 ==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h Mon Apr 25 16:23:34 \
2005 @@ -37,6 +37,7 @@
 typedef HV             apreq_xs_error_t;
 typedef char*          apreq_xs_subclass_t;
 #define APR__Request__Param__Table const apr_table_t *
+#define APR__BucketAlloc apr_bucket_alloc_t *
 
 #define HANDLE_CLASS "APR::Request"
 #define COOKIE_CLASS "APR::Request::Cookie"

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/typemap
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/typemap?rev=164685&r1=164684&r2=164685&view=diff
 ==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/typemap (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/typemap Mon Apr 25 16:23:34 2005
@@ -1,4 +1,5 @@
 APR::Pool	T_POOLOBJ
+APR::BucketAlloc	T_PTROBJ
 APR::Request::Apache2	T_APREQ_HANDLE_APACHE2
 APR::Request::Cookie	T_APREQ_COOKIE
 APR::Request::Param::Table	T_APREQ_TABLE


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic