You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by do...@apache.org on 2001/02/02 06:56:13 UTC

cvs commit: apr-util/include apr_hooks.h

dougm       01/02/01 21:56:12

  Modified:    include  apr_getopt.h apr_hash.h
               include  apr_hooks.h
  Log:
  be consistent with 'const char * const *' spacing (noticed when parsing the tree with C::Scan)
  
  Revision  Changes    Path
  1.30      +1 -1      apr/include/apr_getopt.h
  
  Index: apr_getopt.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_getopt.h,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- apr_getopt.h	2001/01/18 20:07:19	1.29
  +++ apr_getopt.h	2001/02/02 05:56:12	1.30
  @@ -118,7 +118,7 @@
    * @deffunc apr_status_t apr_initopt(apr_getopt_t **os, apr_pool_t *cont,int argc, char *const *argv)
    */
   APR_DECLARE(apr_status_t) apr_initopt(apr_getopt_t **os, apr_pool_t *cont,
  -                                      int argc, const char *const *argv);
  +                                      int argc, const char * const *argv);
   
   /**
    * Parse the options initialized by apr_initopt().
  
  
  
  1.21      +2 -2      apr/include/apr_hash.h
  
  Index: apr_hash.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_hash.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apr_hash.h	2001/01/18 20:07:19	1.20
  +++ apr_hash.h	2001/02/02 05:56:12	1.21
  @@ -121,8 +121,8 @@
    * @return Returns NULL if the key is not present.
    * @deffunc void *apr_hash_get(apr_hash_t *ht, const void *key, apr_size_t klen)
    */
  -APR_DECLARE(void*) apr_hash_get(apr_hash_t *ht, const void *key,
  -                                apr_ssize_t klen);
  +APR_DECLARE(void *) apr_hash_get(apr_hash_t *ht, const void *key,
  +                                 apr_ssize_t klen);
   
   /**
    * Start iterating over the entries in a hash table.
  
  
  
  1.36      +1 -1      apr-util/include/apr_hooks.h
  
  Index: apr_hooks.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apr_hooks.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- apr_hooks.h	2001/01/24 22:52:56	1.35
  +++ apr_hooks.h	2001/02/02 05:56:12	1.36
  @@ -70,7 +70,7 @@
   #define APR_DECLARE_EXTERNAL_HOOK(ns,link,ret,name,args) \
   typedef ret ns##_HOOK_##name##_t args; \
   link##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf, \
  -                                      const char* const* aszPre, \
  +                                      const char * const *aszPre, \
                                         const char * const *aszSucc, int nOrder); \
   link##_DECLARE(ret) ns##_run_##name args; \
   typedef struct ns##_LINK_##name##_t \
  
  
  

Re: cvs commit: apr-util/include apr_hooks.h

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 2 Feb 2001, Greg Stein wrote:
 
> Are those "ap" structures from Apache? Conversely, they aren't appearing
> within APR(UTIL) are they?

the list of "ap" structures is below, ap_LINK_* make up 20 of the 39
reported.

ap_bucket_error
ap_directive_t
ap_filter_func
ap_filter_rec_t
ap_filter_t
ap_LINK_access_checker_t
ap_LINK_auth_checker_t
ap_LINK_check_user_id_t
ap_LINK_child_init_t
ap_LINK_default_port_t
ap_LINK_fixups_t
ap_LINK_handler_t
ap_LINK_header_parser_t
ap_LINK_http_method_t
ap_LINK_insert_filter_t
ap_LINK_log_transaction_t
ap_LINK_open_logs_t
ap_LINK_optional_fn_retrieve_t
ap_LINK_post_config_t
ap_LINK_post_read_request_t
ap_LINK_pre_config_t
ap_LINK_pre_connection_t
ap_LINK_process_connection_t
ap_LINK_translate_name_t
ap_LINK_type_checker_t
ap_method_list_t
ap_status_table_row_t
ap_text
ap_text_header
ap_xml_attr
ap_xml_doc
ap_xml_elem
command_rec
conn_rec
module
process_rec
request_rec
server_addr_rec
server_rec


Re: cvs commit: apr-util/include apr_hooks.h

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Feb 02, 2001 at 10:59:59AM -0800, Doug MacEachern wrote:
>...
> i'm planning to use these tables for generating most of the modperl-2.0
> glue code.  but it can be used for whatever, here's some sorta neato
> stats (probably not 100% accurate):
> 
> % perl util/source_stats.pl
> 80 typedefs
>    apr: 55
>     ap: 25
> 71 typedef_structs
>    apr: 32
>     ap: 39
> 609 functions
>    apr: 319
>     ap: 290
> 431 struct_members
>    apr: 147
>     ap: 284

Are those "ap" structures from Apache? Conversely, they aren't appearing
within APR(UTIL) are they?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apr-util/include apr_hooks.h

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 2 Feb 2001, Ben Laurie wrote:
 
> What's C::Scan??

http://www.cpan.org/modules/by-module/C/

i'm using a wrapper around it (Apache::ParseSource), that spits out two
other modules which are Perl structures containing the parsed header
files.  Apache::FunctionTable entries look like so:

  {
    'return_type' => 'int',
    'name' => 'ap_set_keepalive',
    'args' => [
      {
        'type' => 'request_rec *',
        'name' => 'r'
      }
    ],
  }

and Apache::StructureTable entries like so:

  {
    'type' => 'server_addr_rec',
    'elts' => [
      {
        'type' => 'server_addr_rec *',
        'name' => 'next'
      },
      {
        'type' => 'apr_sockaddr_t *',
        'name' => 'host_addr'
      },
      {
        'type' => 'apr_port_t',
        'name' => 'host_port'
      },
      {
        'type' => 'char *',
        'name' => 'virthost'
      }
    ],
  },

i'm planning to use these tables for generating most of the modperl-2.0
glue code.  but it can be used for whatever, here's some sorta neato
stats (probably not 100% accurate):

% perl util/source_stats.pl
80 typedefs
   apr: 55
    ap: 25
71 typedef_structs
   apr: 32
    ap: 39
609 functions
   apr: 319
    ap: 290
431 struct_members
   apr: 147
    ap: 284

% cat util/source_stats.pl

use strict;
use Apache::FunctionTable ();
use Apache::StructureTable ();

my %stats;

for my $entry (@$Apache::FunctionTable) {
    unless ($entry->{name} =~ /^(ap|apr)_/) {
        print "found alien function $entry->{name}\n";
    }

    $stats{functions}->{$1}++;
}

for my $entry (@$Apache::StructureTable) {
    my $elts = $entry->{elts};
    my $type = $entry->{type};

    my $c = $type =~ /^apr_/ ? "apr" : "ap";

    if (@$elts) {
        $stats{typedef_structs}->{$c}++;
        $stats{struct_members}->{$c} += @$elts;
    }
    else {
        $stats{typedefs}->{$c}++;
    }
}

while (my($name, $tab) = each %stats) {
    printf "%d %s\n", $tab->{ap} + $tab->{apr}, $name;
    for (qw(apr ap)) {
        printf "%6s: %d\n", $_, $tab->{$_};
    }
}


Re: cvs commit: apr-util/include apr_hooks.h

Posted by Ben Laurie <be...@algroup.co.uk>.
dougm@apache.org wrote:
> 
> dougm       01/02/01 21:56:12
> 
>   Modified:    include  apr_getopt.h apr_hash.h
>                include  apr_hooks.h
>   Log:
>   be consistent with 'const char * const *' spacing (noticed when parsing the tree with C::Scan)

What's C::Scan??

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: cvs commit: apr-util/include apr_hooks.h

Posted by Ben Laurie <be...@algroup.co.uk>.
dougm@apache.org wrote:
> 
> dougm       01/02/01 21:56:12
> 
>   Modified:    include  apr_getopt.h apr_hash.h
>                include  apr_hooks.h
>   Log:
>   be consistent with 'const char * const *' spacing (noticed when parsing the tree with C::Scan)

What's C::Scan??

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff