stas 2004/10/05 19:01:44
Modified: xs/APR/Bucket APR__Bucket.h xs/maps apr_functions.map xs/tables/current/Apache FunctionTable.pm Log: add a APR::Bucket::setaside wrapper so that if called in the void context it'll handle the error handling on its own Revision Changes Path 1.16 +12 -0 modperl-2.0/xs/APR/Bucket/APR__Bucket.h Index: APR__Bucket.h =================================================================== RCS file: /home/cvs/modperl-2.0/xs/APR/Bucket/APR__Bucket.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -u -r1.15 -r1.16 --- APR__Bucket.h 4 Oct 2004 02:16:42 -0000 1.15 +++ APR__Bucket.h 6 Oct 2004 02:01:44 -0000 1.16 @@ -100,3 +100,15 @@ APR_BUCKET_REMOVE(bucket); } +static MP_INLINE +apr_status_t mpxs_APR__Bucket_setaside(pTHX_ apr_bucket *b, apr_pool_t *p) +{ + apr_status_t rc = apr_bucket_setaside(b, p); + /* if users don't bother to check the success, do it on their + * behalf */ + if (GIMME_V == G_VOID && rc != APR_SUCCESS) { + modperl_croak(aTHX_ rc, "APR::Bucket::setaside"); + } + + return rc; +} 1.89 +2 -1 modperl-2.0/xs/maps/apr_functions.map Index: apr_functions.map =================================================================== RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v retrieving revision 1.88 retrieving revision 1.89 diff -u -u -r1.88 -r1.89 --- apr_functions.map 4 Oct 2004 02:16:42 -0000 1.88 +++ apr_functions.map 6 Oct 2004 02:01:44 -0000 1.89 @@ -125,7 +125,8 @@ >apr_bucket_alloc apr_bucket_alloc_create apr_bucket_alloc_destroy - apr_bucket_setaside +~apr_bucket_setaside + mpxs_APR__Bucket_setaside >apr_bucket_free !apr_bucket_copy_notimpl !apr_bucket_shared_copy 1.61 +142 -18 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm Index: FunctionTable.pm =================================================================== RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v retrieving revision 1.60 retrieving revision 1.61 diff -u -u -r1.60 -r1.61 --- FunctionTable.pm 4 Oct 2004 02:16:43 -0000 1.60 +++ FunctionTable.pm 6 Oct 2004 02:01:44 -0000 1.61 @@ -2,7 +2,7 @@ # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Fri Aug 20 12:00:53 2004 +# ! Tue Oct 5 21:18:41 2004 # ! do NOT edit, any changes will be lost ! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -3311,7 +3311,7 @@ ] }, { - 'return_type' => 'apr_status_t', + 'return_type' => 'int', 'name' => 'ap_mpm_pod_check', 'args' => [ { @@ -3341,6 +3341,10 @@ { 'type' => 'int', 'name' => 'num' + }, + { + 'type' => 'int', + 'name' => 'graceful' } ] }, @@ -3365,6 +3369,10 @@ { 'type' => 'ap_pod_t *', 'name' => 'pod' + }, + { + 'type' => 'int', + 'name' => 'graceful' } ] }, @@ -4195,6 +4203,136 @@ ] }, { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_info_create', + 'args' => [ + { + 'type' => 'fd_queue_info_t **', + 'name' => 'queue_info' + }, + { + 'type' => 'apr_pool_t *', + 'name' => 'pool' + }, + { + 'type' => 'int', + 'name' => 'max_idlers' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_info_set_idle', + 'args' => [ + { + 'type' => 'fd_queue_info_t *', + 'name' => 'queue_info' + }, + { + 'type' => 'apr_pool_t *', + 'name' => 'pool_to_recycle' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_info_term', + 'args' => [ + { + 'type' => 'fd_queue_info_t *', + 'name' => 'queue_info' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_info_wait_for_idler', + 'args' => [ + { + 'type' => 'fd_queue_info_t *', + 'name' => 'queue_info' + }, + { + 'type' => 'apr_pool_t **', + 'name' => 'recycled_pool' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_init', + 'args' => [ + { + 'type' => 'fd_queue_t *', + 'name' => 'queue' + }, + { + 'type' => 'int', + 'name' => 'queue_capacity' + }, + { + 'type' => 'apr_pool_t *', + 'name' => 'a' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_interrupt_all', + 'args' => [ + { + 'type' => 'fd_queue_t *', + 'name' => 'queue' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_pop', + 'args' => [ + { + 'type' => 'fd_queue_t *', + 'name' => 'queue' + }, + { + 'type' => 'apr_socket_t **', + 'name' => 'sd' + }, + { + 'type' => 'apr_pool_t **', + 'name' => 'p' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_push', + 'args' => [ + { + 'type' => 'fd_queue_t *', + 'name' => 'queue' + }, + { + 'type' => 'apr_socket_t *', + 'name' => 'sd' + }, + { + 'type' => 'apr_pool_t *', + 'name' => 'p' + } + ] + }, + { + 'return_type' => 'apr_status_t', + 'name' => 'ap_queue_term', + 'args' => [ + { + 'type' => 'fd_queue_t *', + 'name' => 'queue' + } + ] + }, + { 'return_type' => 'apr_time_t', 'name' => 'ap_rationalize_mtime', 'args' => [ @@ -7379,20 +7517,6 @@ }, { 'return_type' => 'apr_status_t', - 'name' => 'apr_bucket_setaside', - 'args' => [ - { - 'type' => 'apr_bucket *', - 'name' => 'data' - }, - { - 'type' => 'apr_pool_t *', - 'name' => 'pool' - } - ] - }, - { - 'return_type' => 'apr_status_t', 'name' => 'apr_bucket_setaside_noop', 'args' => [ { @@ -8559,7 +8683,7 @@ 'args' => [ { 'type' => 'apr_file_t **', - 'name' => 'new_file' + 'name' => 'newf' }, { 'type' => 'const char *', @@ -8575,7 +8699,7 @@ }, { 'type' => 'apr_pool_t *', - 'name' => 'cont' + 'name' => 'pool' } ] },