cvs: php4 /ext/ming ming.c /ext/qtdom qtdom.c qtdom.h
| From: | Jani Taskinen | Date: | Tue, 07 Aug 2001 23:27:00 +0000 |
| Subject: | cvs: php4 /ext/ming ming.c /ext/qtdom qtdom.c qtdom.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6642@lists.php.net to get a copy of this message | ||
sniper Tue Aug 7 19:27:00 2001 EDT
Modified files:
/php4/ext/ming ming.c
/php4/ext/qtdom qtdom.h qtdom.c
Log:
More TSRM work.
Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.12 php4/ext/ming/ming.c:1.13 --- php4/ext/ming/ming.c:1.12 Sun Aug 5 12:21:29 2001 +++ php4/ext/ming/ming.c Tue Aug 7 19:26:59 2001 @@ -37,19 +37,19 @@ { NULL, NULL, NULL } }; -static SWFMovie getMovie(zval *id); -static SWFFill getFill(zval *id); -static SWFGradient getGradient(zval *id); -static SWFBitmap getBitmap(zval *id); -static SWFShape getShape(zval *id); -static SWFFont getFont(zval *id); -static SWFText getText(zval *id); -static SWFTextField getTextField(zval *id); -static SWFDisplayItem getDisplayItem(zval *id); -static SWFButton getButton(zval *id); -static SWFAction getAction(zval *id); -static SWFMorph getMorph(zval *id); -static SWFMovieClip getSprite(zval *id); +static SWFMovie getMovie(zval *id TSRMLS_DC); +static SWFFill getFill(zval *id TSRMLS_DC); +static SWFGradient getGradient(zval *id TSRMLS_DC); +static SWFBitmap getBitmap(zval *id TSRMLS_DC); +static SWFShape getShape(zval *id TSRMLS_DC); +static SWFFont getFont(zval *id TSRMLS_DC); +static SWFText getText(zval *id TSRMLS_DC); +static SWFTextField getTextField(zval *id TSRMLS_DC); +static SWFDisplayItem getDisplayItem(zval *id TSRMLS_DC); +static SWFButton getButton(zval *id TSRMLS_DC); +static SWFAction getAction(zval *id TSRMLS_DC); +static SWFMorph getMorph(zval *id TSRMLS_DC); +static SWFMovieClip getSprite(zval *id TSRMLS_DC); PHP_FUNCTION(ming_setCubicThreshold) { @@ -108,13 +108,13 @@ /* {{{ internal function SWFgetProperty */ -static void *SWFgetProperty(zval *id, char *name, int namelen, int proptype) +static void *SWFgetProperty(zval *id, char *name, int namelen, int proptype TSRMLS_DC) { zval **tmp; int id_to_find; void *property; int type; - + if(id) { if(zend_hash_find(id->value.obj.properties, name, namelen+1, (void **)&tmp) == FAILURE) @@ -144,22 +144,22 @@ /* {{{ internal function SWFCharacter getCharacter(zval *id) Returns the SWFCharacter contained in zval *id */ -SWFCharacter getCharacter(zval *id) +SWFCharacter getCharacter(zval *id TSRMLS_DC) { if(id->value.obj.ce == &shape_class_entry) - return (SWFCharacter)getShape(id); + return (SWFCharacter)getShape(id TSRMLS_CC); else if(id->value.obj.ce == &font_class_entry) - return (SWFCharacter)getFont(id); + return (SWFCharacter)getFont(id TSRMLS_CC); else if(id->value.obj.ce == &text_class_entry) - return (SWFCharacter)getText(id); + return (SWFCharacter)getText(id TSRMLS_CC); else if(id->value.obj.ce == &textfield_class_entry) - return (SWFCharacter)getTextField(id); + return (SWFCharacter)getTextField(id TSRMLS_CC); else if(id->value.obj.ce == &button_class_entry) - return (SWFCharacter)getButton(id); + return (SWFCharacter)getButton(id TSRMLS_CC); else if(id->value.obj.ce == &morph_class_entry) - return (SWFCharacter)getMorph(id); + return (SWFCharacter)getMorph(id TSRMLS_CC); else if(id->value.obj.ce == &sprite_class_entry) - return (SWFCharacter)getSprite(id); + return (SWFCharacter)getSprite(id TSRMLS_CC); else php_error(E_ERROR, "called object is not an SWFCharacter"); } @@ -207,9 +207,9 @@ /* {{{ internal function getAction Returns the SWFAction object contained in zval *id */ -static SWFAction getAction(zval *id) +static SWFAction getAction(zval *id TSRMLS_DC) { - void *action = SWFgetProperty(id, "action", 6, le_swfactionp); + void *action = SWFgetProperty(id, "action", 6, le_swfactionp TSRMLS_CC); if(!action) php_error(E_ERROR, "called object is not an SWFAction!"); @@ -314,9 +314,9 @@ /* {{{ internal function getBitmap Returns the SWFBitmap object contained in zval *id */ -static SWFBitmap getBitmap(zval *id) +static SWFBitmap getBitmap(zval *id TSRMLS_DC) { - void *bitmap = SWFgetProperty(id, "bitmap", 6, le_swfbitmapp); + void *bitmap = SWFgetProperty(id, "bitmap", 6, le_swfbitmapp TSRMLS_CC); if(!bitmap) php_error(E_ERROR, "called object is not an SWFBitmap!"); @@ -333,7 +333,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis()))); + RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis() TSRMLS_CC))); } /* }}} */ @@ -345,7 +345,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis()))); + RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis() TSRMLS_CC))); } /* }}} */ @@ -386,9 +386,9 @@ /* {{{ internal function getButton Returns the SWFButton object contained in zval *id */ -static SWFButton getButton(zval *id) +static SWFButton getButton(zval *id TSRMLS_DC) { - void *button = SWFgetProperty(id, "button", 6, le_swfbuttonp); + void *button = SWFgetProperty(id, "button", 6, le_swfbuttonp TSRMLS_CC); if(!button) php_error(E_ERROR, "called object is not an SWFButton!"); @@ -403,14 +403,14 @@ PHP_FUNCTION(swfbutton_setHit) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_HITSTATE); } @@ -422,14 +422,14 @@ PHP_FUNCTION(swfbutton_setOver) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_OVERSTATE); } @@ -441,14 +441,14 @@ PHP_FUNCTION(swfbutton_setUp) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_UPSTATE); } @@ -460,14 +460,14 @@ PHP_FUNCTION(swfbutton_setDown) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_DOWNSTATE); } @@ -479,7 +479,7 @@ PHP_FUNCTION(swfbutton_addShape) { zval **zchar, **flags; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 2 || @@ -487,7 +487,7 @@ WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); convert_to_long_ex(flags); @@ -501,14 +501,14 @@ PHP_FUNCTION(swfbutton_setAction) { zval **zaction; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFAction action; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zaction) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zaction); - action = getAction(*zaction); + action = getAction(*zaction TSRMLS_CC); SWFButton_addAction(button, action, SWFBUTTON_OVERDOWNTOOVERUP); } @@ -520,7 +520,7 @@ PHP_FUNCTION(swfbutton_addAction) { zval **zaction, **flags; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFAction action; if(ZEND_NUM_ARGS() != 2 || @@ -528,7 +528,7 @@ WRONG_PARAM_COUNT; convert_to_object_ex(zaction); - action = getAction(*zaction); + action = getAction(*zaction TSRMLS_CC); convert_to_long_ex(flags); @@ -584,9 +584,9 @@ /* {{{ internal function getDisplayItem Returns the SWFDisplayItem contained in zval *id */ -static SWFDisplayItem getDisplayItem(zval *id) +static SWFDisplayItem getDisplayItem(zval *id TSRMLS_DC) { - void *item = SWFgetProperty(id, "displayitem", 11, le_swfdisplayitemp); + void *item = SWFgetProperty(id, "displayitem", 11, le_swfdisplayitemp TSRMLS_CC); if(!item) php_error(E_ERROR, "called object is not an SWFDisplayItem!"); @@ -608,7 +608,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_moveTo(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_moveTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -625,7 +625,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_move(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_move(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -644,7 +644,7 @@ convert_to_double_ex(x); - SWFDisplayItem_scaleTo(getDisplayItem(getThis()), + SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(x)); } else if(ZEND_NUM_ARGS() == 2) @@ -655,7 +655,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_scaleTo(getDisplayItem(getThis()), + SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } else @@ -677,7 +677,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_scale(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_scale(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -694,7 +694,7 @@ convert_to_double_ex(degrees); - SWFDisplayItem_rotateTo(getDisplayItem(getThis()), Z_DVAL_PP(degrees)); + SWFDisplayItem_rotateTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); } /* }}} */ @@ -711,7 +711,7 @@ convert_to_double_ex(degrees); - SWFDisplayItem_rotate(getDisplayItem(getThis()), Z_DVAL_PP(degrees)); + SWFDisplayItem_rotate(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); } /* }}} */ @@ -727,7 +727,7 @@ convert_to_double_ex(x); - SWFDisplayItem_skewXTo(getDisplayItem(getThis()), Z_DVAL_PP(x)); + SWFDisplayItem_skewXTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x)); } /* }}} */ @@ -743,7 +743,7 @@ convert_to_double_ex(x); - SWFDisplayItem_skewX(getDisplayItem(getThis()), Z_DVAL_PP(x)); + SWFDisplayItem_skewX(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x)); } /* }}} */ @@ -759,7 +759,7 @@ convert_to_double_ex(y); - SWFDisplayItem_skewYTo(getDisplayItem(getThis()), Z_DVAL_PP(y)); + SWFDisplayItem_skewYTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(y)); } /* }}} */ @@ -775,7 +775,7 @@ convert_to_double_ex(y); - SWFDisplayItem_skewY(getDisplayItem(getThis()), Z_DVAL_PP(y)); + SWFDisplayItem_skewY(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(y)); } /* }}} */ @@ -797,7 +797,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_setMatrix(getDisplayItem(getThis()), + SWFDisplayItem_setMatrix(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(a), Z_DVAL_PP(b), Z_DVAL_PP(c), Z_DVAL_PP(d), Z_DVAL_PP(x), Z_DVAL_PP(y)); } @@ -816,7 +816,7 @@ convert_to_long_ex(depth); - SWFDisplayItem_setDepth(getDisplayItem(getThis()), Z_LVAL_PP(depth)); + SWFDisplayItem_setDepth(getDisplayItem(getThis() TSRMLS_CC), Z_LVAL_PP(depth)); } /* }}} */ @@ -833,7 +833,7 @@ convert_to_double_ex(ratio); - SWFDisplayItem_setRatio(getDisplayItem(getThis()), Z_DVAL_PP(ratio)); + SWFDisplayItem_setRatio(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(ratio)); } /* }}} */ @@ -866,7 +866,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - SWFDisplayItem_setColorAdd(getDisplayItem(getThis()), + SWFDisplayItem_setColorAdd(getDisplayItem(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a); } @@ -900,7 +900,7 @@ convert_to_double_ex(g); convert_to_double_ex(b); - SWFDisplayItem_setColorMult(getDisplayItem(getThis()), + SWFDisplayItem_setColorMult(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(r), Z_DVAL_PP(g), Z_DVAL_PP(b), a); } @@ -911,7 +911,7 @@ PHP_FUNCTION(swfdisplayitem_setName) { zval **name; - SWFDisplayItem item = getDisplayItem(getThis()); + SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &name) == FAILURE) WRONG_PARAM_COUNT; @@ -955,9 +955,9 @@ /* {{{ internal function getFill Returns the SWFFill object contained in zval *id */ -static SWFFill getFill(zval *id) +static SWFFill getFill(zval *id TSRMLS_DC) { - void *fill = SWFgetProperty(id, "fill", 4, le_swffillp); + void *fill = SWFgetProperty(id, "fill", 4, le_swffillp TSRMLS_CC); if(!fill) php_error(E_ERROR, "called object is not an SWFFill!"); @@ -980,7 +980,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFFill_moveTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFFill_moveTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -999,7 +999,7 @@ convert_to_double_ex(x); - SWFFill_scaleXYTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(x)); + SWFFill_scaleXYTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(x)); } else if(ZEND_NUM_ARGS() == 2) { @@ -1009,7 +1009,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFFill_scaleXYTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFFill_scaleXYTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } else WRONG_PARAM_COUNT; @@ -1029,7 +1029,7 @@ convert_to_double_ex(degrees); - SWFFill_rotateTo(getFill(getThis()), Z_DVAL_PP(degrees)); + SWFFill_rotateTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); } /* }}} */ @@ -1045,7 +1045,7 @@ convert_to_double_ex(x); - SWFFill_skewXTo(getFill(getThis()), Z_DVAL_PP(x)); + SWFFill_skewXTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x)); } /* }}} */ @@ -1061,7 +1061,7 @@ convert_to_double_ex(y); - SWFFill_skewYTo(getFill(getThis()), Z_DVAL_PP(y)); + SWFFill_skewYTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(y)); } /* }}} */ @@ -1081,9 +1081,9 @@ /* {{{ internal function SWFText getFont(zval *id) Returns the Font object in zval *id */ -SWFFont getFont(zval *id) +SWFFont getFont(zval *id TSRMLS_DC) { - void *font = SWFgetProperty(id, "font", 4, le_swffontp); + void *font = SWFgetProperty(id, "font", 4, le_swffontp TSRMLS_CC); if(!font) php_error(E_ERROR, "called object is not an SWFFont!"); @@ -1145,7 +1145,7 @@ convert_to_string_ex(zstring); - width = SWFFont_getStringWidth(getFont(getThis()), Z_STRVAL_PP(zstring)); + width = SWFFont_getStringWidth(getFont(getThis() TSRMLS_CC), Z_STRVAL_PP(zstring)); RETURN_DOUBLE(width); } @@ -1159,7 +1159,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis()))); + RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis() TSRMLS_CC))); } /* }}} */ @@ -1171,7 +1171,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis()))); + RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis() TSRMLS_CC))); } /* }}} */ @@ -1183,7 +1183,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis()))); + RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis() TSRMLS_CC))); } /* }}} */ @@ -1220,9 +1220,9 @@ /* {{{ internal function getGradient Returns the SWFGradient object contained in zval *id */ -static SWFGradient getGradient(zval *id) +static SWFGradient getGradient(zval *id TSRMLS_DC) { - void *gradient = SWFgetProperty(id, "gradient", 8, le_swfgradientp); + void *gradient = SWFgetProperty(id, "gradient", 8, le_swfgradientp TSRMLS_CC); if(!gradient) php_error(E_ERROR, "called object is not an SWFGradient!"); @@ -1262,7 +1262,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - SWFGradient_addEntry(getGradient(getThis()), Z_DVAL_PP(ratio), + SWFGradient_addEntry(getGradient(getThis() TSRMLS_CC), Z_DVAL_PP(ratio), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a); } @@ -1301,9 +1301,9 @@ /* {{{ internal function getMorph Returns the SWFMorph object contained in zval *id */ -static SWFMorph getMorph(zval *id) +static SWFMorph getMorph(zval *id TSRMLS_DC) { - void *morph = SWFgetProperty(id, "morph", 5, le_swfmorphp); + void *morph = SWFgetProperty(id, "morph", 5, le_swfmorphp TSRMLS_CC); if(!morph) php_error(E_ERROR, "called object is not an SWFMorph!"); @@ -1317,7 +1317,7 @@ PHP_FUNCTION(swfmorph_getShape1) { - SWFMorph morph = getMorph(getThis()); + SWFMorph morph = getMorph(getThis() TSRMLS_CC); SWFShape shape = SWFMorph_getShape1(morph); int ret = zend_list_insert(shape, le_swfshapep); @@ -1332,7 +1332,7 @@ PHP_FUNCTION(swfmorph_getShape2) { - SWFMorph morph = getMorph(getThis()); + SWFMorph morph = getMorph(getThis() TSRMLS_CC); SWFShape shape = SWFMorph_getShape2(morph); int ret = zend_list_insert(shape, le_swfshapep); @@ -1399,9 +1399,9 @@ /* }}} */ /* {{{ getMovie */ -SWFMovie getMovie(zval *id) +SWFMovie getMovie(zval *id TSRMLS_DC) { - void *movie = SWFgetProperty(id, "movie", 5, le_swfmoviep); + void *movie = SWFgetProperty(id, "movie", 5, le_swfmoviep TSRMLS_CC); if(!movie) php_error(E_ERROR, "called object is not an SWFMovie!"); @@ -1414,7 +1414,7 @@ PHP_FUNCTION(swfmovie_nextFrame) { - SWFMovie_nextFrame(getMovie(getThis())); + SWFMovie_nextFrame(getMovie(getThis() TSRMLS_CC)); } /* }}} */ @@ -1429,7 +1429,7 @@ convert_to_string_ex(label); - SWFMovie_labelFrame(getMovie(getThis()), Z_STRVAL_PP(label)); + SWFMovie_labelFrame(getMovie(getThis() TSRMLS_CC), Z_STRVAL_PP(label)); } /* }}} */ @@ -1441,7 +1441,7 @@ int ret; SWFBlock block; SWFDisplayItem item; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; @@ -1450,9 +1450,9 @@ /* XXX - SWFMovie_add deals w/ all block types. Probably will need to add that.. */ if((*zchar)->value.obj.ce == &action_class_entry) - block = (SWFBlock)getAction(*zchar); + block = (SWFBlock)getAction(*zchar TSRMLS_CC); else - block = (SWFBlock)getCharacter(*zchar); + block = (SWFBlock)getCharacter(*zchar TSRMLS_CC); item = SWFMovie_add(movie, block); @@ -1472,13 +1472,13 @@ { zval **zchar; SWFDisplayItem item; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - item = getDisplayItem(*zchar); + item = getDisplayItem(*zchar TSRMLS_CC); SWFMovie_remove(movie, item); } @@ -1496,7 +1496,7 @@ PHP_FUNCTION(swfmovie_output) { - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); RETURN_LONG(SWFMovie_output(movie, &phpByteOutputMethod, NULL)); } @@ -1513,7 +1513,7 @@ PHP_FUNCTION(swfmovie_saveToFile) { zval **x; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); int type; int le_fopen; void *what; @@ -1542,7 +1542,7 @@ { ZEND_FETCH_RESOURCE(file, FILE *, x, -1,"File-Handle",php_file_le_fopen()); - RETURN_LONG(SWFMovie_output(getMovie(getThis()), + RETURN_LONG(SWFMovie_output(getMovie(getThis() TSRMLS_CC), &phpFileOutputMethod, file)); } @@ -1553,7 +1553,7 @@ if(file == NULL) php_error(E_ERROR, "couldn't open file %s for writing", Z_STRVAL_PP(x)); - retval = SWFMovie_output(getMovie(getThis()), + retval = SWFMovie_output(getMovie(getThis() TSRMLS_CC), &phpFileOutputMethod, (void *)file); fclose(file); @@ -1568,7 +1568,7 @@ PHP_FUNCTION(swfmovie_setBackground) { zval **r, **g, **b; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 3) || zend_get_parameters_ex(3, &r, &g, &b) == FAILURE) WRONG_PARAM_COUNT; @@ -1586,7 +1586,7 @@ PHP_FUNCTION(swfmovie_setRate) { zval **rate; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &rate) == FAILURE) WRONG_PARAM_COUNT; @@ -1602,7 +1602,7 @@ PHP_FUNCTION(swfmovie_setDimension) { zval **x, **y; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE) WRONG_PARAM_COUNT; @@ -1619,7 +1619,7 @@ PHP_FUNCTION(swfmovie_setFrames) { zval **frames; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &frames) == FAILURE) WRONG_PARAM_COUNT; @@ -1637,7 +1637,7 @@ FILE *file; zval **zfile; SWFSound sound; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zfile) == FAILURE) WRONG_PARAM_COUNT; @@ -1710,9 +1710,9 @@ /* {{{ internal function getShape Returns the SWFShape object contained in zval *id */ -static SWFShape getShape(zval *id) +static SWFShape getShape(zval *id TSRMLS_DC) { - void *shape = SWFgetProperty(id, "shape", 5, le_swfshapep); + void *shape = SWFgetProperty(id, "shape", 5, le_swfshapep TSRMLS_CC); if(!shape) php_error(E_ERROR, "called object is not an SWFShape!"); @@ -1742,7 +1742,7 @@ } else if(ZEND_NUM_ARGS() == 1) { - SWFShape_setLine(getShape(getThis()), 0, 0, 0, 0, 0); + SWFShape_setLine(getShape(getThis() TSRMLS_CC), 0, 0, 0, 0, 0); return; } else @@ -1755,13 +1755,13 @@ if(ZEND_NUM_ARGS() == 4) { - SWFShape_setLine(getShape(getThis()), + SWFShape_setLine(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(w), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), 0xff); } else { - SWFShape_setLine(getShape(getThis()), + SWFShape_setLine(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(w), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), Z_LVAL_PP(a)); } @@ -1807,7 +1807,7 @@ if(flags == 0) flags = SWFFILL_LINEAR_GRADIENT; - fill = SWFShape_addGradientFill(getShape(getThis()), getGradient(*arg1), + fill = SWFShape_addGradientFill(getShape(getThis() TSRMLS_CC), getGradient(*arg1 TSRMLS_CC), flags); } else if((*arg1)->value.obj.ce == &bitmap_class_entry) @@ -1815,7 +1815,7 @@ if(flags == 0) flags = SWFFILL_TILED_BITMAP; - fill = SWFShape_addBitmapFill(getShape(getThis()), getBitmap(*arg1), + fill = SWFShape_addBitmapFill(getShape(getThis() TSRMLS_CC), getBitmap(*arg1 TSRMLS_CC), flags); } else @@ -1848,7 +1848,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - fill = SWFShape_addSolidFill(getShape(getThis()), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a); } @@ -1884,7 +1884,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), 0xff); } @@ -1898,7 +1898,7 @@ convert_to_long_ex(b); convert_to_long_ex(a); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), Z_LVAL_PP(a)); } @@ -1910,13 +1910,13 @@ if(Z_LVAL_PP(zfill) != 0) { convert_to_object_ex(zfill); - fill = getFill(*zfill); + fill = getFill(*zfill TSRMLS_CC); } else fill = NULL; } - SWFShape_setLeftFill(getShape(getThis()), fill); + SWFShape_setLeftFill(getShape(getThis() TSRMLS_CC), fill); } /* }}} */ @@ -1937,7 +1937,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), 0xff); } @@ -1951,7 +1951,7 @@ convert_to_long_ex(b); convert_to_long_ex(a); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), Z_LVAL_PP(a)); } @@ -1963,13 +1963,13 @@ if(Z_LVAL_PP(zfill) != 0) { convert_to_object_ex(zfill); - fill = getFill(*zfill); + fill = getFill(*zfill TSRMLS_CC); } else fill = NULL; } - SWFShape_setRightFill(getShape(getThis()), fill); + SWFShape_setRightFill(getShape(getThis() TSRMLS_CC), fill); } /* }}} */ @@ -1986,7 +1986,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_movePenTo(getShape(getThis()), + SWFShape_movePenTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } @@ -2004,7 +2004,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_movePen(getShape(getThis()), + SWFShape_movePen(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } @@ -2023,7 +2023,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_drawLineTo(getShape(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFShape_drawLineTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -2041,7 +2041,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_drawLine(getShape(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFShape_drawLine(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -2065,7 +2065,7 @@ convert_to_double_ex(ax); convert_to_double_ex(ay); - SWFShape_drawCurveTo(getShape(getThis()), + SWFShape_drawCurveTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(ax), Z_DVAL_PP(ay)); } @@ -2083,7 +2083,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2114,7 +2114,7 @@ convert_to_double_ex(ax); convert_to_double_ex(ay); - SWFShape_drawCurve(getShape(getThis()), + SWFShape_drawCurve(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(ax), Z_DVAL_PP(ay)); } @@ -2132,7 +2132,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubic(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubic(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2155,8 +2155,7 @@ convert_to_string_ex(c); - SWFShape_drawFontGlyph(getShape(getThis()), getFont(*font), - Z_STRVAL_PP(c)[0]); + SWFShape_drawFontGlyph(getShape(getThis() TSRMLS_CC), getFont(*font TSRMLS_CC), Z_STRVAL_PP(c)[0]); } /* }}} */ @@ -2173,7 +2172,7 @@ convert_to_double_ex(r); - SWFShape_drawCircle(getShape(getThis()), Z_DVAL_PP(r)); + SWFShape_drawCircle(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(r)); } /* }}} */ @@ -2194,8 +2193,7 @@ convert_to_double_ex(end); /* convert angles to radians, since that's what php uses elsewhere */ - SWFShape_drawArc(getShape(getThis()), Z_DVAL_PP(r), - Z_DVAL_PP(start)*M_PI/180, Z_DVAL_PP(end)*M_PI/180); + SWFShape_drawArc(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(r), Z_DVAL_PP(start)*M_PI/180, Z_DVAL_PP(end)*M_PI/180); } /* }}} */ @@ -2218,7 +2216,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubic(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubic(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2244,7 +2242,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2289,9 +2287,9 @@ /* {{{ internal function SWFSprite getSprite(zval *id) Returns the SWFSprite object in zval *id */ -SWFMovieClip getSprite(zval *id) +SWFMovieClip getSprite(zval *id TSRMLS_DC) { - void *sprite = SWFgetProperty(id, "sprite", 6, le_swfspritep); + void *sprite = SWFgetProperty(id, "sprite", 6, le_swfspritep TSRMLS_CC); if(!sprite) php_error(E_ERROR, "called object is not an SWFSprite!"); @@ -2309,7 +2307,7 @@ int ret; SWFBlock block; SWFDisplayItem item; - SWFMovieClip sprite = getSprite(getThis()); + SWFMovieClip sprite = getSprite(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; @@ -2317,9 +2315,9 @@ convert_to_object_ex(zchar); if((*zchar)->value.obj.ce == &action_class_entry) - block = (SWFBlock)getAction(*zchar); + block = (SWFBlock)getAction(*zchar TSRMLS_CC); else - block = (SWFBlock)getCharacter(*zchar); + block = (SWFBlock)getCharacter(*zchar TSRMLS_CC); item = SWFMovieClip_add(sprite, block); @@ -2340,13 +2338,13 @@ { zval **zchar; SWFDisplayItem item; - SWFMovieClip movie = getSprite(getThis()); + SWFMovieClip movie = getSprite(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - item = getDisplayItem(*zchar); + item = getDisplayItem(*zchar TSRMLS_CC); SWFMovieClip_remove(movie, item); } @@ -2357,7 +2355,7 @@ PHP_FUNCTION(swfsprite_nextFrame) { - SWFMovieClip_nextFrame(getSprite(getThis())); + SWFMovieClip_nextFrame(getSprite(getThis() TSRMLS_CC)); } /* }}} */ @@ -2372,7 +2370,7 @@ convert_to_string_ex(label); - SWFMovieClip_labelFrame(getSprite(getThis()), Z_STRVAL_PP(label)); + SWFMovieClip_labelFrame(getSprite(getThis() TSRMLS_CC), Z_STRVAL_PP(label)); } /* }}} */ @@ -2382,7 +2380,7 @@ PHP_FUNCTION(swfsprite_setFrames) { zval **frames; - SWFMovieClip sprite = getSprite(getThis()); + SWFMovieClip sprite = getSprite(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &frames) == FAILURE) WRONG_PARAM_COUNT; @@ -2435,9 +2433,9 @@ /* {{{ internal function SWFText getText(zval *id) Returns the SWFText contained in zval *id */ -SWFText getText(zval *id) +SWFText getText(zval *id TSRMLS_DC) { - void *text = SWFgetProperty(id, "text", 4, le_swftextp); + void *text = SWFgetProperty(id, "text", 4, le_swftextp TSRMLS_CC); if(!text) php_error(E_ERROR, "called object is not an SWFText!"); @@ -2452,14 +2450,14 @@ PHP_FUNCTION(swftext_setFont) { zval **zfont; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); SWFFont font; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zfont) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zfont); - font = getFont(*zfont); + font = getFont(*zfont TSRMLS_CC); SWFText_setFont(text, font); } @@ -2471,7 +2469,7 @@ PHP_FUNCTION(swftext_setHeight) { zval **height; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &height) == FAILURE) WRONG_PARAM_COUNT; @@ -2488,7 +2486,7 @@ PHP_FUNCTION(swftext_setSpacing) { zval **spacing; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &spacing) == FAILURE) WRONG_PARAM_COUNT; @@ -2505,7 +2503,7 @@ PHP_FUNCTION(swftext_setColor) { zval **r, **g, **b, **a; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() == 3) { @@ -2544,7 +2542,7 @@ PHP_FUNCTION(swftext_moveTo) { zval **x, **y; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) WRONG_PARAM_COUNT; @@ -2563,7 +2561,7 @@ PHP_FUNCTION(swftext_addString) { zval **s; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &s) == FAILURE) WRONG_PARAM_COUNT; @@ -2587,7 +2585,7 @@ convert_to_string_ex(zstring); - width = SWFText_getStringWidth(getText(getThis()), Z_STRVAL_PP(zstring)); + width = SWFText_getStringWidth(getText(getThis() TSRMLS_CC), Z_STRVAL_PP(zstring)); RETURN_DOUBLE(width); } @@ -2601,7 +2599,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFText_getAscent(getText(getThis()))); + RETURN_DOUBLE(SWFText_getAscent(getText(getThis() TSRMLS_CC))); } /* }}} */ @@ -2613,7 +2611,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFText_getDescent(getText(getThis()))); + RETURN_DOUBLE(SWFText_getDescent(getText(getThis() TSRMLS_CC))); } /* }}} */ @@ -2625,7 +2623,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFText_getLeading(getText(getThis()))); + RETURN_DOUBLE(SWFText_getLeading(getText(getThis() TSRMLS_CC))); } /* }}} */ @@ -2683,9 +2681,9 @@ /* {{{ internal function getTextField Returns the SWFTextField object contained in zval *id */ -static SWFTextField getTextField(zval *id) +static SWFTextField getTextField(zval *id TSRMLS_DC) { - void *field = SWFgetProperty(id, "textfield", 9, le_swftextfieldp); + void *field = SWFgetProperty(id, "textfield", 9, le_swftextfieldp TSRMLS_CC); if(!field) php_error(E_ERROR, "called object is not an SWFTextField!"); @@ -2700,14 +2698,14 @@ PHP_FUNCTION(swftextfield_setFont) { zval **font; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &font) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(font); - SWFTextField_setFont(field, getFont(*font)); + SWFTextField_setFont(field, getFont(*font TSRMLS_CC)); } /* }}} */ @@ -2717,7 +2715,7 @@ PHP_FUNCTION(swftextfield_setBounds) { zval **width, **height; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &width, &height) == FAILURE) WRONG_PARAM_COUNT; @@ -2735,7 +2733,7 @@ PHP_FUNCTION(swftextfield_align) { zval **align; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &align) == FAILURE) WRONG_PARAM_COUNT; @@ -2752,7 +2750,7 @@ PHP_FUNCTION(swftextfield_setHeight) { zval **height; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &height) == FAILURE) WRONG_PARAM_COUNT; @@ -2769,7 +2767,7 @@ PHP_FUNCTION(swftextfield_setLeftMargin) { zval **margin; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &margin) == FAILURE) WRONG_PARAM_COUNT; @@ -2786,7 +2784,7 @@ PHP_FUNCTION(swftextfield_setRightMargin) { zval **margin; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &margin) == FAILURE) WRONG_PARAM_COUNT; @@ -2803,7 +2801,7 @@ PHP_FUNCTION(swftextfield_setMargins) { zval **left, **right; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &left, &right) == FAILURE) @@ -2823,7 +2821,7 @@ PHP_FUNCTION(swftextfield_setIndentation) { zval **indent; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &indent) == FAILURE) WRONG_PARAM_COUNT; @@ -2840,7 +2838,7 @@ PHP_FUNCTION(swftextfield_setLineSpacing) { zval **spacing; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &spacing) == FAILURE) WRONG_PARAM_COUNT; @@ -2857,7 +2855,7 @@ PHP_FUNCTION(swftextfield_setColor) { zval **r, **g, **b, **a; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); int alpha = 0xff; if(ZEND_NUM_ARGS() == 3) @@ -2890,7 +2888,7 @@ PHP_FUNCTION(swftextfield_setName) { zval **name; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &name) == FAILURE) WRONG_PARAM_COUNT; @@ -2907,7 +2905,7 @@ PHP_FUNCTION(swftextfield_addString) { zval **string; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &string) == FAILURE) WRONG_PARAM_COUNT; Index: php4/ext/qtdom/qtdom.h diff -u php4/ext/qtdom/qtdom.h:1.3 php4/ext/qtdom/qtdom.h:1.4 --- php4/ext/qtdom/qtdom.h:1.3 Mon Feb 26 01:07:13 2001 +++ php4/ext/qtdom/qtdom.h Tue Aug 7 19:26:59 2001 @@ -20,9 +20,6 @@ #ifndef PHP_QTDOM_H #define PHP_QTDOM_H -/* You should tweak config.m4 so this symbol (or some else suitable) - gets defined. -*/ #if HAVE_QTDOM extern zend_module_entry qtdom_module_entry; @@ -55,19 +52,10 @@ ZEND_END_MODULE_GLOBALS(qtdom) */ -/* In every function that needs to use variables in php_qtdom_globals, - do call QTDOMLS_FETCH(); after declaring other variables used by - that function, and always refer to them as QTDOMG(variable). - You are encouraged to rename these macros something shorter, see - examples in any other php module directory. -*/ - #ifdef ZTS -#define QTDOMG(v) (qtdom_globals->v) -#define QTDOMLS_FETCH() php_qtdom_globals *qtdom_globals = ts_resource(qtdom_globals_id) +# define QTDOMG(v) TSRMG(qtdom_globals_id, zend_qtdom_globals *, v) #else -#define QTDOMG(v) (qtdom_globals.v) -#define QTDOMLS_FETCH() +# define QTDOMG(v) (qtdom_globals.v) #endif #else Index: php4/ext/qtdom/qtdom.c diff -u php4/ext/qtdom/qtdom.c:1.8 php4/ext/qtdom/qtdom.c:1.9 --- php4/ext/qtdom/qtdom.c:1.8 Mon Jul 30 02:18:02 2001 +++ php4/ext/qtdom/qtdom.c Tue Aug 7 19:26:59 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: qtdom.c,v 1.8 2001/07/30 06:18:02 zeev Exp $ */ +/* $Id: qtdom.c,v 1.9 2001/08/07 23:26:59 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -108,7 +108,7 @@ /* {{{ qdom_find_attributes * Helper function for creating the attributes, returns the number * of attributes found or -1 if an error occured */ -int qdom_find_attributes( zval **children, struct qdom_attribute *attr ) +static int qdom_find_attributes( zval **children, struct qdom_attribute *attr TSRMLS_DC) { zval *child; struct qdom_node *node; @@ -142,7 +142,7 @@ Helper function for recursively going trough the QDomNode tree and creating the same in PHP objects. Returns the number of children or -1 if an error occured. */ -int qdom_find_children( zval **children, struct qdom_node *orig_node ) +static int qdom_find_children( zval **children, struct qdom_node *orig_node TSRMLS_DC) { zval *child; struct qdom_node *node, *tmp_node, *child_node; @@ -174,7 +174,7 @@ if ( num_attrs > 0 ) { struct qdom_attribute *attr = qdom_do_node_attributes( node ); - if ( qdom_find_attributes( &a_children, attr ) > 0 ) + if ( qdom_find_attributes( &a_children, attr TSRMLS_CC) > 0 ) { zend_hash_update(child->value.obj.properties, "attributes", sizeof("attributes"), @@ -190,7 +190,7 @@ { child_node = qdom_do_copy_node( node ); child_node = qdom_do_first_child( child_node ); - if ( qdom_find_children( &n_children, child_node ) > 0 ) + if ( qdom_find_children( &n_children, child_node TSRMLS_CC) > 0 ) { zend_hash_update(child->value.obj.properties, "children", sizeof("children"), @@ -241,7 +241,7 @@ add_property_stringl(return_value, "doctype", (char *) qdom_type_name, strlen(qdom_type_name), 1); node = doc->Children; - if ( qdom_find_children( &children, node ) > 0 ) + if ( qdom_find_children( &children, node TSRMLS_CC) > 0 ) { add_property_long(return_value, "type", node->Type); zend_hash_update(return_value->value.obj.properties, "children", sizeof("children"), (void *) &children, sizeof(zval *), NULL);
Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.12 php4/ext/ming/ming.c:1.13 --- php4/ext/ming/ming.c:1.12 Sun Aug 5 12:21:29 2001 +++ php4/ext/ming/ming.c Tue Aug 7 19:26:59 2001 @@ -37,19 +37,19 @@ { NULL, NULL, NULL } }; -static SWFMovie getMovie(zval *id); -static SWFFill getFill(zval *id); -static SWFGradient getGradient(zval *id); -static SWFBitmap getBitmap(zval *id); -static SWFShape getShape(zval *id); -static SWFFont getFont(zval *id); -static SWFText getText(zval *id); -static SWFTextField getTextField(zval *id); -static SWFDisplayItem getDisplayItem(zval *id); -static SWFButton getButton(zval *id); -static SWFAction getAction(zval *id); -static SWFMorph getMorph(zval *id); -static SWFMovieClip getSprite(zval *id); +static SWFMovie getMovie(zval *id TSRMLS_DC); +static SWFFill getFill(zval *id TSRMLS_DC); +static SWFGradient getGradient(zval *id TSRMLS_DC); +static SWFBitmap getBitmap(zval *id TSRMLS_DC); +static SWFShape getShape(zval *id TSRMLS_DC); +static SWFFont getFont(zval *id TSRMLS_DC); +static SWFText getText(zval *id TSRMLS_DC); +static SWFTextField getTextField(zval *id TSRMLS_DC); +static SWFDisplayItem getDisplayItem(zval *id TSRMLS_DC); +static SWFButton getButton(zval *id TSRMLS_DC); +static SWFAction getAction(zval *id TSRMLS_DC); +static SWFMorph getMorph(zval *id TSRMLS_DC); +static SWFMovieClip getSprite(zval *id TSRMLS_DC); PHP_FUNCTION(ming_setCubicThreshold) { @@ -108,13 +108,13 @@ /* {{{ internal function SWFgetProperty */ -static void *SWFgetProperty(zval *id, char *name, int namelen, int proptype) +static void *SWFgetProperty(zval *id, char *name, int namelen, int proptype TSRMLS_DC) { zval **tmp; int id_to_find; void *property; int type; - + if(id) { if(zend_hash_find(id->value.obj.properties, name, namelen+1, (void **)&tmp) == FAILURE) @@ -144,22 +144,22 @@ /* {{{ internal function SWFCharacter getCharacter(zval *id) Returns the SWFCharacter contained in zval *id */ -SWFCharacter getCharacter(zval *id) +SWFCharacter getCharacter(zval *id TSRMLS_DC) { if(id->value.obj.ce == &shape_class_entry) - return (SWFCharacter)getShape(id); + return (SWFCharacter)getShape(id TSRMLS_CC); else if(id->value.obj.ce == &font_class_entry) - return (SWFCharacter)getFont(id); + return (SWFCharacter)getFont(id TSRMLS_CC); else if(id->value.obj.ce == &text_class_entry) - return (SWFCharacter)getText(id); + return (SWFCharacter)getText(id TSRMLS_CC); else if(id->value.obj.ce == &textfield_class_entry) - return (SWFCharacter)getTextField(id); + return (SWFCharacter)getTextField(id TSRMLS_CC); else if(id->value.obj.ce == &button_class_entry) - return (SWFCharacter)getButton(id); + return (SWFCharacter)getButton(id TSRMLS_CC); else if(id->value.obj.ce == &morph_class_entry) - return (SWFCharacter)getMorph(id); + return (SWFCharacter)getMorph(id TSRMLS_CC); else if(id->value.obj.ce == &sprite_class_entry) - return (SWFCharacter)getSprite(id); + return (SWFCharacter)getSprite(id TSRMLS_CC); else php_error(E_ERROR, "called object is not an SWFCharacter"); } @@ -207,9 +207,9 @@ /* {{{ internal function getAction Returns the SWFAction object contained in zval *id */ -static SWFAction getAction(zval *id) +static SWFAction getAction(zval *id TSRMLS_DC) { - void *action = SWFgetProperty(id, "action", 6, le_swfactionp); + void *action = SWFgetProperty(id, "action", 6, le_swfactionp TSRMLS_CC); if(!action) php_error(E_ERROR, "called object is not an SWFAction!"); @@ -314,9 +314,9 @@ /* {{{ internal function getBitmap Returns the SWFBitmap object contained in zval *id */ -static SWFBitmap getBitmap(zval *id) +static SWFBitmap getBitmap(zval *id TSRMLS_DC) { - void *bitmap = SWFgetProperty(id, "bitmap", 6, le_swfbitmapp); + void *bitmap = SWFgetProperty(id, "bitmap", 6, le_swfbitmapp TSRMLS_CC); if(!bitmap) php_error(E_ERROR, "called object is not an SWFBitmap!"); @@ -333,7 +333,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis()))); + RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis() TSRMLS_CC))); } /* }}} */ @@ -345,7 +345,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis()))); + RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis() TSRMLS_CC))); } /* }}} */ @@ -386,9 +386,9 @@ /* {{{ internal function getButton Returns the SWFButton object contained in zval *id */ -static SWFButton getButton(zval *id) +static SWFButton getButton(zval *id TSRMLS_DC) { - void *button = SWFgetProperty(id, "button", 6, le_swfbuttonp); + void *button = SWFgetProperty(id, "button", 6, le_swfbuttonp TSRMLS_CC); if(!button) php_error(E_ERROR, "called object is not an SWFButton!"); @@ -403,14 +403,14 @@ PHP_FUNCTION(swfbutton_setHit) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_HITSTATE); } @@ -422,14 +422,14 @@ PHP_FUNCTION(swfbutton_setOver) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_OVERSTATE); } @@ -441,14 +441,14 @@ PHP_FUNCTION(swfbutton_setUp) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_UPSTATE); } @@ -460,14 +460,14 @@ PHP_FUNCTION(swfbutton_setDown) { zval **zchar; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); SWFButton_addShape(button, character, SWFBUTTONRECORD_DOWNSTATE); } @@ -479,7 +479,7 @@ PHP_FUNCTION(swfbutton_addShape) { zval **zchar, **flags; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFCharacter character; if(ZEND_NUM_ARGS() != 2 || @@ -487,7 +487,7 @@ WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - character = getCharacter(*zchar); + character = getCharacter(*zchar TSRMLS_CC); convert_to_long_ex(flags); @@ -501,14 +501,14 @@ PHP_FUNCTION(swfbutton_setAction) { zval **zaction; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFAction action; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zaction) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zaction); - action = getAction(*zaction); + action = getAction(*zaction TSRMLS_CC); SWFButton_addAction(button, action, SWFBUTTON_OVERDOWNTOOVERUP); } @@ -520,7 +520,7 @@ PHP_FUNCTION(swfbutton_addAction) { zval **zaction, **flags; - SWFButton button = getButton(getThis()); + SWFButton button = getButton(getThis() TSRMLS_CC); SWFAction action; if(ZEND_NUM_ARGS() != 2 || @@ -528,7 +528,7 @@ WRONG_PARAM_COUNT; convert_to_object_ex(zaction); - action = getAction(*zaction); + action = getAction(*zaction TSRMLS_CC); convert_to_long_ex(flags); @@ -584,9 +584,9 @@ /* {{{ internal function getDisplayItem Returns the SWFDisplayItem contained in zval *id */ -static SWFDisplayItem getDisplayItem(zval *id) +static SWFDisplayItem getDisplayItem(zval *id TSRMLS_DC) { - void *item = SWFgetProperty(id, "displayitem", 11, le_swfdisplayitemp); + void *item = SWFgetProperty(id, "displayitem", 11, le_swfdisplayitemp TSRMLS_CC); if(!item) php_error(E_ERROR, "called object is not an SWFDisplayItem!"); @@ -608,7 +608,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_moveTo(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_moveTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -625,7 +625,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_move(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_move(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -644,7 +644,7 @@ convert_to_double_ex(x); - SWFDisplayItem_scaleTo(getDisplayItem(getThis()), + SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(x)); } else if(ZEND_NUM_ARGS() == 2) @@ -655,7 +655,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_scaleTo(getDisplayItem(getThis()), + SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } else @@ -677,7 +677,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_scale(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_scale(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -694,7 +694,7 @@ convert_to_double_ex(degrees); - SWFDisplayItem_rotateTo(getDisplayItem(getThis()), Z_DVAL_PP(degrees)); + SWFDisplayItem_rotateTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); } /* }}} */ @@ -711,7 +711,7 @@ convert_to_double_ex(degrees); - SWFDisplayItem_rotate(getDisplayItem(getThis()), Z_DVAL_PP(degrees)); + SWFDisplayItem_rotate(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); } /* }}} */ @@ -727,7 +727,7 @@ convert_to_double_ex(x); - SWFDisplayItem_skewXTo(getDisplayItem(getThis()), Z_DVAL_PP(x)); + SWFDisplayItem_skewXTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x)); } /* }}} */ @@ -743,7 +743,7 @@ convert_to_double_ex(x); - SWFDisplayItem_skewX(getDisplayItem(getThis()), Z_DVAL_PP(x)); + SWFDisplayItem_skewX(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x)); } /* }}} */ @@ -759,7 +759,7 @@ convert_to_double_ex(y); - SWFDisplayItem_skewYTo(getDisplayItem(getThis()), Z_DVAL_PP(y)); + SWFDisplayItem_skewYTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(y)); } /* }}} */ @@ -775,7 +775,7 @@ convert_to_double_ex(y); - SWFDisplayItem_skewY(getDisplayItem(getThis()), Z_DVAL_PP(y)); + SWFDisplayItem_skewY(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(y)); } /* }}} */ @@ -797,7 +797,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_setMatrix(getDisplayItem(getThis()), + SWFDisplayItem_setMatrix(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(a), Z_DVAL_PP(b), Z_DVAL_PP(c), Z_DVAL_PP(d), Z_DVAL_PP(x), Z_DVAL_PP(y)); } @@ -816,7 +816,7 @@ convert_to_long_ex(depth); - SWFDisplayItem_setDepth(getDisplayItem(getThis()), Z_LVAL_PP(depth)); + SWFDisplayItem_setDepth(getDisplayItem(getThis() TSRMLS_CC), Z_LVAL_PP(depth)); } /* }}} */ @@ -833,7 +833,7 @@ convert_to_double_ex(ratio); - SWFDisplayItem_setRatio(getDisplayItem(getThis()), Z_DVAL_PP(ratio)); + SWFDisplayItem_setRatio(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(ratio)); } /* }}} */ @@ -866,7 +866,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - SWFDisplayItem_setColorAdd(getDisplayItem(getThis()), + SWFDisplayItem_setColorAdd(getDisplayItem(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a); } @@ -900,7 +900,7 @@ convert_to_double_ex(g); convert_to_double_ex(b); - SWFDisplayItem_setColorMult(getDisplayItem(getThis()), + SWFDisplayItem_setColorMult(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(r), Z_DVAL_PP(g), Z_DVAL_PP(b), a); } @@ -911,7 +911,7 @@ PHP_FUNCTION(swfdisplayitem_setName) { zval **name; - SWFDisplayItem item = getDisplayItem(getThis()); + SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &name) == FAILURE) WRONG_PARAM_COUNT; @@ -955,9 +955,9 @@ /* {{{ internal function getFill Returns the SWFFill object contained in zval *id */ -static SWFFill getFill(zval *id) +static SWFFill getFill(zval *id TSRMLS_DC) { - void *fill = SWFgetProperty(id, "fill", 4, le_swffillp); + void *fill = SWFgetProperty(id, "fill", 4, le_swffillp TSRMLS_CC); if(!fill) php_error(E_ERROR, "called object is not an SWFFill!"); @@ -980,7 +980,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFFill_moveTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFFill_moveTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -999,7 +999,7 @@ convert_to_double_ex(x); - SWFFill_scaleXYTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(x)); + SWFFill_scaleXYTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(x)); } else if(ZEND_NUM_ARGS() == 2) { @@ -1009,7 +1009,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFFill_scaleXYTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFFill_scaleXYTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } else WRONG_PARAM_COUNT; @@ -1029,7 +1029,7 @@ convert_to_double_ex(degrees); - SWFFill_rotateTo(getFill(getThis()), Z_DVAL_PP(degrees)); + SWFFill_rotateTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); } /* }}} */ @@ -1045,7 +1045,7 @@ convert_to_double_ex(x); - SWFFill_skewXTo(getFill(getThis()), Z_DVAL_PP(x)); + SWFFill_skewXTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(x)); } /* }}} */ @@ -1061,7 +1061,7 @@ convert_to_double_ex(y); - SWFFill_skewYTo(getFill(getThis()), Z_DVAL_PP(y)); + SWFFill_skewYTo(getFill(getThis() TSRMLS_CC), Z_DVAL_PP(y)); } /* }}} */ @@ -1081,9 +1081,9 @@ /* {{{ internal function SWFText getFont(zval *id) Returns the Font object in zval *id */ -SWFFont getFont(zval *id) +SWFFont getFont(zval *id TSRMLS_DC) { - void *font = SWFgetProperty(id, "font", 4, le_swffontp); + void *font = SWFgetProperty(id, "font", 4, le_swffontp TSRMLS_CC); if(!font) php_error(E_ERROR, "called object is not an SWFFont!"); @@ -1145,7 +1145,7 @@ convert_to_string_ex(zstring); - width = SWFFont_getStringWidth(getFont(getThis()), Z_STRVAL_PP(zstring)); + width = SWFFont_getStringWidth(getFont(getThis() TSRMLS_CC), Z_STRVAL_PP(zstring)); RETURN_DOUBLE(width); } @@ -1159,7 +1159,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis()))); + RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis() TSRMLS_CC))); } /* }}} */ @@ -1171,7 +1171,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis()))); + RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis() TSRMLS_CC))); } /* }}} */ @@ -1183,7 +1183,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis()))); + RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis() TSRMLS_CC))); } /* }}} */ @@ -1220,9 +1220,9 @@ /* {{{ internal function getGradient Returns the SWFGradient object contained in zval *id */ -static SWFGradient getGradient(zval *id) +static SWFGradient getGradient(zval *id TSRMLS_DC) { - void *gradient = SWFgetProperty(id, "gradient", 8, le_swfgradientp); + void *gradient = SWFgetProperty(id, "gradient", 8, le_swfgradientp TSRMLS_CC); if(!gradient) php_error(E_ERROR, "called object is not an SWFGradient!"); @@ -1262,7 +1262,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - SWFGradient_addEntry(getGradient(getThis()), Z_DVAL_PP(ratio), + SWFGradient_addEntry(getGradient(getThis() TSRMLS_CC), Z_DVAL_PP(ratio), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a); } @@ -1301,9 +1301,9 @@ /* {{{ internal function getMorph Returns the SWFMorph object contained in zval *id */ -static SWFMorph getMorph(zval *id) +static SWFMorph getMorph(zval *id TSRMLS_DC) { - void *morph = SWFgetProperty(id, "morph", 5, le_swfmorphp); + void *morph = SWFgetProperty(id, "morph", 5, le_swfmorphp TSRMLS_CC); if(!morph) php_error(E_ERROR, "called object is not an SWFMorph!"); @@ -1317,7 +1317,7 @@ PHP_FUNCTION(swfmorph_getShape1) { - SWFMorph morph = getMorph(getThis()); + SWFMorph morph = getMorph(getThis() TSRMLS_CC); SWFShape shape = SWFMorph_getShape1(morph); int ret = zend_list_insert(shape, le_swfshapep); @@ -1332,7 +1332,7 @@ PHP_FUNCTION(swfmorph_getShape2) { - SWFMorph morph = getMorph(getThis()); + SWFMorph morph = getMorph(getThis() TSRMLS_CC); SWFShape shape = SWFMorph_getShape2(morph); int ret = zend_list_insert(shape, le_swfshapep); @@ -1399,9 +1399,9 @@ /* }}} */ /* {{{ getMovie */ -SWFMovie getMovie(zval *id) +SWFMovie getMovie(zval *id TSRMLS_DC) { - void *movie = SWFgetProperty(id, "movie", 5, le_swfmoviep); + void *movie = SWFgetProperty(id, "movie", 5, le_swfmoviep TSRMLS_CC); if(!movie) php_error(E_ERROR, "called object is not an SWFMovie!"); @@ -1414,7 +1414,7 @@ PHP_FUNCTION(swfmovie_nextFrame) { - SWFMovie_nextFrame(getMovie(getThis())); + SWFMovie_nextFrame(getMovie(getThis() TSRMLS_CC)); } /* }}} */ @@ -1429,7 +1429,7 @@ convert_to_string_ex(label); - SWFMovie_labelFrame(getMovie(getThis()), Z_STRVAL_PP(label)); + SWFMovie_labelFrame(getMovie(getThis() TSRMLS_CC), Z_STRVAL_PP(label)); } /* }}} */ @@ -1441,7 +1441,7 @@ int ret; SWFBlock block; SWFDisplayItem item; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; @@ -1450,9 +1450,9 @@ /* XXX - SWFMovie_add deals w/ all block types. Probably will need to add that.. */ if((*zchar)->value.obj.ce == &action_class_entry) - block = (SWFBlock)getAction(*zchar); + block = (SWFBlock)getAction(*zchar TSRMLS_CC); else - block = (SWFBlock)getCharacter(*zchar); + block = (SWFBlock)getCharacter(*zchar TSRMLS_CC); item = SWFMovie_add(movie, block); @@ -1472,13 +1472,13 @@ { zval **zchar; SWFDisplayItem item; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - item = getDisplayItem(*zchar); + item = getDisplayItem(*zchar TSRMLS_CC); SWFMovie_remove(movie, item); } @@ -1496,7 +1496,7 @@ PHP_FUNCTION(swfmovie_output) { - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); RETURN_LONG(SWFMovie_output(movie, &phpByteOutputMethod, NULL)); } @@ -1513,7 +1513,7 @@ PHP_FUNCTION(swfmovie_saveToFile) { zval **x; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); int type; int le_fopen; void *what; @@ -1542,7 +1542,7 @@ { ZEND_FETCH_RESOURCE(file, FILE *, x, -1,"File-Handle",php_file_le_fopen()); - RETURN_LONG(SWFMovie_output(getMovie(getThis()), + RETURN_LONG(SWFMovie_output(getMovie(getThis() TSRMLS_CC), &phpFileOutputMethod, file)); } @@ -1553,7 +1553,7 @@ if(file == NULL) php_error(E_ERROR, "couldn't open file %s for writing", Z_STRVAL_PP(x)); - retval = SWFMovie_output(getMovie(getThis()), + retval = SWFMovie_output(getMovie(getThis() TSRMLS_CC), &phpFileOutputMethod, (void *)file); fclose(file); @@ -1568,7 +1568,7 @@ PHP_FUNCTION(swfmovie_setBackground) { zval **r, **g, **b; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 3) || zend_get_parameters_ex(3, &r, &g, &b) == FAILURE) WRONG_PARAM_COUNT; @@ -1586,7 +1586,7 @@ PHP_FUNCTION(swfmovie_setRate) { zval **rate; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &rate) == FAILURE) WRONG_PARAM_COUNT; @@ -1602,7 +1602,7 @@ PHP_FUNCTION(swfmovie_setDimension) { zval **x, **y; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE) WRONG_PARAM_COUNT; @@ -1619,7 +1619,7 @@ PHP_FUNCTION(swfmovie_setFrames) { zval **frames; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &frames) == FAILURE) WRONG_PARAM_COUNT; @@ -1637,7 +1637,7 @@ FILE *file; zval **zfile; SWFSound sound; - SWFMovie movie = getMovie(getThis()); + SWFMovie movie = getMovie(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zfile) == FAILURE) WRONG_PARAM_COUNT; @@ -1710,9 +1710,9 @@ /* {{{ internal function getShape Returns the SWFShape object contained in zval *id */ -static SWFShape getShape(zval *id) +static SWFShape getShape(zval *id TSRMLS_DC) { - void *shape = SWFgetProperty(id, "shape", 5, le_swfshapep); + void *shape = SWFgetProperty(id, "shape", 5, le_swfshapep TSRMLS_CC); if(!shape) php_error(E_ERROR, "called object is not an SWFShape!"); @@ -1742,7 +1742,7 @@ } else if(ZEND_NUM_ARGS() == 1) { - SWFShape_setLine(getShape(getThis()), 0, 0, 0, 0, 0); + SWFShape_setLine(getShape(getThis() TSRMLS_CC), 0, 0, 0, 0, 0); return; } else @@ -1755,13 +1755,13 @@ if(ZEND_NUM_ARGS() == 4) { - SWFShape_setLine(getShape(getThis()), + SWFShape_setLine(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(w), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), 0xff); } else { - SWFShape_setLine(getShape(getThis()), + SWFShape_setLine(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(w), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), Z_LVAL_PP(a)); } @@ -1807,7 +1807,7 @@ if(flags == 0) flags = SWFFILL_LINEAR_GRADIENT; - fill = SWFShape_addGradientFill(getShape(getThis()), getGradient(*arg1), + fill = SWFShape_addGradientFill(getShape(getThis() TSRMLS_CC), getGradient(*arg1 TSRMLS_CC), flags); } else if((*arg1)->value.obj.ce == &bitmap_class_entry) @@ -1815,7 +1815,7 @@ if(flags == 0) flags = SWFFILL_TILED_BITMAP; - fill = SWFShape_addBitmapFill(getShape(getThis()), getBitmap(*arg1), + fill = SWFShape_addBitmapFill(getShape(getThis() TSRMLS_CC), getBitmap(*arg1 TSRMLS_CC), flags); } else @@ -1848,7 +1848,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - fill = SWFShape_addSolidFill(getShape(getThis()), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a); } @@ -1884,7 +1884,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), 0xff); } @@ -1898,7 +1898,7 @@ convert_to_long_ex(b); convert_to_long_ex(a); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), Z_LVAL_PP(a)); } @@ -1910,13 +1910,13 @@ if(Z_LVAL_PP(zfill) != 0) { convert_to_object_ex(zfill); - fill = getFill(*zfill); + fill = getFill(*zfill TSRMLS_CC); } else fill = NULL; } - SWFShape_setLeftFill(getShape(getThis()), fill); + SWFShape_setLeftFill(getShape(getThis() TSRMLS_CC), fill); } /* }}} */ @@ -1937,7 +1937,7 @@ convert_to_long_ex(g); convert_to_long_ex(b); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), 0xff); } @@ -1951,7 +1951,7 @@ convert_to_long_ex(b); convert_to_long_ex(a); - fill = SWFShape_addSolidFill(getShape(getThis()), Z_LVAL_PP(r), + fill = SWFShape_addSolidFill(getShape(getThis() TSRMLS_CC), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), Z_LVAL_PP(a)); } @@ -1963,13 +1963,13 @@ if(Z_LVAL_PP(zfill) != 0) { convert_to_object_ex(zfill); - fill = getFill(*zfill); + fill = getFill(*zfill TSRMLS_CC); } else fill = NULL; } - SWFShape_setRightFill(getShape(getThis()), fill); + SWFShape_setRightFill(getShape(getThis() TSRMLS_CC), fill); } /* }}} */ @@ -1986,7 +1986,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_movePenTo(getShape(getThis()), + SWFShape_movePenTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } @@ -2004,7 +2004,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_movePen(getShape(getThis()), + SWFShape_movePen(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } @@ -2023,7 +2023,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_drawLineTo(getShape(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFShape_drawLineTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -2041,7 +2041,7 @@ convert_to_double_ex(x); convert_to_double_ex(y); - SWFShape_drawLine(getShape(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFShape_drawLine(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); } /* }}} */ @@ -2065,7 +2065,7 @@ convert_to_double_ex(ax); convert_to_double_ex(ay); - SWFShape_drawCurveTo(getShape(getThis()), + SWFShape_drawCurveTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(ax), Z_DVAL_PP(ay)); } @@ -2083,7 +2083,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2114,7 +2114,7 @@ convert_to_double_ex(ax); convert_to_double_ex(ay); - SWFShape_drawCurve(getShape(getThis()), + SWFShape_drawCurve(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(ax), Z_DVAL_PP(ay)); } @@ -2132,7 +2132,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubic(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubic(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2155,8 +2155,7 @@ convert_to_string_ex(c); - SWFShape_drawFontGlyph(getShape(getThis()), getFont(*font), - Z_STRVAL_PP(c)[0]); + SWFShape_drawFontGlyph(getShape(getThis() TSRMLS_CC), getFont(*font TSRMLS_CC), Z_STRVAL_PP(c)[0]); } /* }}} */ @@ -2173,7 +2172,7 @@ convert_to_double_ex(r); - SWFShape_drawCircle(getShape(getThis()), Z_DVAL_PP(r)); + SWFShape_drawCircle(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(r)); } /* }}} */ @@ -2194,8 +2193,7 @@ convert_to_double_ex(end); /* convert angles to radians, since that's what php uses elsewhere */ - SWFShape_drawArc(getShape(getThis()), Z_DVAL_PP(r), - Z_DVAL_PP(start)*M_PI/180, Z_DVAL_PP(end)*M_PI/180); + SWFShape_drawArc(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(r), Z_DVAL_PP(start)*M_PI/180, Z_DVAL_PP(end)*M_PI/180); } /* }}} */ @@ -2218,7 +2216,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubic(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubic(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2244,7 +2242,7 @@ convert_to_double_ex(dx); convert_to_double_ex(dy); - RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis()), + RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis() TSRMLS_CC), Z_DVAL_PP(bx), Z_DVAL_PP(by), Z_DVAL_PP(cx), Z_DVAL_PP(cy), Z_DVAL_PP(dx), Z_DVAL_PP(dy))); @@ -2289,9 +2287,9 @@ /* {{{ internal function SWFSprite getSprite(zval *id) Returns the SWFSprite object in zval *id */ -SWFMovieClip getSprite(zval *id) +SWFMovieClip getSprite(zval *id TSRMLS_DC) { - void *sprite = SWFgetProperty(id, "sprite", 6, le_swfspritep); + void *sprite = SWFgetProperty(id, "sprite", 6, le_swfspritep TSRMLS_CC); if(!sprite) php_error(E_ERROR, "called object is not an SWFSprite!"); @@ -2309,7 +2307,7 @@ int ret; SWFBlock block; SWFDisplayItem item; - SWFMovieClip sprite = getSprite(getThis()); + SWFMovieClip sprite = getSprite(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; @@ -2317,9 +2315,9 @@ convert_to_object_ex(zchar); if((*zchar)->value.obj.ce == &action_class_entry) - block = (SWFBlock)getAction(*zchar); + block = (SWFBlock)getAction(*zchar TSRMLS_CC); else - block = (SWFBlock)getCharacter(*zchar); + block = (SWFBlock)getCharacter(*zchar TSRMLS_CC); item = SWFMovieClip_add(sprite, block); @@ -2340,13 +2338,13 @@ { zval **zchar; SWFDisplayItem item; - SWFMovieClip movie = getSprite(getThis()); + SWFMovieClip movie = getSprite(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zchar) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zchar); - item = getDisplayItem(*zchar); + item = getDisplayItem(*zchar TSRMLS_CC); SWFMovieClip_remove(movie, item); } @@ -2357,7 +2355,7 @@ PHP_FUNCTION(swfsprite_nextFrame) { - SWFMovieClip_nextFrame(getSprite(getThis())); + SWFMovieClip_nextFrame(getSprite(getThis() TSRMLS_CC)); } /* }}} */ @@ -2372,7 +2370,7 @@ convert_to_string_ex(label); - SWFMovieClip_labelFrame(getSprite(getThis()), Z_STRVAL_PP(label)); + SWFMovieClip_labelFrame(getSprite(getThis() TSRMLS_CC), Z_STRVAL_PP(label)); } /* }}} */ @@ -2382,7 +2380,7 @@ PHP_FUNCTION(swfsprite_setFrames) { zval **frames; - SWFMovieClip sprite = getSprite(getThis()); + SWFMovieClip sprite = getSprite(getThis() TSRMLS_CC); if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &frames) == FAILURE) WRONG_PARAM_COUNT; @@ -2435,9 +2433,9 @@ /* {{{ internal function SWFText getText(zval *id) Returns the SWFText contained in zval *id */ -SWFText getText(zval *id) +SWFText getText(zval *id TSRMLS_DC) { - void *text = SWFgetProperty(id, "text", 4, le_swftextp); + void *text = SWFgetProperty(id, "text", 4, le_swftextp TSRMLS_CC); if(!text) php_error(E_ERROR, "called object is not an SWFText!"); @@ -2452,14 +2450,14 @@ PHP_FUNCTION(swftext_setFont) { zval **zfont; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); SWFFont font; if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zfont) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(zfont); - font = getFont(*zfont); + font = getFont(*zfont TSRMLS_CC); SWFText_setFont(text, font); } @@ -2471,7 +2469,7 @@ PHP_FUNCTION(swftext_setHeight) { zval **height; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &height) == FAILURE) WRONG_PARAM_COUNT; @@ -2488,7 +2486,7 @@ PHP_FUNCTION(swftext_setSpacing) { zval **spacing; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &spacing) == FAILURE) WRONG_PARAM_COUNT; @@ -2505,7 +2503,7 @@ PHP_FUNCTION(swftext_setColor) { zval **r, **g, **b, **a; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() == 3) { @@ -2544,7 +2542,7 @@ PHP_FUNCTION(swftext_moveTo) { zval **x, **y; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) WRONG_PARAM_COUNT; @@ -2563,7 +2561,7 @@ PHP_FUNCTION(swftext_addString) { zval **s; - SWFText text = getText(getThis()); + SWFText text = getText(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &s) == FAILURE) WRONG_PARAM_COUNT; @@ -2587,7 +2585,7 @@ convert_to_string_ex(zstring); - width = SWFText_getStringWidth(getText(getThis()), Z_STRVAL_PP(zstring)); + width = SWFText_getStringWidth(getText(getThis() TSRMLS_CC), Z_STRVAL_PP(zstring)); RETURN_DOUBLE(width); } @@ -2601,7 +2599,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFText_getAscent(getText(getThis()))); + RETURN_DOUBLE(SWFText_getAscent(getText(getThis() TSRMLS_CC))); } /* }}} */ @@ -2613,7 +2611,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFText_getDescent(getText(getThis()))); + RETURN_DOUBLE(SWFText_getDescent(getText(getThis() TSRMLS_CC))); } /* }}} */ @@ -2625,7 +2623,7 @@ if(ZEND_NUM_ARGS() != 0) WRONG_PARAM_COUNT; - RETURN_DOUBLE(SWFText_getLeading(getText(getThis()))); + RETURN_DOUBLE(SWFText_getLeading(getText(getThis() TSRMLS_CC))); } /* }}} */ @@ -2683,9 +2681,9 @@ /* {{{ internal function getTextField Returns the SWFTextField object contained in zval *id */ -static SWFTextField getTextField(zval *id) +static SWFTextField getTextField(zval *id TSRMLS_DC) { - void *field = SWFgetProperty(id, "textfield", 9, le_swftextfieldp); + void *field = SWFgetProperty(id, "textfield", 9, le_swftextfieldp TSRMLS_CC); if(!field) php_error(E_ERROR, "called object is not an SWFTextField!"); @@ -2700,14 +2698,14 @@ PHP_FUNCTION(swftextfield_setFont) { zval **font; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &font) == FAILURE) WRONG_PARAM_COUNT; convert_to_object_ex(font); - SWFTextField_setFont(field, getFont(*font)); + SWFTextField_setFont(field, getFont(*font TSRMLS_CC)); } /* }}} */ @@ -2717,7 +2715,7 @@ PHP_FUNCTION(swftextfield_setBounds) { zval **width, **height; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &width, &height) == FAILURE) WRONG_PARAM_COUNT; @@ -2735,7 +2733,7 @@ PHP_FUNCTION(swftextfield_align) { zval **align; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &align) == FAILURE) WRONG_PARAM_COUNT; @@ -2752,7 +2750,7 @@ PHP_FUNCTION(swftextfield_setHeight) { zval **height; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &height) == FAILURE) WRONG_PARAM_COUNT; @@ -2769,7 +2767,7 @@ PHP_FUNCTION(swftextfield_setLeftMargin) { zval **margin; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &margin) == FAILURE) WRONG_PARAM_COUNT; @@ -2786,7 +2784,7 @@ PHP_FUNCTION(swftextfield_setRightMargin) { zval **margin; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &margin) == FAILURE) WRONG_PARAM_COUNT; @@ -2803,7 +2801,7 @@ PHP_FUNCTION(swftextfield_setMargins) { zval **left, **right; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &left, &right) == FAILURE) @@ -2823,7 +2821,7 @@ PHP_FUNCTION(swftextfield_setIndentation) { zval **indent; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &indent) == FAILURE) WRONG_PARAM_COUNT; @@ -2840,7 +2838,7 @@ PHP_FUNCTION(swftextfield_setLineSpacing) { zval **spacing; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &spacing) == FAILURE) WRONG_PARAM_COUNT; @@ -2857,7 +2855,7 @@ PHP_FUNCTION(swftextfield_setColor) { zval **r, **g, **b, **a; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); int alpha = 0xff; if(ZEND_NUM_ARGS() == 3) @@ -2890,7 +2888,7 @@ PHP_FUNCTION(swftextfield_setName) { zval **name; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &name) == FAILURE) WRONG_PARAM_COUNT; @@ -2907,7 +2905,7 @@ PHP_FUNCTION(swftextfield_addString) { zval **string; - SWFTextField field = getTextField(getThis()); + SWFTextField field = getTextField(getThis() TSRMLS_CC); if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &string) == FAILURE) WRONG_PARAM_COUNT; Index: php4/ext/qtdom/qtdom.h diff -u php4/ext/qtdom/qtdom.h:1.3 php4/ext/qtdom/qtdom.h:1.4 --- php4/ext/qtdom/qtdom.h:1.3 Mon Feb 26 01:07:13 2001 +++ php4/ext/qtdom/qtdom.h Tue Aug 7 19:26:59 2001 @@ -20,9 +20,6 @@ #ifndef PHP_QTDOM_H #define PHP_QTDOM_H -/* You should tweak config.m4 so this symbol (or some else suitable) - gets defined. -*/ #if HAVE_QTDOM extern zend_module_entry qtdom_module_entry; @@ -55,19 +52,10 @@ ZEND_END_MODULE_GLOBALS(qtdom) */ -/* In every function that needs to use variables in php_qtdom_globals, - do call QTDOMLS_FETCH(); after declaring other variables used by - that function, and always refer to them as QTDOMG(variable). - You are encouraged to rename these macros something shorter, see - examples in any other php module directory. -*/ - #ifdef ZTS -#define QTDOMG(v) (qtdom_globals->v) -#define QTDOMLS_FETCH() php_qtdom_globals *qtdom_globals = ts_resource(qtdom_globals_id) +# define QTDOMG(v) TSRMG(qtdom_globals_id, zend_qtdom_globals *, v) #else -#define QTDOMG(v) (qtdom_globals.v) -#define QTDOMLS_FETCH() +# define QTDOMG(v) (qtdom_globals.v) #endif #else Index: php4/ext/qtdom/qtdom.c diff -u php4/ext/qtdom/qtdom.c:1.8 php4/ext/qtdom/qtdom.c:1.9 --- php4/ext/qtdom/qtdom.c:1.8 Mon Jul 30 02:18:02 2001 +++ php4/ext/qtdom/qtdom.c Tue Aug 7 19:26:59 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: qtdom.c,v 1.8 2001/07/30 06:18:02 zeev Exp $ */ +/* $Id: qtdom.c,v 1.9 2001/08/07 23:26:59 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -108,7 +108,7 @@ /* {{{ qdom_find_attributes * Helper function for creating the attributes, returns the number * of attributes found or -1 if an error occured */ -int qdom_find_attributes( zval **children, struct qdom_attribute *attr ) +static int qdom_find_attributes( zval **children, struct qdom_attribute *attr TSRMLS_DC) { zval *child; struct qdom_node *node; @@ -142,7 +142,7 @@ Helper function for recursively going trough the QDomNode tree and creating the same in PHP objects. Returns the number of children or -1 if an error occured. */ -int qdom_find_children( zval **children, struct qdom_node *orig_node ) +static int qdom_find_children( zval **children, struct qdom_node *orig_node TSRMLS_DC) { zval *child; struct qdom_node *node, *tmp_node, *child_node; @@ -174,7 +174,7 @@ if ( num_attrs > 0 ) { struct qdom_attribute *attr = qdom_do_node_attributes( node ); - if ( qdom_find_attributes( &a_children, attr ) > 0 ) + if ( qdom_find_attributes( &a_children, attr TSRMLS_CC) > 0 ) { zend_hash_update(child->value.obj.properties, "attributes", sizeof("attributes"), @@ -190,7 +190,7 @@ { child_node = qdom_do_copy_node( node ); child_node = qdom_do_first_child( child_node ); - if ( qdom_find_children( &n_children, child_node ) > 0 ) + if ( qdom_find_children( &n_children, child_node TSRMLS_CC) > 0 ) { zend_hash_update(child->value.obj.properties, "children", sizeof("children"), @@ -241,7 +241,7 @@ add_property_stringl(return_value, "doctype", (char *) qdom_type_name, strlen(qdom_type_name), 1); node = doc->Children; - if ( qdom_find_children( &children, node ) > 0 ) + if ( qdom_find_children( &children, node TSRMLS_CC) > 0 ) { add_property_long(return_value, "type", node->Type); zend_hash_update(return_value->value.obj.properties, "children", sizeof("children"), (void *) &children, sizeof(zval *), NULL);