httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r170440 - in /httpd/apreq/trunk/glue/perl/xsbuilder: APR/Request/Hook/ APR/Request/Hook/Hook.xs APR/Request/Parser/ APR/Request/Parser/Parser.xs maps/apreq_functions.map maps/apreq_types.map typemap
Date Mon, 16 May 2005 19:58:58 GMT
Author: joes
Date: Mon May 16 12:58:57 2005
New Revision: 170440

URL: http://svn.apache.org/viewcvs?rev=170440&view=rev
Log:
Add preliminary parser/hook perl APIs.

Added:
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Hook/
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Hook/Hook.xs
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Parser/
    httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Parser/Parser.xs
Modified:
    httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_functions.map
    httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_types.map
    httpd/apreq/trunk/glue/perl/xsbuilder/typemap

Added: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Hook/Hook.xs
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Hook/Hook.xs?rev=170440&view=auto
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Hook/Hook.xs (added)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Hook/Hook.xs Mon May 16 12:58:57 2005
@@ -0,0 +1,60 @@
+MODULE = APR::Request::Hook    PACKAGE = APR::Request::Hook
+
+APR::Request::Hook
+make(class, pool, hook, next)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    apreq_hook_function_t hook
+    APR::Request::Hook next
+
+  CODE:
+    RETVAL = apreq_hook_make(pool, hook, next, NULL);
+
+  OUTPUT:
+    RETVAL
+
+APR::Request::Hook
+disable_uploads(class, pool, next)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::Request::Hook next
+  CODE:
+    RETVAL = apreq_hook_make(pool, apreq_hook_disable_uploads,
+                             next, NULL);
+  OUTPUT:
+    RETVAL
+
+APR::Request::Hook
+apr_xml_parser(class, pool, next)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::Request::Hook next
+  CODE:
+    RETVAL = apreq_hook_make(pool, apreq_hook_apr_xml_parser,
+                             next, NULL);
+  OUTPUT:
+    RETVAL
+
+APR::Request::Hook
+find_param(class, pool, next, name)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::Request::Hook next
+    char *name
+  CODE:
+    RETVAL = apreq_hook_make(pool, apreq_hook_find_param,
+                             next, name);
+  OUTPUT:
+    RETVAL
+
+APR::Request::Hook
+discard_brigade(class, pool, next)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::Request::Hook next
+  CODE:
+    RETVAL = apreq_hook_make(pool, apreq_hook_discard_brigade,
+                             next, NULL);
+  OUTPUT:
+    RETVAL
+

