cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2001-10-05 Thread dougm

dougm   01/10/05 16:38:56

  Modified:xs/tables/current/Apache ConstantsTable.pm FunctionTable.pm
StructureTable.pm
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.15  +5 -1  modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm
  
  Index: ConstantsTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ConstantsTable.pm 2001/09/06 05:16:25 1.14
  +++ ConstantsTable.pm 2001/10/05 23:38:56 1.15
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Sun Aug 19 11:43:53 2001
  +# !  Fri Oct  5 16:35:50 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -187,6 +187,10 @@
 'APR_URI_UNP_REVEALPASSWORD',
 'APR_URI_UNP_OMITPATHINFO',
 'APR_URI_UNP_OMITQUERY'
  +],
  +'table' = [
  +  'APR_OVERLAP_TABLES_SET',
  +  'APR_OVERLAP_TABLES_MERGE'
   ],
   'socket' = [
 'APR_SO_LINGER',
  
  
  
  1.21  +55 -443   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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FunctionTable.pm  2001/09/25 18:02:39 1.20
  +++ FunctionTable.pm  2001/10/05 23:38:56 1.21
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Tue Sep 25 10:58:26 2001
  +# !  Fri Oct  5 16:35:58 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -8891,6 +8891,20 @@
 },
 {
   'return_type' = 'void',
  +'name' = 'apr_pool_lock',
  +'args' = [
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'p'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'writeprotect'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
   'name' = 'apr_pool_note_subprocess',
   'args' = [
 {
  @@ -9121,6 +9135,16 @@
   ]
 },
 {
  +'return_type' = 'apr_pool_t *',
  +'name' = 'apr_proc_mutex_pool_get',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t *',
  +'name' = 'ob'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'apr_status_t',
   'name' = 'apr_proc_mutex_trylock',
   'args' = [
  @@ -10089,448 +10113,6 @@
   ]
 },
 {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_blocks_create',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t **',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'pms'
  -  },
  -  {
  -'type' = 'apr_size_t',
  -'name' = 'block_size'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'void *',
  -'name' = 'apr_sms_calloc',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_size_t',
  -'name' = 'size'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_register',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_int32_t',
  -'name' = 'type'
  -  },
  -  {
  -'type' = 'const void *',
  -'name' = 'data'
  -  },
  -  {
  -'type' = 'apr_status_t (*cleanup_fn)(void *)',
  -'name' = 'arg3'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_run',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_int32_t',
  -'name' = 'type'
  -  },
  -  {
  -'type' = 'const void *',
  -'name' = 'data'
  -  },
  -  {
  -'type' = 'apr_status_t (*cleanup)(void *)',
  -'name' = 'arg3'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_run_type',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_int32_t',
  -'name' = 'type'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_unregister',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -

cvs commit: modperl-2.0/xs/maps apache_structures.map

2001-10-05 Thread dougm

dougm   01/10/05 16:39:32

  Modified:xs/maps  apache_structures.map
  Log:
  request_rec.content_language no longer exists
  
  Revision  ChangesPath
  1.10  +0 -1  modperl-2.0/xs/maps/apache_structures.map
  
  Index: apache_structures.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apache_structures.map 2001/09/10 05:49:04 1.9
  +++ apache_structures.map 2001/10/05 23:39:31 1.10
  @@ -44,7 +44,6 @@
  content_type
  handler
  content_encoding
  -   content_language
  content_languages
 vlist_validator
  user
  
  
  



cvs commit: modperl-2.0/t/hooks authen.t

2001-10-05 Thread dougm

dougm   01/10/05 17:05:59

  Modified:t/hooks  authen.t
  Log:
  s/ok/sok/g so we can run individual tests
  
  Revision  ChangesPath
  1.4   +13 -5 modperl-2.0/t/hooks/authen.t
  
  Index: authen.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/hooks/authen.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- authen.t  2001/04/04 04:37:02 1.3
  +++ authen.t  2001/10/06 00:05:59 1.4
  @@ -8,14 +8,22 @@
   
   my $location = /TestHooks::authen;
   
  -ok ! GET_OK $location;
  +sok {
  +! GET_OK $location;
  +};
   
  -my $rc = GET_RC $location;
  +sok {
  +my $rc = GET_RC $location;
  +$rc == 401;
  +};
   
  -ok $rc == 401;
  +sok {
  +GET_OK $location, username = 'dougm', password = 'foo';
  +};
   
  -ok GET_OK $location, username = 'dougm', password = 'foo';
  +sok {
  +! GET_OK $location, username = 'dougm', password = 'wrong';
  +};
   
  -ok ! GET_OK $location, username = 'dougm', password = 'wrong';
   
   
  
  
  



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2001-10-05 Thread dougm

dougm   01/10/05 18:03:28

  Modified:lib/Apache compat.pm
   src/modules/perl modperl_util.c modperl_util.h
   t/response/TestAPI module.pm
   todo api.txt
   xs/Apache/Module Apache__Module.h
   xs/maps  apache_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  add Apache::Module::loaded function
  and Apache::module wrapper in Apache::compat
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.16  +5 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- compat.pm 2001/10/01 09:04:10 1.15
  +++ compat.pm 2001/10/06 01:03:26 1.16
  @@ -42,6 +42,11 @@
   sub untaint {
   }
   
  +sub module {
  +require Apache::Module;
  +return Apache::Module::loaded($_[1]);
  +}
  +
   package Apache::Constants;
   
   use Apache::Const ();
  
  
  
  1.20  +5 -0  modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- modperl_util.c2001/09/28 20:11:01 1.19
  +++ modperl_util.c2001/10/06 01:03:27 1.20
  @@ -443,3 +443,8 @@
   
   return RETVAL;
   }
  +
  +MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name)
  +{
  +return gv_stashpv(name, FALSE) ? 1 : 0;
  +}
  
  
  
  1.20  +2 -0  modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- modperl_util.h2001/09/28 20:11:01 1.19
  +++ modperl_util.h2001/10/06 01:03:27 1.20
  @@ -72,4 +72,6 @@
   SV *modperl_table_get_set(pTHX_ apr_table_t *table, char *key,
 SV *sv_val, bool do_taint);
   
  +MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name);
  +
   #endif /* MODPERL_UTIL_H */
  
  
  
  1.2   +65 -9 modperl-2.0/t/response/TestAPI/module.pm
  
  Index: module.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- module.pm 2001/04/04 05:45:48 1.1
  +++ module.pm 2001/10/06 01:03:27 1.2
  @@ -4,32 +4,88 @@
   use warnings FATAL = 'all';
   
   use Apache::Test;
  +use Apache::TestConfig;
  +use Apache::TestUtil;
   use Apache::Module ();
   use DynaLoader ();
   
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 6;
  +my $cfg = Apache::Test::config();
   
  +plan $r, tests = 14;
  +
   my $top_module = Apache::Module-top_module;
   
   ok $top_module;
  +
  +ok t_cmp($cfg-{httpd_info}-{MODULE_MAGIC_NUMBER},
  + $top_module-version . ':0',
  + q{$top_module-version});
  +
  +ok t_cmp(scalar keys %{ $cfg-{modules} },
  + $top_module-module_index,
  + q{$top_module-module_index});
  +
  +#XXX: some of these tests will fail if modperl is linked static
  +#rather than dso.  also no promise that mod_perl will be the top_module
  +
  +ok t_cmp('mod_perl.c', $top_module-name(), q{$top_module-name});
   
  -ok $top_module-version;
  +my $cmd = $top_module-cmds;
   
  -ok $top_module-module_index;
  +ok defined $cmd;
   
  -ok $top_module-name;
  +ok UNIVERSAL::isa($cmd, 'Apache::Command');
   
  -ok $top_module-cmds;
  +{
  +local $cfg-{modules}-{'mod_perl.c'} = 1;
  +my $modules = {};
   
  -for (my $modp = $top_module; $modp; $modp = $modp-next) {
  -if ($modp-name eq 'mod_perl.c') {
  -ok 1;
  -last;
  +for (my $modp = $top_module; $modp; $modp = $modp-next) {
  +if ($modp  $modp-name) {
  +$modules-{$modp-name} = 1;
  +}
   }
  +
  +my %alias = (
  +'sapi_apache2.c' = 'mod_php4.c',
  +);
  +
  +while (my($key, $val) = each %alias) {
  +next unless $modules-{$key};
  +delete $modules-{$key};
  +$modules-{$val} = 1;
  +}
  +
  +ok t_cmp($cfg-{modules}, $modules, Modules list);
   }
  +
  +#.c
  +ok t_cmp(1, Apache::Module::loaded('mod_perl.c'),
  + Apache::Module::loaded('mod_perl.c'));
  +
  +ok t_cmp(0, Apache::Module::loaded('Apache__Module_foo.c'),
  +