Re: ext_skel broken

From: Date: Thu, 05 Oct 2000 19:12:21 +0000
Subject: Re: ext_skel broken
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-34334@lists.php.net to get a copy of this message
The fix looks fine. Can't think of something else right now. Andi At 12:04 PM 10/5/00 -0700, Rasmus Lerdorf wrote:
ext_skel needs to be updated. Looks like a simple enough fix, but just wanted to bounce it off of people. I am getting: stocks.c:29: parse error before `stocks_globals' stocks.c:29: warning: data definition has no type or storage class make[1]: *** [stocks.lo] Error 1 make[1]: Leaving directory `/home/rasmus/php4/ext/stocks' The generated stocks.c has: #include "php.h" #include "php_ini.h" #include "php_stocks.h" #if HAVE_STOCKS
ZEND_DECLARE_MODULE_GLOBALS(stocks)    <== line 29
The generated php_stocks.h has: ... typedef struct {
    /* You can use the next one as type if your module registers any
       resources. Oh, you can of course rename it to something more
       suitable, add list entry types or remove it if it not needed.
       It's just an example.
    */
    int le_stocks;
} php_stocks_globals; #ifdef ZTS #define STOCKSG(v) (stocks_globals->v) #define STOCKSLS_FETCH() php_stocks_globals *stocks_globals = ts_resource(stocks_globals_id) #else #define STOCKSG(v) (stocks_globals.v) #define STOCKSLS_FETCH() #endif ... Instead of the typedef it generates it looks like it should be generating: ZEND_BEGIN_MODULE_GLOBALS(stocks)
    int le_stocks;
ZEND_END_MODULE_GLOBALS(stocks) Anything else we need to change? I have been pitching how easy it is to build PHP extensions to people and it is very important to get people writing extensions so we need to be very careful about not breaking the various tools we provide to help people create extensions. -Rasmus -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#34334) next »