perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h modperl_callback.c modperl_callback.h modperl_config.c modperl_config.h modperl_gtop.c modperl_gtop.h modperl_interp.c modperl_interp.h modperl_options.c modperl_options.h modperl_tipool.c modperl_tipool.h modperl_types.h
Date Mon, 14 Aug 2000 03:10:48 GMT
dougm       00/08/13 20:10:48

  Modified:    lib/ModPerl Code.pm
               src/modules/perl mod_perl.c mod_perl.h modperl_callback.c
                        modperl_callback.h modperl_config.c
                        modperl_config.h modperl_gtop.c modperl_gtop.h
                        modperl_interp.c modperl_interp.h modperl_options.c
                        modperl_options.h modperl_tipool.c modperl_tipool.h
                        modperl_types.h
  Log:
  adjust to apr_ prefix
  
  Revision  Changes    Path
  1.33      +10 -10    modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Code.pm	2000/06/20 16:04:28	1.32
  +++ Code.pm	2000/08/14 03:10:44	1.33
  @@ -23,14 +23,14 @@
   my %hook_proto = (
       Process    => {
           ret  => 'void',
  -        args => [{type => 'ap_pool_t', name => 'p'},
  +        args => [{type => 'apr_pool_t', name => 'p'},
                    {type => 'server_rec', name => 's'}],
       },
       Files      => {
           ret  => 'void',
  -        args => [{type => 'ap_pool_t', name => 'pconf'},
  -                 {type => 'ap_pool_t', name => 'plog'},
  -                 {type => 'ap_pool_t', name => 'ptemp'},
  +        args => [{type => 'apr_pool_t', name => 'pconf'},
  +                 {type => 'apr_pool_t', name => 'plog'},
  +                 {type => 'apr_pool_t', name => 'ptemp'},
                    {type => 'server_rec', name => 's'}],
       },
       PerSrv     => {
  @@ -227,14 +227,14 @@
   {
       $prototype->{cfg}->{get};
       if (!MpSrvENABLED(scfg)) {
  -        return ap_pstrcat(parms->pool,
  -                          "Perl is disabled for server ",
  -                          parms->server->server_hostname, NULL);
  +        return apr_pstrcat(parms->pool,
  +                           "Perl is disabled for server ",
  +                           parms->server->server_hostname, NULL);
       }
       if (!$flag(scfg)) {
  -        return ap_pstrcat(parms->pool,
  -                          "$h_name is disabled for server ",
  -                          parms->server->server_hostname, NULL);
  +        return apr_pstrcat(parms->pool,
  +                           "$h_name is disabled for server ",
  +                           parms->server->server_hostname, NULL);
       }
       MP_TRACE_d(MP_FUNC, "push \@%s, %s\\n", parms->cmd->name, arg);
       return modperl_cmd_push_handlers(&($av), arg, parms->pool);
  
  
  
  1.20      +6 -6      modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_perl.c	2000/06/14 16:07:06	1.19
  +++ mod_perl.c	2000/08/14 03:10:45	1.20
  @@ -1,6 +1,6 @@
   #include "mod_perl.h"
   
  -PerlInterpreter *modperl_startup(server_rec *s, ap_pool_t *p)
  +PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p)
   {
       MP_dSCFG(s);
       PerlInterpreter *perl;
  @@ -42,7 +42,7 @@
       return perl;
   }
   
  -void modperl_init(server_rec *base_server, ap_pool_t *p)
  +void modperl_init(server_rec *base_server, apr_pool_t *p)
   {
       server_rec *s;
       modperl_srv_config_t *base_scfg =
  @@ -112,14 +112,14 @@
       }
   }
   
  -void modperl_hook_init(ap_pool_t *pconf, ap_pool_t *plog, 
  -                       ap_pool_t *ptemp, server_rec *s)
  +void modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
  +                       apr_pool_t *ptemp, server_rec *s)
   {
       modperl_init(s, pconf);
   }
   
  -void modperl_pre_config_handler(ap_pool_t *p, ap_pool_t *plog,
  -                                ap_pool_t *ptemp)
  +void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog,
  +                                apr_pool_t *ptemp)
   {
   }
   
  
  
  
  1.18      +6 -6      modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_perl.h	2000/07/26 07:20:39	1.17
  +++ mod_perl.h	2000/08/14 03:10:45	1.18
  @@ -41,13 +41,13 @@
   #include "modperl_options.h"
   #include "modperl_directives.h"
   
  -void modperl_init(server_rec *s, ap_pool_t *p);
  -void modperl_hook_init(ap_pool_t *pconf, ap_pool_t *plog, 
  -                       ap_pool_t *ptemp, server_rec *s);
  -void modperl_pre_config_handler(ap_pool_t *p, ap_pool_t *plog,
  -                                ap_pool_t *ptemp);
  +void modperl_init(server_rec *s, apr_pool_t *p);
  +void modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
  +                       apr_pool_t *ptemp, server_rec *s);
  +void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog,
  +                                apr_pool_t *ptemp);
   void modperl_register_hooks(void);
  -PerlInterpreter *modperl_startup(server_rec *s, ap_pool_t *p);
  +PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p);
   void xs_init(pTHXo);
   
   #endif /*  MOD_PERL_H */
  
  
  
  1.13      +11 -11    modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- modperl_callback.c	2000/06/13 21:05:39	1.12
  +++ modperl_callback.c	2000/08/14 03:10:45	1.13
  @@ -14,10 +14,10 @@
       POPSTACK;
   }
   
  -modperl_handler_t *modperl_handler_new(ap_pool_t *p, void *h, int type)
  +modperl_handler_t *modperl_handler_new(apr_pool_t *p, void *h, int type)
   {
       modperl_handler_t *handler = 
  -        (modperl_handler_t *)ap_pcalloc(p, sizeof(*handler));
  +        (modperl_handler_t *)apr_pcalloc(p, sizeof(*handler));
   
       switch (type) {
         case MP_HANDLER_TYPE_SV:
  @@ -30,13 +30,13 @@
           break;
       };
   
  -    ap_register_cleanup(p, (void*)handler,
  -                        modperl_handler_cleanup, ap_null_cleanup);
  +    apr_register_cleanup(p, (void*)handler,
  +                        modperl_handler_cleanup, apr_null_cleanup);
   
       return handler;
   }
   
  -ap_status_t modperl_handler_cleanup(void *data)
  +apr_status_t modperl_handler_cleanup(void *data)
   {
       modperl_handler_t *handler = (modperl_handler_t *)data;
       modperl_handler_unparse(handler);
  @@ -174,7 +174,7 @@
       if ((tmp = strstr(name, "->"))) {
           char class[256]; /*XXX*/
           int class_len = strlen(name) - strlen(tmp);
  -        ap_cpystrn(class, name, class_len+1);
  +        apr_cpystrn(class, name, class_len+1);
   
           MpHandlerMETHOD_On(handler);
           handler->cv = newSVpv(&tmp[2], 0);
  @@ -223,7 +223,7 @@
       return 0;
   }
   
  -int modperl_callback(pTHX_ modperl_handler_t *handler, ap_pool_t *p)
  +int modperl_callback(pTHX_ modperl_handler_t *handler, apr_pool_t *p)
   {
       dSP;
       int count, status;
  @@ -311,7 +311,7 @@
       MP_dSCFG(s);
       MP_dDCFG;
       modperl_handler_t **handlers;
  -    ap_pool_t *p = NULL;
  +    apr_pool_t *p = NULL;
       MpAV *av = NULL;
       int i, status = OK;
       const char *desc = NULL;
  @@ -402,14 +402,14 @@
                                   MP_HANDLER_TYPE_CONN);
   }
   
  -void modperl_process_callback(int idx, ap_pool_t *p, server_rec *s)
  +void modperl_process_callback(int idx, apr_pool_t *p, server_rec *s)
   {
       modperl_run_handlers(idx, NULL, NULL, s, MP_HANDLER_TYPE_PROC);
   }
   
   void modperl_files_callback(int idx,
  -                            ap_pool_t *pconf, ap_pool_t *plog,
  -                            ap_pool_t *ptemp, server_rec *s)
  +                            apr_pool_t *pconf, apr_pool_t *plog,
  +                            apr_pool_t *ptemp, server_rec *s)
   {
       modperl_run_handlers(idx, NULL, NULL, s, MP_HANDLER_TYPE_FILE);
   }
  
  
  
  1.8       +6 -6      modperl-2.0/src/modules/perl/modperl_callback.h
  
  Index: modperl_callback.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_callback.h	2000/06/20 16:04:38	1.7
  +++ modperl_callback.h	2000/08/14 03:10:45	1.8
  @@ -10,9 +10,9 @@
   #define ap_hook_fixup  ap_hook_fixups
   #define ap_hook_log    ap_hook_log_transaction
   
  -modperl_handler_t *modperl_handler_new(ap_pool_t *p, void *h, int type);
  +modperl_handler_t *modperl_handler_new(apr_pool_t *p, void *h, int type);
   
  -ap_status_t modperl_handler_cleanup(void *data);
  +apr_status_t modperl_handler_cleanup(void *data);
   
   void modperl_handler_cache_cv(pTHX_ modperl_handler_t *handler, CV *cv);
   
  @@ -23,16 +23,16 @@
   
   int modperl_handler_parse(pTHX_ modperl_handler_t *handler);
   
  -int modperl_callback(pTHX_ modperl_handler_t *handler, ap_pool_t *p);
  +int modperl_callback(pTHX_ modperl_handler_t *handler, apr_pool_t *p);
   
   int modperl_run_handlers(int idx, request_rec *r, conn_rec *c,
                            server_rec *s, int type);
   
  -void modperl_process_callback(int idx, ap_pool_t *p, server_rec *s);
  +void modperl_process_callback(int idx, apr_pool_t *p, server_rec *s);
   
   void modperl_files_callback(int idx,
  -                            ap_pool_t *pconf, ap_pool_t *plog,
  -                            ap_pool_t *ptemp, server_rec *s);
  +                            apr_pool_t *pconf, apr_pool_t *plog,
  +                            apr_pool_t *ptemp, server_rec *s);
   
   int modperl_per_dir_callback(int idx, request_rec *r);
   
  
  
  
  1.14      +19 -19    modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- modperl_config.c	2000/06/20 16:04:38	1.13
  +++ modperl_config.c	2000/08/14 03:10:45	1.14
  @@ -1,30 +1,30 @@
   #include "mod_perl.h"
   
   char *modperl_cmd_push_handlers(MpAV **handlers, const char *name,
  -                                ap_pool_t *p)
  +                                apr_pool_t *p)
   {
       modperl_handler_t *h = modperl_handler_new(p, (void*)name,
                                                  MP_HANDLER_TYPE_CHAR);
       if (!*handlers) {
  -        *handlers = ap_make_array(p, sizeof(modperl_handler_t), 1);
  +        *handlers = apr_make_array(p, sizeof(modperl_handler_t), 1);
           MP_TRACE_d(MP_FUNC, "created handler stack\n");
       }
   
       /* XXX parse_handler if Perl is running */
   
  -    *(modperl_handler_t **)ap_push_array(*handlers) = h;
  +    *(modperl_handler_t **)apr_push_array(*handlers) = h;
       MP_TRACE_d(MP_FUNC, "pushed handler: %s\n", h->name);
   
       return NULL;
   }
   
  -void *modperl_create_dir_config(ap_pool_t *p, char *dir)
  +void *modperl_create_dir_config(apr_pool_t *p, char *dir)
   {
       modperl_dir_config_t *dcfg = modperl_dir_config_new(p);
       return dcfg;
   }
   
  -void *modperl_merge_dir_config(ap_pool_t *p, void *basev, void *addv)
  +void *modperl_merge_dir_config(apr_pool_t *p, void *basev, void *addv)
   {
   #if 0
       modperl_dir_config_t
  @@ -42,7 +42,7 @@
   modperl_request_config_t *modperl_request_config_new(request_rec *r)
   {
       modperl_request_config_t *rcfg = 
  -        (modperl_request_config_t *)ap_pcalloc(r->pool, sizeof(*rcfg));
  +        (modperl_request_config_t *)apr_pcalloc(r->pool, sizeof(*rcfg));
   
       MP_TRACE_d(MP_FUNC, "0x%lx\n", (unsigned long)rcfg);
   
  @@ -50,34 +50,34 @@
   }
   
   #define scfg_push_argv(arg) \
  -    *(const char **)ap_push_array(scfg->argv) = arg
  +    *(const char **)apr_push_array(scfg->argv) = arg
   
  -modperl_srv_config_t *modperl_srv_config_new(ap_pool_t *p)
  +modperl_srv_config_t *modperl_srv_config_new(apr_pool_t *p)
   {
       modperl_srv_config_t *scfg = (modperl_srv_config_t *)
  -        ap_pcalloc(p, sizeof(*scfg));
  +        apr_pcalloc(p, sizeof(*scfg));
   
       scfg->flags = modperl_options_new(p, MpSrvType);
       MpSrvENABLED_On(scfg); /* mod_perl enabled by default */
       MpSrvHOOKS_ALL_On(scfg); /* all hooks enabled by default */
   
  -    scfg->argv = ap_make_array(p, 2, sizeof(char *));
  +    scfg->argv = apr_make_array(p, 2, sizeof(char *));
   
       scfg_push_argv((char *)ap_server_argv0);
   
   #ifdef MP_CONNECTION_NUM_HANDLERS
       scfg->connection_cfg = (modperl_connection_config_t *)
  -        ap_pcalloc(p, sizeof(*scfg->connection_cfg));
  +        apr_pcalloc(p, sizeof(*scfg->connection_cfg));
   #endif
   
   #ifdef MP_FILES_NUM_HANDLERS
       scfg->files_cfg = (modperl_files_config_t *)
  -        ap_pcalloc(p, sizeof(*scfg->files_cfg));
  +        apr_pcalloc(p, sizeof(*scfg->files_cfg));
   #endif
   
   #ifdef MP_PROCESS_NUM_HANDLERS
       scfg->process_cfg = (modperl_process_config_t *)
  -        ap_pcalloc(p, sizeof(*scfg->process_cfg));
  +        apr_pcalloc(p, sizeof(*scfg->process_cfg));
   #endif
   
       MP_TRACE_d(MP_FUNC, "0x%lx\n", (unsigned long)scfg);
  @@ -85,10 +85,10 @@
       return scfg;
   }
   
  -modperl_dir_config_t *modperl_dir_config_new(ap_pool_t *p)
  +modperl_dir_config_t *modperl_dir_config_new(apr_pool_t *p)
   {
       modperl_dir_config_t *dcfg = (modperl_dir_config_t *)
  -        ap_pcalloc(p, sizeof(modperl_dir_config_t));
  +        apr_pcalloc(p, sizeof(modperl_dir_config_t));
   
       MP_TRACE_d(MP_FUNC, "0x%lx\n", (unsigned long)dcfg);
   
  @@ -118,14 +118,14 @@
       return (char **)scfg->argv->elts;
   }
   
  -void *modperl_create_srv_config(ap_pool_t *p, server_rec *s)
  +void *modperl_create_srv_config(apr_pool_t *p, server_rec *s)
   {
       modperl_srv_config_t *scfg = modperl_srv_config_new(p);
   
   #ifdef USE_ITHREADS
       scfg->interp_pool_cfg = 
           (modperl_tipool_config_t *)
  -        ap_pcalloc(p, sizeof(*scfg->interp_pool_cfg));
  +        apr_pcalloc(p, sizeof(*scfg->interp_pool_cfg));
   
       /* XXX: determine reasonable defaults */
       scfg->interp_pool_cfg->start = 3;
  @@ -142,7 +142,7 @@
   mrg->item = add->item ? add->item : base->item
   
   /* XXX: this is not complete */
  -void *modperl_merge_srv_config(ap_pool_t *p, void *basev, void *addv)
  +void *modperl_merge_srv_config(apr_pool_t *p, void *basev, void *addv)
   {
       modperl_srv_config_t
           *base = (modperl_srv_config_t *)basev,
  @@ -207,7 +207,7 @@
   MP_DECLARE_SRV_CMD(options)
   {
       MP_dSCFG(parms->server);
  -    ap_pool_t *p = parms->pool;
  +    apr_pool_t *p = parms->pool;
       const char *error;
   
       MP_TRACE_d(MP_FUNC, "arg = %s\n", arg);
  
  
  
  1.14      +7 -7      modperl-2.0/src/modules/perl/modperl_config.h
  
  Index: modperl_config.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- modperl_config.h	2000/06/20 16:04:39	1.13
  +++ modperl_config.h	2000/08/14 03:10:45	1.14
  @@ -1,22 +1,22 @@
   #ifndef MODPERL_CONFIG_H
   #define MODPERL_CONFIG_H
   
  -void *modperl_create_dir_config(ap_pool_t *p, char *dir);
  +void *modperl_create_dir_config(apr_pool_t *p, char *dir);
   
  -void *modperl_merge_dir_config(ap_pool_t *p, void *basev, void *addv);
  +void *modperl_merge_dir_config(apr_pool_t *p, void *basev, void *addv);
   
  -modperl_srv_config_t *modperl_srv_config_new(ap_pool_t *p);
  +modperl_srv_config_t *modperl_srv_config_new(apr_pool_t *p);
   
  -modperl_dir_config_t *modperl_dir_config_new(ap_pool_t *p);
  +modperl_dir_config_t *modperl_dir_config_new(apr_pool_t *p);
   
   modperl_request_config_t *modperl_request_config_new(request_rec *r);
   
  -void *modperl_create_srv_config(ap_pool_t *p, server_rec *s);
  +void *modperl_create_srv_config(apr_pool_t *p, server_rec *s);
   
  -void *modperl_merge_srv_config(ap_pool_t *p, void *basev, void *addv);
  +void *modperl_merge_srv_config(apr_pool_t *p, void *basev, void *addv);
   
   char *modperl_cmd_push_handlers(MpAV **handlers, const char *name,
  -                                ap_pool_t *p);
  +                                apr_pool_t *p);
   
   char **modperl_srv_config_argv_init(modperl_srv_config_t *scfg, int *argc);
   
  
  
  
  1.4       +11 -11    modperl-2.0/src/modules/perl/modperl_gtop.c
  
  Index: modperl_gtop.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_gtop.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_gtop.c	2000/06/20 16:04:39	1.3
  +++ modperl_gtop.c	2000/08/14 03:10:45	1.4
  @@ -5,45 +5,45 @@
   static int modperl_gtop_size_string(size_t size, char *size_string)
   {
       if (size == (size_t)-1) {
  -        ap_snprintf(size_string, MP_GTOP_SSS, "-");
  +        apr_snprintf(size_string, MP_GTOP_SSS, "-");
       }
       else if (!size) {
  -        ap_snprintf(size_string, MP_GTOP_SSS, "0k");
  +        apr_snprintf(size_string, MP_GTOP_SSS, "0k");
       }
       else if (size < 1024) {
  -	ap_snprintf(size_string, MP_GTOP_SSS, "1k");
  +	apr_snprintf(size_string, MP_GTOP_SSS, "1k");
       }
       else if (size < 1048576) {
  -	ap_snprintf(size_string, MP_GTOP_SSS, "%dk",
  +	apr_snprintf(size_string, MP_GTOP_SSS, "%dk",
                       (size + 512) / 1024);
       }
       else if (size < 103809024) {
  -	ap_snprintf(size_string, MP_GTOP_SSS, "%.1fM",
  +	apr_snprintf(size_string, MP_GTOP_SSS, "%.1fM",
                       size / 1048576.0);
       }
       else {
  -	ap_snprintf(size_string, MP_GTOP_SSS, "%dM",
  +	apr_snprintf(size_string, MP_GTOP_SSS, "%dM",
                       (size + 524288) / 1048576);
       }
   
       return 1;
   }
   
  -static ap_status_t modperl_gtop_exit(void *data)
  +static apr_status_t modperl_gtop_exit(void *data)
   {
       glibtop_close();
       return APR_SUCCESS;
   }
   
  -modperl_gtop_t *modperl_gtop_new(ap_pool_t *p)
  +modperl_gtop_t *modperl_gtop_new(apr_pool_t *p)
   {
       modperl_gtop_t *gtop = 
  -        (modperl_gtop_t *)ap_pcalloc(p, sizeof(*gtop));
  +        (modperl_gtop_t *)apr_pcalloc(p, sizeof(*gtop));
   
       gtop->pid = getpid();
       glibtop_init();
  -    ap_register_cleanup(p, NULL,
  -                        modperl_gtop_exit, ap_null_cleanup);
  +    apr_register_cleanup(p, NULL,
  +                         modperl_gtop_exit, apr_null_cleanup);
   
       return gtop;
   }
  
  
  
  1.2       +1 -1      modperl-2.0/src/modules/perl/modperl_gtop.h
  
  Index: modperl_gtop.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_gtop.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_gtop.h	2000/04/17 07:10:35	1.1
  +++ modperl_gtop.h	2000/08/14 03:10:45	1.2
  @@ -28,7 +28,7 @@
       modperl_gtop_proc_mem_ss proc_mem_ss;
   } modperl_gtop_t;
   
  -modperl_gtop_t *modperl_gtop_new(ap_pool_t *p);
  +modperl_gtop_t *modperl_gtop_new(apr_pool_t *p);
   void modperl_gtop_get_proc_mem_before(modperl_gtop_t *gtop);
   void modperl_gtop_get_proc_mem_after(modperl_gtop_t *gtop);
   void modperl_gtop_report_proc_mem(modperl_gtop_t *gtop, 
  
  
  
  1.16      +19 -19    modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- modperl_interp.c	2000/06/12 03:30:56	1.15
  +++ modperl_interp.c	2000/08/14 03:10:45	1.16
  @@ -7,12 +7,12 @@
   
   #ifdef USE_ITHREADS
   
  -modperl_interp_t *modperl_interp_new(ap_pool_t *p,
  +modperl_interp_t *modperl_interp_new(apr_pool_t *p,
                                        modperl_interp_pool_t *mip,
                                        PerlInterpreter *perl)
   {
       modperl_interp_t *interp = 
  -        (modperl_interp_t *)ap_pcalloc(p, sizeof(*interp));
  +        (modperl_interp_t *)apr_pcalloc(p, sizeof(*interp));
       
       interp->mip = mip;
   
  @@ -66,7 +66,7 @@
       perl_free(interp->perl);
   }
   
  -ap_status_t modperl_interp_cleanup(void *data)
  +apr_status_t modperl_interp_cleanup(void *data)
   {
       modperl_interp_destroy((modperl_interp_t *)data);
       return APR_SUCCESS;
  @@ -99,7 +99,7 @@
       return interp;
   }
   
  -ap_status_t modperl_interp_pool_destroy(void *data)
  +apr_status_t modperl_interp_pool_destroy(void *data)
   {
       modperl_interp_pool_t *mip = (modperl_interp_pool_t *)data;
   
  @@ -154,14 +154,14 @@
       interp_pool_dump,
   };
   
  -void modperl_interp_init(server_rec *s, ap_pool_t *p,
  +void modperl_interp_init(server_rec *s, apr_pool_t *p,
                            PerlInterpreter *perl)
   {
       pTHX;
       MP_dSCFG(s);
   
       modperl_interp_pool_t *mip = 
  -        (modperl_interp_pool_t *)ap_pcalloc(p, sizeof(*mip));
  +        (modperl_interp_pool_t *)apr_pcalloc(p, sizeof(*mip));
   
       modperl_tipool_t *tipool = 
           modperl_tipool_new(p, scfg->interp_pool_cfg,
  @@ -175,13 +175,13 @@
       
       modperl_tipool_init(tipool);
   
  -    ap_register_cleanup(p, (void*)mip,
  -                        modperl_interp_pool_destroy, ap_null_cleanup);
  +    apr_register_cleanup(p, (void*)mip,
  +                         modperl_interp_pool_destroy, apr_null_cleanup);
   
       scfg->mip = mip;
   }
   
  -ap_status_t modperl_interp_unselect(void *data)
  +apr_status_t modperl_interp_unselect(void *data)
   {
       modperl_interp_t *interp = (modperl_interp_t *)data;
       modperl_interp_pool_t *mip = interp->mip;
  @@ -204,12 +204,12 @@
                                           server_rec *s)
   {
       modperl_interp_t *interp;
  -    ap_pool_t *p = NULL;
  +    apr_pool_t *p = NULL;
       const char *desc = NULL;
   
       if (c) {
           desc = "conn_rec pool";
  -        (void)ap_get_userdata((void **)&interp, MP_INTERP_KEY, c->pool);
  +        (void)apr_get_userdata((void **)&interp, MP_INTERP_KEY, c->pool);
   
           if (interp) {
               MP_TRACE_i(MP_FUNC,
  @@ -222,7 +222,7 @@
       }
       else if (r) {
           desc = "request_rec pool";
  -        (void)ap_get_userdata((void **)&interp, MP_INTERP_KEY, r->pool);
  +        (void)apr_get_userdata((void **)&interp, MP_INTERP_KEY, r->pool);
   
           if (interp) {
               MP_TRACE_i(MP_FUNC,
  @@ -232,8 +232,8 @@
           }
   
           /* might have already been set by a ConnectionHandler */
  -        (void)ap_get_userdata((void **)&interp, MP_INTERP_KEY,
  -                              r->connection->pool);
  +        (void)apr_get_userdata((void **)&interp, MP_INTERP_KEY,
  +                               r->connection->pool);
           if (interp) {
               desc = "r->connection pool";
               MP_TRACE_i(MP_FUNC,
  @@ -255,9 +255,9 @@
       interp = modperl_interp_get(s ? s : r->server);
       ++interp->num_requests; /* should only get here once per request */
   
  -    (void)ap_set_userdata((void *)interp, MP_INTERP_KEY,
  -                          modperl_interp_unselect,
  -                          p);
  +    (void)apr_set_userdata((void *)interp, MP_INTERP_KEY,
  +                           modperl_interp_unselect,
  +                           p);
   
       MP_TRACE_i(MP_FUNC, "set interp 0x%lx in %s 0x%lx\n",
                  (unsigned long)interp, desc, (unsigned long)p);
  @@ -267,14 +267,14 @@
   
   #else
   
  -void modperl_interp_init(server_rec *s, ap_pool_t *p,
  +void modperl_interp_init(server_rec *s, apr_pool_t *p,
                            PerlInterpreter *perl)
   {
       MP_dSCFG(s);
       scfg->perl = perl;
   }
   
  -ap_status_t modperl_interp_cleanup(void *data)
  +apr_status_t modperl_interp_cleanup(void *data)
   {
       return APR_SUCCESS;
   }
  
  
  
  1.7       +5 -5      modperl-2.0/src/modules/perl/modperl_interp.h
  
  Index: modperl_interp.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_interp.h	2000/04/27 21:42:25	1.6
  +++ modperl_interp.h	2000/08/14 03:10:45	1.7
  @@ -1,14 +1,14 @@
   #ifndef MODPERL_INTERP_H
   #define MODPERL_INTERP_H
   
  -void modperl_interp_init(server_rec *s, ap_pool_t *p,
  +void modperl_interp_init(server_rec *s, apr_pool_t *p,
                            PerlInterpreter *perl);
   
  -ap_status_t modperl_interp_cleanup(void *data);
  +apr_status_t modperl_interp_cleanup(void *data);
   
   #ifdef USE_ITHREADS
   
  -modperl_interp_t *modperl_interp_new(ap_pool_t *p,
  +modperl_interp_t *modperl_interp_new(apr_pool_t *p,
                                        modperl_interp_pool_t *mip,
                                        PerlInterpreter *perl);
   
  @@ -16,12 +16,12 @@
   
   modperl_interp_t *modperl_interp_get(server_rec *s);
   
  -ap_status_t modperl_interp_unselect(void *data);
  +apr_status_t modperl_interp_unselect(void *data);
   
   modperl_interp_t *modperl_interp_select(request_rec *r, conn_rec *c,
                                           server_rec *s);
   
  -ap_status_t modperl_interp_pool_destroy(void *data);
  +apr_status_t modperl_interp_pool_destroy(void *data);
   
   void modperl_interp_pool_add(modperl_interp_pool_t *mip,
                                modperl_interp_t *interp);
  
  
  
  1.2       +5 -5      modperl-2.0/src/modules/perl/modperl_options.c
  
  Index: modperl_options.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_options.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_options.c	2000/06/13 21:04:52	1.1
  +++ modperl_options.c	2000/08/14 03:10:45	1.2
  @@ -13,10 +13,10 @@
       };
   }
   
  -modperl_options_t *modperl_options_new(ap_pool_t *p, int type)
  +modperl_options_t *modperl_options_new(apr_pool_t *p, int type)
   {
       modperl_options_t *options = 
  -        (modperl_options_t *)ap_pcalloc(p, sizeof(*options));
  +        (modperl_options_t *)apr_pcalloc(p, sizeof(*options));
   
       options->opts = options->unset = 
           (type == MpSrvType ? MpSrv_f_UNSET : MpDir_f_UNSET);
  @@ -24,7 +24,7 @@
       return options;
   }
   
  -const char *modperl_options_set(ap_pool_t *p, modperl_options_t *o,
  +const char *modperl_options_set(apr_pool_t *p, modperl_options_t *o,
                                   const char *str)
   {
       modperl_opts_t opt;
  @@ -36,7 +36,7 @@
       }
   
       if (!(opt = flags_lookup(o, str))) {
  -        error = ap_pstrcat(p, "Unknown PerlOption: ", str, NULL);
  +        error = apr_pstrcat(p, "Unknown PerlOption: ", str, NULL);
           return error;
       }
       
  @@ -57,7 +57,7 @@
       return NULL;
   }
   
  -modperl_options_t *modperl_options_merge(ap_pool_t *p,
  +modperl_options_t *modperl_options_merge(apr_pool_t *p,
                                            modperl_options_t *base,
                                            modperl_options_t *add)
   {
  
  
  
  1.2       +3 -3      modperl-2.0/src/modules/perl/modperl_options.h
  
  Index: modperl_options.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_options.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_options.h	2000/06/13 21:04:52	1.1
  +++ modperl_options.h	2000/08/14 03:10:45	1.2
  @@ -1,12 +1,12 @@
   #ifndef MODPERL_OPTIONS_H
   #define MODPERL_OPTIONS_H
   
  -modperl_options_t *modperl_options_new(ap_pool_t *p, int type);
  +modperl_options_t *modperl_options_new(apr_pool_t *p, int type);
   
  -const char *modperl_options_set(ap_pool_t *p, modperl_options_t *o,
  +const char *modperl_options_set(apr_pool_t *p, modperl_options_t *o,
                                   const char *s);
   
  -modperl_options_t *modperl_options_merge(ap_pool_t *p,
  +modperl_options_t *modperl_options_merge(apr_pool_t *p,
                                            modperl_options_t *base,
                                            modperl_options_t *new);
   
  
  
  
  1.5       +5 -5      modperl-2.0/src/modules/perl/modperl_tipool.c
  
  Index: modperl_tipool.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_tipool.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_tipool.c	2000/05/30 18:26:00	1.4
  +++ modperl_tipool.c	2000/08/14 03:10:45	1.5
  @@ -10,15 +10,15 @@
    * of PerlInterpreter objects.  it should be quite easy to reuse for
    * other data, such as database connection handles and the like.
    * while it is "generic" it is also tuned for Apache, making use of
  - * ap_pool_t and the like, and implementing start/max/{min,max}_spare/
  + * apr_pool_t and the like, and implementing start/max/{min,max}_spare/
    * max_requests configuration.
    * this is another "proof-of-concept", plenty of room for improvement here
    */
   
  -modperl_list_t *modperl_list_new(ap_pool_t *p)
  +modperl_list_t *modperl_list_new(apr_pool_t *p)
   {
       modperl_list_t *listp = 
  -        (modperl_list_t *)ap_pcalloc(p, sizeof(*listp));
  +        (modperl_list_t *)apr_pcalloc(p, sizeof(*listp));
       return listp;
   }
   
  @@ -143,13 +143,13 @@
       return list;
   }
   
  -modperl_tipool_t *modperl_tipool_new(ap_pool_t *p,
  +modperl_tipool_t *modperl_tipool_new(apr_pool_t *p,
                                        modperl_tipool_config_t *cfg,
                                        modperl_tipool_vtbl_t *func,
                                        void *data)
   {
       modperl_tipool_t *tipool =
  -        (modperl_tipool_t *)ap_pcalloc(p, sizeof(*tipool));
  +        (modperl_tipool_t *)apr_pcalloc(p, sizeof(*tipool));
   
       tipool->ap_pool = p;
       tipool->cfg = cfg;
  
  
  
  1.5       +2 -2      modperl-2.0/src/modules/perl/modperl_tipool.h
  
  Index: modperl_tipool.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_tipool.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_tipool.h	2000/06/20 16:04:41	1.4
  +++ modperl_tipool.h	2000/08/14 03:10:45	1.5
  @@ -3,7 +3,7 @@
   
   #ifdef USE_ITHREADS
   
  -modperl_list_t *modperl_list_new(ap_pool_t *p);
  +modperl_list_t *modperl_list_new(apr_pool_t *p);
   
   modperl_list_t *modperl_list_last(modperl_list_t *list);
   
  @@ -18,7 +18,7 @@
   modperl_list_t *modperl_list_remove(modperl_list_t *list,
                                       modperl_list_t *rlist);
   
  -modperl_tipool_t *modperl_tipool_new(ap_pool_t *p,
  +modperl_tipool_t *modperl_tipool_new(apr_pool_t *p,
                                        modperl_tipool_config_t *cfg,
                                        modperl_tipool_vtbl_t *func,
                                        void *data);
  
  
  
  1.15      +6 -6      modperl-2.0/src/modules/perl/modperl_types.h
  
  Index: modperl_types.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- modperl_types.h	2000/06/13 21:05:39	1.14
  +++ modperl_types.h	2000/08/14 03:10:45	1.15
  @@ -3,8 +3,8 @@
   
   /* aliases */
   
  -typedef ap_array_header_t MpAV;
  -typedef ap_table_t        MpHV;
  +typedef apr_array_header_t MpAV;
  +typedef apr_table_t        MpHV;
   
   /* xs typemap */
   
  @@ -18,8 +18,8 @@
   typedef handler_rec *  Apache__Handler;
   typedef command_rec *  Apache__Command;
   
  -typedef ap_table_t   * Apache__table;
  -typedef ap_pool_t    * Apache__Pool;
  +typedef apr_table_t   * Apache__table;
  +typedef apr_pool_t    * Apache__Pool;
   
   /* mod_perl structures */
   
  @@ -71,7 +71,7 @@
   struct modperl_tipool_t {
       perl_mutex tiplock;
       perl_cond available;
  -    ap_pool_t *ap_pool;
  +    apr_pool_t *ap_pool;
       modperl_list_t *idle, *busy;
       int in_use; /* number of items currrently in use */
       int size; /* current number of items */
  @@ -81,7 +81,7 @@
   };
   
   struct modperl_interp_pool_t {
  -    ap_pool_t *ap_pool;
  +    apr_pool_t *ap_pool;
       server_rec *server;
       modperl_tipool_t *tipool;
       modperl_tipool_config_t *tipool_cfg;
  
  
  

Mime
View raw message