cvs: php4 /ext/swf swf.c

From: Date: Sat, 11 May 2002 15:58:56 +0000
Subject: cvs: php4 /ext/swf swf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11833@lists.php.net to get a copy of this message
sterling Sat May 11 11:58:56 2002 EDT Modified files: /php4/ext/swf swf.c Log: allocate globals, making this work in zts mode (not that it really matters, since libswf isn't thread safe...) Index: php4/ext/swf/swf.c diff -u php4/ext/swf/swf.c:1.44 php4/ext/swf/swf.c:1.45 --- php4/ext/swf/swf.c:1.44 Tue Dec 11 10:30:38 2001 +++ php4/ext/swf/swf.c Sat May 11 11:58:55 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: swf.c,v 1.44 2001/12/11 15:30:38 sebastian Exp $ */ +/* $Id: swf.c,v 1.45 2002/05/11 15:58:55 sterling Exp $ */ #ifdef HAVE_CONFIG_H @@ -138,10 +138,20 @@ } /* }}} */ +/* {{{ _swf_init_globals + */ +static void _swf_init_globals(zend_swf_globals *sg) +{ + memset(sg, 0, sizeof(zend_swf_globals)); +} +/* }}} */ + /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(swf) { + ZEND_INIT_MODULE_GLOBALS(swf, _swf_init_globals, NULL); + REGISTER_LONG_CONSTANT("MOD_COLOR", MOD_COLOR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MOD_MATRIX", MOD_MATRIX, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("TYPE_PUSHBUTTON", TYPE_PUSHBUTTON, CONST_CS | CONST_PERSISTENT); @@ -162,6 +172,7 @@ REGISTER_LONG_CONSTANT("ButtonExit", ButtonExit, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MenuEnter", MenuEnter, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MenuExit", MenuExit, CONST_CS | CONST_PERSISTENT); + return SUCCESS; } /* }}} */ @@ -262,6 +273,7 @@ fclose(f); VCWD_UNLINK((const char *)SWFG(tmpfile_name)); + efree(SWFG(tmpfile_name)); } } /* }}} */

« previous php.cvs (#11833) next »