Re: OT: Add an optional Prefix to function names...
| From: | Mark Musone | Date: | Sun, 03 Jan 1999 15:20:04 +0000 |
| Subject: | Re: OT: Add an optional Prefix to function names... | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-3202@lists.php.net to get a copy of this message | ||
why not just put everything in an #ifdef PERFIX
Marfk
>
>
> I want to optional change function names...
>
> So Let's define PREFIX as imap_
>
> then I want the net_* functions to be imap_net_open
>
> You can use the ## preprocessor directive to alter somewhat
>
> #define net_open(PREFIX) PREFIX ## net_open
>
> Then
>
> net_open(imap_)(Args) is translated in imap_net_open
>
> But I want the prefix to be optional, but if you define PREFIX the
> preprocessor wants PREFIX_net_open() and that is not what I want.
>
> Is there a trick to do that?
>
> How can I define (optional, if PREFIX is defined) funtions with the PREFIX
> prefixed?
>
> Bram
>
> ......... Escape the 'Gates' of Hell
> `:::' ....... ...... Nederlandse
> ::: * `::. ::' Linux
> ::: .:: .:.::. .:: .:: `::. :' Gebruikersgroep
> ::: :: :: :: :: :: :::.
> ::: .::. .:: ::. `::::. .:' ::.
> http://www.nllgg.nl
> ...:::.....................::' .::::..
> disable crashes & enable power; install linux
>
>
> --
> PHP Development Mailing List http://www.php.net/
> To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
> For help: php-dev-help@lists.php.net
>
>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net