Passing flags to functions
| From: | Andrei Zmievski | Date: | Sat, 11 Dec 1999 22:46:42 +0000 |
| Subject: | Passing flags to functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13592@lists.php.net to get a copy of this message | ||
I want to put this up for discussion.
Is there a better way to pass flags to C functions than registering
constants like SYSLOG_*, EXTR_*, etc. and then comparing the passed flag
value to the internal #define with the same name? What if I want to pass
flags that can be OR'ed together? Any ideas on how to make it work
better?
-Andrei
"Hack: 1. n. Originally, a quick job that produces what is
needed, but not well.
2. n. An incredibly good, and perhaps very time-consuming,
piece of work that produces exactly what is needed."
-- Jargon File