perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: svn commit: r160128 - perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm
Date Tue, 05 Apr 2005 15:39:16 GMT
Geoffrey Young wrote:
>>>     '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 Code.pm 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 :)

in which case please keep it as it is. I didn't know there was a lot of 
mess involved.

>>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.
> 
> :)

:)


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message