diff options
author | Sterling Hughes <sterling@php.net> | 2000-05-18 00:39:00 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2000-05-18 00:39:00 +0000 |
commit | a8bb2a86b1c67b287ba7ea79cae69412b35de897 (patch) | |
tree | fd2417db54f1a6a4930d486c3bcb5dee4be432cd | |
parent | 09915a1597cf6a36b9035a46aba2eda740fe8486 (diff) | |
download | php-git-a8bb2a86b1c67b287ba7ea79cae69412b35de897.tar.gz |
Make the SWF module compile again + 1 stylistic change.
-rw-r--r-- | ext/swf/config.m4 | 4 | ||||
-rw-r--r-- | ext/swf/swf.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ext/swf/config.m4 b/ext/swf/config.m4 index b02dcf26b6..9c60e18e4b 100644 --- a/ext/swf/config.m4 +++ b/ext/swf/config.m4 @@ -9,7 +9,7 @@ PHP_ARG_WITH(swf, for libswf support, if test "$PHP_SWF" != "no"; then for i in /usr/local /usr $PHP_SWF; do - if test -r $i/lib/libswf.a; then + if test -r $i/libswf.a; then SWF_DIR=$i fi done @@ -21,7 +21,7 @@ if test "$PHP_SWF" != "no"; then AC_ADD_INCLUDE($SWF_DIR/include) PHP_SUBST(SWF_SHARED_LIBADD) - AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR/lib, SWF_SHARED_LIBADD) + AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR, SWF_SHARED_LIBADD) AC_DEFINE(HAVE_SWF,1,[ ]) PHP_EXTENSION(swf, $ext_shared) diff --git a/ext/swf/swf.c b/ext/swf/swf.c index ea6b7d9199..004e1e3101 100644 --- a/ext/swf/swf.c +++ b/ext/swf/swf.c @@ -460,7 +460,6 @@ void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt) if (opt) { swf_defineline((*objid)->value.lval, (float)(*x1)->value.dval, (float)(*y1)->value.dval, (float)(*x2)->value.dval, (float)(*y2)->value.dval, (float)(*width)->value.dval); - (float)(*x2)->value.dval, (float)(*y2)->value.dval, (float)(*width)->value.dval); } else { swf_definerect((*objid)->value.lval, (float)(*x1)->value.dval, (float)(*y1)->value.dval, (float)(*x2)->value.dval, (float)(*y2)->value.dval, (float)(*width)->value.dval); @@ -505,17 +504,20 @@ PHP_FUNCTION(swf_definepoly) } npoints = (*NumPoints)->value.lval; - for (i = 0; i < npoints; i++) { + for (i = 0; i < npoints; i++) + { if (zend_hash_index_find((*coordinates)->value.ht, (i * 2), (void **)&var) == SUCCESS) { SEPARATE_ZVAL(var); convert_to_double_ex(var); coords[i][0] = (float)(*var)->value.dval; } + if (zend_hash_index_find((*coordinates)->value.ht, (i * 2) + 1, (void **)&var) == SUCCESS) { SEPARATE_ZVAL(var); convert_to_double_ex(var); coords[i][1] = (float)(*var)->value.dval; } + } swf_definepoly((*obj_id)->value.lval, coords, npoints, (float)(*width)->value.dval); } |