Skip to content

Commit ae8a21a

Browse files
committed
Fix parameter types for a couple of methods
1 parent 150d7a5 commit ae8a21a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ext/ming/ming.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
void destroySWFBlock(SWFBlock block);
4444
#endif
4545

46-
static const zend_function_entry ming_functions[] = {
46+
static zend_function_entry ming_functions[] = {
4747
PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL)
4848
PHP_FALIAS(ming_setscale, ming_setScale, NULL)
4949
PHP_FALIAS(ming_useswfversion, ming_useSWFVersion, NULL)
@@ -2595,7 +2595,7 @@ PHP_METHOD(swfblur, __construct)
25952595
SWFBlur blur;
25962596
int ret;
25972597

2598-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &blurX, &blurY, &passes) == FAILURE) {
2598+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddl", &blurX, &blurY, &passes) == FAILURE) {
25992599
return;
26002600
}
26012601

@@ -3452,6 +3452,8 @@ PHP_METHOD(swfvideostream, __construct)
34523452
case 0:
34533453
stream = newSWFVideoStream();
34543454
break;
3455+
default: // warn
3456+
return;
34553457
}
34563458

34573459
if(stream) {
@@ -3910,7 +3912,6 @@ static void phpStreamOutputMethod(byte b, void * data)
39103912
PHP_METHOD(swfmovie, saveToFile)
39113913
{
39123914
zval *x;
3913-
long zlimit = 0;
39143915
int limit = -1;
39153916
#if !defined(HAVE_NEW_MING)
39163917
int oldval = INT_MIN;
@@ -3949,7 +3950,7 @@ PHP_METHOD(swfmovie, saveToFile)
39493950
Saves the movie. 'where' can be stream and the movie will be saved there otherwise it is treated as string and written in file with that name */
39503951
PHP_METHOD(swfmovie, save)
39513952
{
3952-
zval *x, *zlimit = NULL;
3953+
zval *x;
39533954
int limit = -1;
39543955
#if !defined(HAVE_NEW_MING)
39553956
int oldval = INT_MIN;
@@ -5182,7 +5183,7 @@ PHP_METHOD(swfsprite, setSoundStream)
51825183
SWFInput input = NULL;
51835184
SWFMovieClip mc = getSprite(getThis() TSRMLS_CC);
51845185

5185-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zdd", &zfile, &rate, &skip) == FAILURE) {
5186+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zd|d", &zfile, &rate, &skip) == FAILURE) {
51865187
return;
51875188
}
51885189

0 commit comments

Comments
 (0)