You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2005/04/05 06:20:42 UTC

Re: svn commit: r160128 - perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm

randyk@apache.org wrote:
> Author: randyk
> Date: Mon Apr  4 20:26:24 2005
> New Revision: 160128
> 
> URL: http://svn.apache.org/viewcvs?view=rev&rev=160128
> Log:
> update functiontable to reflect recent name changes.
> 
> Modified:
>     perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm
> 
> Modified: perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm
> URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm?view=diff&r1=160127&r2=160128
> ==============================================================================
> --- perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm (original)
> +++ perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm Mon Apr  4 20:26:24 2005
> @@ -1574,7 +1574,7 @@
>    },
>    {
>      'return_type' => 'const char **',
> -    'name' => 'modperl_constants_group_lookup_apache2',
> +    'name' => 'modperl_constants_group_lookup_apache2_const',

why was it renamed in first place? the function name now repeats 
"constants" twice, no?

-- 
__________________________________________________________________
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


Re: svn commit: r160128 - perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm

Posted by Stas Bekman <st...@stason.org>.
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


Re: svn commit: r160128 - perl/modperl/trunk/xs/tables/current/ModPerl/FunctionTable.pm

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>      '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 :)

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

:)

--Geoff

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