perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: svn commit: r160128 - perl/modperl/trunk/xs/tables/current/ModPerl/
Date Tue, 05 Apr 2005 12:40:38 GMT

>>      'return_type' => 'const char **',
>> -    'name' => 'modperl_constants_group_lookup_apache2',
>> +    'name' => 'modperl_constants_group_lookup_apache2_const',
> why was it renamed in first place? 

well, it has to do with the stuff in ModPerl::Code - these are autogenerated
based on the passed in class name, which is now Apache2::Const instead of
Apache2.  I fiddled with a few ways to implement this, and it wasn't
terribly easy, so this is what I came up with.

basically, the problem is that we're passing in Apache2::Const, which needs
to stay in tact so the generated modperl_constants stuff works:

    if (*name == 'A' && strnEQ(name, "Apache2::Const::", 16)) {
        name += 16;

    switch (*name) {

so, I can't lop it off completely.  but without lopping it off the names of
these funtions are generated as lookup_apache2_const.

I can try to look at the stuff some more, but that's part of the
problem with this type of thing - it makes lots of assumptions that are hard
to unassume later on, or at least for us mortals to figure out :)

> the function name now repeats
> "constants" twice, no?

yeah, I guess you're right.  if I needed to justify it it might be that
modperl_constants is the name of the C file, and lookup_apache2_const is the
name of the class it's looking up.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message