Added: httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Parser/Parser.xs
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Parser/Parser.xs?rev=170440&view=auto
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Parser/Parser.xs (added)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/APR/Request/Parser/Parser.xs Mon May 16 12:58:57
2005
@@ -0,0 +1,111 @@
+MODULE = APR::Request::Parser    PACKAGE = APR::Request::Parser
+
+APR::Request::Parser
+make(class, pool, ba, ct, parser, blim, tdir, hook)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::BucketAlloc ba
+    char *ct
+    apreq_parser_function_t parser
+    apr_size_t blim
+    char *tdir
+    APR::Request::Hook hook
+
+  CODE:
+    RETVAL = apreq_parser_make(pool, ba, ct, parser, blim, tdir, hook, NULL);
+
+  OUTPUT:
+    RETVAL
+
+APR::Request::Parser
+generic(class, pool, ba, ct, blim, tdir, hook)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::BucketAlloc ba
+    char *ct
+    apr_size_t blim
+    char *tdir
+    APR::Request::Hook hook
+
+  CODE:
+    RETVAL = apreq_parser_make(pool, ba, ct, apreq_parse_generic, 
+                               blim, tdir, hook, NULL);
+
+  OUTPUT:
+    RETVAL
+
+APR::Request::Parser
+headers(class, pool, ba, ct, blim, tdir, hook)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::BucketAlloc ba
+    char *ct
+    apr_size_t blim
+    char *tdir
+    APR::Request::Hook hook
+
+  CODE:
+    RETVAL = apreq_parser_make(pool, ba, ct, apreq_parse_headers, 
+                               blim, tdir, hook, NULL);
+
+  OUTPUT:
+    RETVAL
+
+APR::Request::Parser
+urlencoded(class, pool, ba, ct, blim, tdir, hook)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::BucketAlloc ba
+    char *ct
+    apr_size_t blim
+    char *tdir
+    APR::Request::Hook hook
+
+  CODE:
+    RETVAL = apreq_parser_make(pool, ba, ct, apreq_parse_urlencoded, 
+                               blim, tdir, hook, NULL);
+
+  OUTPUT:
+    RETVAL
+
+
+APR::Request::Parser
+multipart(class, pool, ba, ct, blim, tdir, hook)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::BucketAlloc ba
+    char *ct
+    apr_size_t blim
+    char *tdir
+    APR::Request::Hook hook
+
+  CODE:
+    RETVAL = apreq_parser_make(pool, ba, ct, apreq_parse_multipart, 
+                               blim, tdir, hook, NULL);
+
+  OUTPUT:
+    RETVAL
+
+APR::Request::Parser
+default(class, pool, ba, ct, blim, tdir, hook)
+    apreq_xs_subclass_t class
+    APR::Pool pool
+    APR::BucketAlloc ba
+    char *ct
+    apr_size_t blim
+    char *tdir
+    APR::Request::Hook hook
+  PREINIT:
+    apreq_parser_function_t parser;
+
+
+  CODE:
+    parser = apreq_parser(ct);
+    if (parser == NULL)
+        XSRETURN_UNDEF;
+
+    RETVAL = apreq_parser_make(pool, ba, ct, parser, 
+                               blim, tdir, hook, NULL);
+
+  OUTPUT:
+    RETVAL

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_functions.map
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_functions.map?rev=170440&r1=170439&r2=170440&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_functions.map (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_functions.map Mon May 16 12:58:57 2005
@@ -49,3 +49,10 @@
 MODULE=APR::Request::Param PACKAGE=APR::Request::Brigade::IO  PREFIX=APR__Request__Brigade__IO_
 DEFINE_read | apreq_xs_brigade_read |
 DEFINE_readline | apreq_xs_brigade_readline |
+
+MODULE=APR::Request::Hook PACKAGE=APR::Request::Hook PREFIX=apreq_hook_
+apreq_hook_run
+
+MODULE=APR::Request::Parser PACKAGE=APR::Request::Parser PREFIX=apreq_parser_
+apreq_parser_run
+apreq_parser_add_hook

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_types.map
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_types.map?rev=170440&r1=170439&r2=170440&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_types.map (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/maps/apreq_types.map Mon May 16 12:58:57 2005
@@ -27,5 +27,5 @@
 struct apreq_xs_error_t       | APR::Request::Error   | T_APREQ_ERROR
 struct apreq_xs_cookie_table_t | APR::Request::Cookie::Table | T_HASHOBJ
 const apreq_xs_param_table_t * | APR::Request::Param::Table | T_HASHOBJ
-apreq_xs_subclass_t | SUBCLASS
 struct apreq_parser_t | APR::Request::Parser
+struct apreq_hook_t | APR::Request::Hook

Modified: httpd/apreq/trunk/glue/perl/xsbuilder/typemap
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/xsbuilder/typemap?rev=170440&r1=170439&r2=170440&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/xsbuilder/typemap (original)
+++ httpd/apreq/trunk/glue/perl/xsbuilder/typemap Mon May 16 12:58:57 2005
@@ -11,16 +11,17 @@
 Apache2::RequestRec	T_APACHEOBJ
 APR::Request::Cookie::Table	T_HASHOBJ
 APR::Request	T_APREQ_HANDLE
-APR::Request::Parser T_PTROBJ
+APR::Request::Parser	T_PTROBJ
+APR::Request::Hook	T_PTROBJ
 apr_status_t	T_IV
 const void *	T_PTR
 const char *	T_PV
 apreq_xs_subclass_t	T_SUBCLASS
-const apreq_xs_subclass_t *	T_SUBCLASS
 const apr_size_t	T_UV
-apreq_xs_subclass_t *	T_SUBCLASS
 apr_size_t	T_UV
 unsigned char	T_UV
+apreq_parser_function_t	T_APREQ_PARSER_FUNCTION
+apreq_hook_function_t	T_APREQ_HOOK_FUNCTION
 
 INPUT
 T_APREQ_HANDLE
@@ -106,6 +107,11 @@
                    \"(expecting an %s derived object)\", \"${ntype}\");
     }
 
+T_APREQ_PARSER_FUNCTION
+	$var = INT2PTR(apreq_parser_function_t, SvObjIV($arg))
+
+T_APREQ_HOOK_FUNCTION
+	$var = INT2PTR(apreq_hook_function_t, SvObjIV($arg))
 
 OUTPUT
 T_APREQ_HANDLE
@@ -142,3 +148,8 @@
 T_APREQ_PARAM
 	$arg = apreq_xs_param2sv(aTHX_ $var, class, parent);
 
+T_APREQ_PARSER_FUNCTION
+	$arg = sv_setref_pv(newSV(0), class, $var);
+
+T_APREQ_HOOK_FUNCTION
+	$arg = sv_setref_pv(newSV(0), class, $var);



Mime
View raw message