ext_skel broken

From: Date: Thu, 05 Oct 2000 19:04:49 +0000
Subject: ext_skel broken
Groups: php.dev 
Request: Send a blank email to php-dev+get-34333@lists.php.net to get a copy of this message
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

« previous php.dev (#34333) next »