svnno****@sourc*****
svnno****@sourc*****
2008年 10月 1日 (水) 19:03:36 JST
Revision: 50 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=swfed&view=rev&rev=50 Author: yoya Date: 2008-10-01 19:03:36 +0900 (Wed, 01 Oct 2008) Log Message: ----------- - setHeaderInfo の戻り値を FALSE 固定から TRUE 固定に変更 - (get|set)HeaderInfo の扱う値に version を追加 Modified Paths: -------------- src/swfed.c -------------- next part -------------- Modified: src/swfed.c =================================================================== --- src/swfed.c 2008-09-17 17:03:50 UTC (rev 49) +++ src/swfed.c 2008-10-01 10:03:36 UTC (rev 50) @@ -284,9 +284,9 @@ } else { // FWS add_assoc_bool(return_value, "compress", 0); } + add_assoc_long(return_value, "version", swf->header.version); } - PHP_METHOD(swfed, setHeaderInfo) { zval *header_info; swf_object_t *swf; @@ -299,13 +299,19 @@ swf = get_swf_object(getThis()); header_table = Z_ARRVAL_P(header_info); if (zend_hash_find(header_table, "compress", sizeof("compress"), (void**)&tmp) == SUCCESS) { + convert_to_boolean_ex(tmp); if (Z_LVAL_PP(tmp) != 0) { memcpy(swf->header.magic, "CWS", 3); } else { memcpy(swf->header.magic, "FWS", 3); } } - RETURN_FALSE; + + if (zend_hash_find(header_table, "version", sizeof("version"), (void**)&tmp) == SUCCESS) { + convert_to_long_ex(tmp); + swf->header.version = Z_LVAL_PP(tmp); + } + RETURN_TRUE; } PHP_METHOD(swfed, getTagList) {