perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
Date Tue, 13 Nov 2001 02:22:18 GMT

>    #define mpxs_Apache_server(classname) \
>    modperl_global_get_server_rec()
>   +
>   +static MP_INLINE char *mpxs_ap_server_root_relative(pTHX_
>   +                                                    const char *fname,
>   +                                                    apr_pool_t *p)
>   +{
>   +    if (!p) {
>   +        /* XXX: should do something better if called at request time
>   +         * without a pool
>   +         */
>   +        p = modperl_global_get_pconf();
>   +    }
>   +    return ap_server_root_relative(p, fname);
>   +}
>   
  

ap_server_root_relative return the dir incliding the trailing / if fname==NULL, which is bad.


Any idea why is it so? And whether we can :


   char *dir;
   ...
   dir = ap_server_root_relative(p, fname);
   if (!fname)
       dir[strlen(dir)] = "\0";
   }

  return dir;



_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


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


Mime
View raw message