Re: [PHP-CVS] com php-src: Strong types for the result codes SUCCESS & FAILURE. These are common symbol names and using #defines can cause conflicts.: Zend/zend.h
Good idea! Am 26.08.2012 um 19:47 schrieb Stas Malyshev : > Hi! > >> +typedef enum { >> + SUCCESS = 0, >> + FAILURE = -1, /* this MUST stay a negative number, or it may >> affect functions! */ >> +} RESULT_CODE; > > If you use a type here, I'd suggest using zend_ prefix since otherwise > you just stomp on another (frequently used) global symbol. > > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Strong types for the result codes SUCCESS & FAILURE. These are common symbol names and using #defines can cause conflicts.: Zend/zend.h
Hi! > +typedef enum { > + SUCCESS = 0, > + FAILURE = -1, /* this MUST stay a negative number, or it may > affect functions! */ > +} RESULT_CODE; If you use a type here, I'd suggest using zend_ prefix since otherwise you just stomp on another (frequently used) global symbol. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php