- ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch

This commit is contained in:
Andi Gutmans 2000-06-05 19:47:54 +00:00
parent 1cefd77f1c
commit 3701bc4207
91 changed files with 1106 additions and 1106 deletions

View File

@ -74,7 +74,7 @@ PHP_FUNCTION(aspell_new)
aspell *sc;
int ind;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc,&master,&personal) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -105,7 +105,7 @@ PHP_FUNCTION(aspell_suggest)
size_t i;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -139,7 +139,7 @@ PHP_FUNCTION(aspell_check)
aspell *sc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -171,7 +171,7 @@ PHP_FUNCTION(aspell_check_raw)
int argc;
aspell *sc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -71,7 +71,7 @@ PHP_FUNCTION(bcadd)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -114,7 +114,7 @@ PHP_FUNCTION(bcsub)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -157,7 +157,7 @@ PHP_FUNCTION(bcmul)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -200,7 +200,7 @@ PHP_FUNCTION(bcdiv)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -248,7 +248,7 @@ PHP_FUNCTION(bcmod)
pval **left, **right;
bc_num first, second, result;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -290,7 +290,7 @@ PHP_FUNCTION(bcpow)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -333,7 +333,7 @@ PHP_FUNCTION(bcsqrt)
bc_num result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &left)== FAILURE) {
WRONG_PARAM_COUNT;
@ -373,7 +373,7 @@ PHP_FUNCTION(bccomp)
bc_num first, second;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@ -413,7 +413,7 @@ PHP_FUNCTION(bcscale)
{
pval **new_scale;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&new_scale)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&new_scale)==FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -32,7 +32,7 @@ PHP_FUNCTION(unixtojd)
long jdate;
time_t t;
struct tm *ta, tmbuf;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if ((myargc > 1) || (zend_get_parameters(ht,myargc, &timestamp) != SUCCESS)) {
WRONG_PARAM_COUNT;
@ -59,7 +59,7 @@ PHP_FUNCTION(jdtounix)
pval *jday;
long uday;
if ((ARG_COUNT(ht)!= 1) || (zend_get_parameters(ht,1, &jday) != SUCCESS)) {
if ((ZEND_NUM_ARGS()!= 1) || (zend_get_parameters(ht,1, &jday) != SUCCESS)) {
WRONG_PARAM_COUNT;
}

View File

@ -249,7 +249,7 @@ PHP_FUNCTION(jdtogregorian)
pval *julday, *mode;
int day;
char *daynamel, *daynames;
int myargc=ARG_COUNT(ht),mymode=0;
int myargc=ZEND_NUM_ARGS(),mymode=0;
if ((myargc < 1) || (myargc > 2) || (zend_get_parameters(ht,myargc, &julday, &mode) != SUCCESS)) {
WRONG_PARAM_COUNT;

View File

@ -34,7 +34,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
time_t the_time;
long year, golden, solar, lunar, pfm, dom, tmp, easter;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
the_time = time(NULL);
ta = localtime(&the_time);

View File

@ -205,7 +205,7 @@ PHP_FUNCTION(cpdf_global_set_document_limits) {
int argc;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc != 5)
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -232,7 +232,7 @@ PHP_FUNCTION(cpdf_set_creator) {
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -260,7 +260,7 @@ PHP_FUNCTION(cpdf_set_title) {
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -288,7 +288,7 @@ PHP_FUNCTION(cpdf_set_subject) {
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -316,7 +316,7 @@ PHP_FUNCTION(cpdf_set_keywords) {
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -344,7 +344,7 @@ PHP_FUNCTION(cpdf_set_viewer_preferences) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc < 1 || argc > 2)
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -374,7 +374,7 @@ PHP_FUNCTION(cpdf_open) {
CPDFdoc *cpdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
switch(argc) {
case 1:
if (getParameters(ht, 1, &arg1) == FAILURE) {
@ -428,7 +428,7 @@ PHP_FUNCTION(cpdf_close) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -456,7 +456,7 @@ PHP_FUNCTION(cpdf_page_init) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc < 5 || argc > 6)
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -499,7 +499,7 @@ PHP_FUNCTION(cpdf_finalize_page) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -527,7 +527,7 @@ PHP_FUNCTION(cpdf_set_current_page) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -555,7 +555,7 @@ PHP_FUNCTION(cpdf_begin_text) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -581,7 +581,7 @@ PHP_FUNCTION(cpdf_end_text) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -607,7 +607,7 @@ PHP_FUNCTION(cpdf_show) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -634,7 +634,7 @@ PHP_FUNCTION(cpdf_show_xy) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 4) || (argc > 5))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -672,7 +672,7 @@ PHP_FUNCTION(cpdf_continue_text) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -699,7 +699,7 @@ PHP_FUNCTION(cpdf_text) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 2) || (argc == 3) || (argc > 7) || getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
@ -789,7 +789,7 @@ PHP_FUNCTION(cpdf_set_font) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -823,7 +823,7 @@ PHP_FUNCTION(cpdf_set_leading) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -850,7 +850,7 @@ PHP_FUNCTION(cpdf_set_text_rendering) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -877,7 +877,7 @@ PHP_FUNCTION(cpdf_set_horiz_scaling) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -904,7 +904,7 @@ PHP_FUNCTION(cpdf_set_text_rise) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -934,7 +934,7 @@ PHP_FUNCTION(cpdf_set_text_matrix) {
float pdfmatrix[6];
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -984,7 +984,7 @@ PHP_FUNCTION(cpdf_set_text_pos) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 3) || (argc > 4))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1021,7 +1021,7 @@ PHP_FUNCTION(cpdf_rotate_text) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1048,7 +1048,7 @@ PHP_FUNCTION(cpdf_set_char_spacing) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1075,7 +1075,7 @@ PHP_FUNCTION(cpdf_set_word_spacing) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1103,7 +1103,7 @@ PHP_FUNCTION(cpdf_stringwidth) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1130,7 +1130,7 @@ PHP_FUNCTION(cpdf_save) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1156,7 +1156,7 @@ PHP_FUNCTION(cpdf_restore) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1182,7 +1182,7 @@ PHP_FUNCTION(cpdf_translate) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1210,7 +1210,7 @@ PHP_FUNCTION(cpdf_scale) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1238,7 +1238,7 @@ PHP_FUNCTION(cpdf_rotate) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1265,7 +1265,7 @@ PHP_FUNCTION(cpdf_setflat) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1297,7 +1297,7 @@ PHP_FUNCTION(cpdf_setlinejoin) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1329,7 +1329,7 @@ PHP_FUNCTION(cpdf_setlinecap) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1361,7 +1361,7 @@ PHP_FUNCTION(cpdf_setmiterlimit) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1393,7 +1393,7 @@ PHP_FUNCTION(cpdf_setlinewidth) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1422,7 +1422,7 @@ PHP_FUNCTION(cpdf_setdash) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1452,7 +1452,7 @@ PHP_FUNCTION(cpdf_moveto) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 3) || (argc > 4))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1489,7 +1489,7 @@ PHP_FUNCTION(cpdf_rmoveto) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 3) || (argc > 4))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1526,7 +1526,7 @@ PHP_FUNCTION(cpdf_curveto) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 7) || (argc > 8))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1577,7 +1577,7 @@ PHP_FUNCTION(cpdf_lineto) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 3) || (argc > 4))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1614,7 +1614,7 @@ PHP_FUNCTION(cpdf_rlineto) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 3) || (argc > 4))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1651,7 +1651,7 @@ PHP_FUNCTION(cpdf_circle) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 4) || (argc > 5))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1689,7 +1689,7 @@ PHP_FUNCTION(cpdf_arc) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 6) || (argc > 7))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1729,7 +1729,7 @@ PHP_FUNCTION(cpdf_rect) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 5) || (argc > 6))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -1774,7 +1774,7 @@ PHP_FUNCTION(cpdf_newpath) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1800,7 +1800,7 @@ PHP_FUNCTION(cpdf_closepath) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1826,7 +1826,7 @@ PHP_FUNCTION(cpdf_closepath_stroke) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1853,7 +1853,7 @@ PHP_FUNCTION(cpdf_stroke) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1879,7 +1879,7 @@ PHP_FUNCTION(cpdf_fill) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1905,7 +1905,7 @@ PHP_FUNCTION(cpdf_fill_stroke) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1932,7 +1932,7 @@ PHP_FUNCTION(cpdf_closepath_fill_stroke) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1960,7 +1960,7 @@ PHP_FUNCTION(cpdf_clip) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1986,7 +1986,7 @@ PHP_FUNCTION(cpdf_setgray_fill) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2013,7 +2013,7 @@ PHP_FUNCTION(cpdf_setgray_stroke) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2040,7 +2040,7 @@ PHP_FUNCTION(cpdf_setgray) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2067,7 +2067,7 @@ PHP_FUNCTION(cpdf_setrgbcolor_fill) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2096,7 +2096,7 @@ PHP_FUNCTION(cpdf_setrgbcolor_stroke) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2125,7 +2125,7 @@ PHP_FUNCTION(cpdf_setrgbcolor) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2154,7 +2154,7 @@ PHP_FUNCTION(cpdf_set_page_animation) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
if (ZEND_NUM_ARGS() != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2186,7 +2186,7 @@ PHP_FUNCTION(cpdf_finalize) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2213,7 +2213,7 @@ PHP_FUNCTION(cpdf_output_buffer) {
char *buffer;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2241,7 +2241,7 @@ PHP_FUNCTION(cpdf_save_to_file) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2274,7 +2274,7 @@ PHP_FUNCTION(cpdf_import_jpeg) {
CPDFdoc *pdf;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 10) || (argc > 11))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -2344,7 +2344,7 @@ PHP_FUNCTION(cpdf_place_inline_image) {
gdImagePtr im;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 8) || (argc > 9))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -2427,7 +2427,7 @@ PHP_FUNCTION(cpdf_add_annotation) {
CPDFannotAttrib attrib;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 7) || (argc > 8))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -2487,7 +2487,7 @@ PHP_FUNCTION(cpdf_set_action_url) {
CPDFannotAttrib attrib;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 6) || (argc > 7))
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)
@ -2544,7 +2544,7 @@ PHP_FUNCTION(cpdf_add_outline) {
CPDFoutlineEntry *lastoutline;
CPDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc != 6)
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)

View File

@ -59,7 +59,7 @@ PHP_FUNCTION(cybercash_encr)
unsigned int outAlloc, outLth;
long errcode;
if(ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3,&wmk,&sk,&inbuff) == FAILURE) {
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,&wmk,&sk,&inbuff) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -105,7 +105,7 @@ PHP_FUNCTION(cybercash_decr)
long errcode;
if(ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3,&wmk,&sk,&inbuff) == FAILURE)
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,&wmk,&sk,&inbuff) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -150,7 +150,7 @@ PHP_FUNCTION(cybercash_base64_encode)
char *outbuff;
long ret_length;
if(ARG_COUNT(ht) != 1 ||
if(ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1,&inbuff) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -176,7 +176,7 @@ PHP_FUNCTION(cybercash_base64_decode)
char *outbuff;
long ret_length;
if(ARG_COUNT(ht) != 1 ||
if(ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1,&inbuff) == FAILURE)
{
WRONG_PARAM_COUNT;

View File

@ -252,7 +252,7 @@ PHP_FUNCTION(dav_set_mkcol_handlers)
pval *test, *create;
DAV_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &test, &create) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &test, &create) == FAILURE) {
WRONG_PARAM_COUNT;
}
DAV_SET_HANDLER(mkcol_test, test);

View File

@ -253,7 +253,7 @@ PHP_FUNCTION(dbmopen) {
dbm_info *info=NULL;
int ret;
if (ARG_COUNT(ht)!=2 || zend_get_parameters(ht,2,&filename,&mode)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht,2,&filename,&mode)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -413,7 +413,7 @@ dbm_info *php_dbm_open(char *filename, char *mode) {
PHP_FUNCTION(dbmclose) {
pval *id;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht,1,&id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht,1,&id)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
@ -467,7 +467,7 @@ PHP_FUNCTION(dbminsert)
dbm_info *info;
int ret;
if (ARG_COUNT(ht)!=3||zend_get_parameters(ht,3,&id,&key,&value) == FAILURE) {
if (ZEND_NUM_ARGS()!=3||zend_get_parameters(ht,3,&id,&key,&value) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(key);
@ -525,7 +525,7 @@ PHP_FUNCTION(dbmreplace)
dbm_info *info;
int ret;
if (ARG_COUNT(ht)!=3||zend_get_parameters(ht,3,&id,&key,&value) == FAILURE) {
if (ZEND_NUM_ARGS()!=3||zend_get_parameters(ht,3,&id,&key,&value) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(key);
@ -583,7 +583,7 @@ PHP_FUNCTION(dbmfetch)
pval *id, *key;
dbm_info *info;
if (ARG_COUNT(ht)!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
if (ZEND_NUM_ARGS()!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(key);
@ -657,7 +657,7 @@ PHP_FUNCTION(dbmexists)
dbm_info *info;
int ret;
if (ARG_COUNT(ht)!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
if (ZEND_NUM_ARGS()!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(key);
@ -703,7 +703,7 @@ PHP_FUNCTION(dbmdelete)
dbm_info *info;
int ret;
if (ARG_COUNT(ht)!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
if (ZEND_NUM_ARGS()!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(key);
@ -748,7 +748,7 @@ PHP_FUNCTION(dbmfirstkey)
dbm_info *info;
char *ret;
if (ARG_COUNT(ht)!=1||zend_get_parameters(ht,1,&id)==FAILURE) {
if (ZEND_NUM_ARGS()!=1||zend_get_parameters(ht,1,&id)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -808,7 +808,7 @@ PHP_FUNCTION(dbmnextkey)
dbm_info *info;
char *ret;
if (ARG_COUNT(ht)!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
if (ZEND_NUM_ARGS()!=2||zend_get_parameters(ht,2,&id,&key)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(key);

View File

@ -95,7 +95,7 @@ typedef struct dba_handler {
#define DBA_ID_PARS \
pval **id; \
dba_info *info = NULL; \
int type, ac = ARG_COUNT(ht)
int type, ac = ZEND_NUM_ARGS()
/* these are used to get the standard arguments */
@ -238,7 +238,7 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
pval ***args = (pval ***) NULL;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
dba_mode_t modenr;
dba_info *info;
dba_handler *hptr;

View File

@ -117,7 +117,7 @@ PHP_FUNCTION(dbase_open) {
PLS_FETCH();
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&dbf_name,&options)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&dbf_name,&options)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(dbf_name);
@ -150,7 +150,7 @@ PHP_FUNCTION(dbase_close) {
int dbh_type;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -173,7 +173,7 @@ PHP_FUNCTION(dbase_numrecords) {
int dbh_type;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -195,7 +195,7 @@ PHP_FUNCTION(dbase_numfields) {
int dbh_type;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -217,7 +217,7 @@ PHP_FUNCTION(dbase_pack) {
int dbh_type;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&dbh_id)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -246,7 +246,7 @@ PHP_FUNCTION(dbase_add_record) {
int i;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&dbh_id,&fields)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&dbh_id,&fields)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -315,7 +315,7 @@ PHP_FUNCTION(dbase_replace_record)
int i;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht,3,&dbh_id,&fields,&recnum)==FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht,3,&dbh_id,&fields,&recnum)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -378,7 +378,7 @@ PHP_FUNCTION(dbase_delete_record) {
int dbh_type;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&dbh_id,&record)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&dbh_id,&record)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -415,7 +415,7 @@ PHP_FUNCTION(dbase_get_record) {
size_t cursize = 0;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&dbh_id,&record)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&dbh_id,&record)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -498,7 +498,7 @@ PHP_FUNCTION(dbase_get_record_with_names) {
char *data, *fnp, *str_value;
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&dbh_id,&record)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&dbh_id,&record)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
@ -576,7 +576,7 @@ PHP_FUNCTION(dbase_create) {
PLS_FETCH();
DBase_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&filename,&fields)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&filename,&fields)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(filename);

View File

@ -275,7 +275,7 @@ void domxmltestnode_class_call_function(INTERNAL_FUNCTION_PARAMETERS, zend_prope
pval_destructor(&overloaded_property->element);
}
printf("%d arguments\n", ARG_COUNT(ht));
printf("%d arguments\n", ZEND_NUM_ARGS());
return_value->value.str.val = estrndup("testing", 7);
return_value->value.str.len = 7;
return_value->type = IS_STRING;
@ -302,7 +302,7 @@ PHP_FUNCTION(domxml_test)
{
zval *id;
if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE)
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE)
WRONG_PARAM_COUNT;
convert_to_long(id);
@ -332,7 +332,7 @@ PHP_FUNCTION(domxml_attrname)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -343,7 +343,7 @@ PHP_FUNCTION(domxml_attrname)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -388,7 +388,7 @@ PHP_FUNCTION(domxml_node)
xmlNode *node;
int ret;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(arg);
@ -420,7 +420,7 @@ PHP_FUNCTION(domxml_lastchild)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -431,7 +431,7 @@ PHP_FUNCTION(domxml_lastchild)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -471,7 +471,7 @@ PHP_FUNCTION(domxml_parent)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -482,7 +482,7 @@ PHP_FUNCTION(domxml_parent)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -522,7 +522,7 @@ PHP_FUNCTION(domxml_children)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if ((zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) &&
@ -534,7 +534,7 @@ PHP_FUNCTION(domxml_children)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -591,7 +591,7 @@ PHP_FUNCTION(domxml_getattr)
char *value;
int type;
if ((ARG_COUNT(ht) == 1) && getParameters(ht, 1, &arg1) == SUCCESS) {
if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -603,7 +603,7 @@ PHP_FUNCTION(domxml_getattr)
RETURN_FALSE;
}
convert_to_string(arg1);
} else if ((ARG_COUNT(ht) == 2) && getParameters(ht, 2, &id, &arg1) == SUCCESS) {
} else if ((ZEND_NUM_ARGS() == 2) && getParameters(ht, 2, &id, &arg1) == SUCCESS) {
convert_to_long(id);
id_to_find = id->value.lval;
convert_to_string(arg1);
@ -636,7 +636,7 @@ PHP_FUNCTION(domxml_setattr)
xmlAttr *attr;
int type;
if ((ARG_COUNT(ht) == 2) && getParameters(ht, 2, &arg1, &arg2) == SUCCESS) {
if ((ZEND_NUM_ARGS() == 2) && getParameters(ht, 2, &arg1, &arg2) == SUCCESS) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -649,7 +649,7 @@ PHP_FUNCTION(domxml_setattr)
}
convert_to_string(arg1);
convert_to_string(arg2);
} else if ((ARG_COUNT(ht) == 3) && getParameters(ht, 3, &id, &arg1, &arg2) == SUCCESS) {
} else if ((ZEND_NUM_ARGS() == 3) && getParameters(ht, 3, &id, &arg1, &arg2) == SUCCESS) {
convert_to_long(id);
id_to_find = id->value.lval;
convert_to_string(arg1);
@ -683,7 +683,7 @@ PHP_FUNCTION(domxml_attributes)
xmlAttr *attr;
int type;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -694,7 +694,7 @@ PHP_FUNCTION(domxml_attributes)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -740,7 +740,7 @@ PHP_FUNCTION(domxml_rootnew)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "doc", sizeof("doc"), (void **)&tmp) == FAILURE) {
@ -751,7 +751,7 @@ PHP_FUNCTION(domxml_rootnew)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -803,7 +803,7 @@ PHP_FUNCTION(domxml_root)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "doc", sizeof("doc"), (void **)&tmp) == FAILURE) {
@ -814,7 +814,7 @@ PHP_FUNCTION(domxml_root)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -862,7 +862,7 @@ PHP_FUNCTION(domxml_intdtd)
int type;
int ret;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "doc", sizeof("doc"), (void **)&tmp) == FAILURE) {
@ -873,7 +873,7 @@ PHP_FUNCTION(domxml_intdtd)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -915,7 +915,7 @@ PHP_FUNCTION(domxml_dumpmem)
int size;
int type;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "doc", sizeof("doc"), (void **)&tmp) == FAILURE) {
@ -926,7 +926,7 @@ PHP_FUNCTION(domxml_dumpmem)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 1) || getParameters(ht, 1, &id) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -955,7 +955,7 @@ PHP_FUNCTION(xmldoc)
xmlDoc *docp;
int ret;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(arg);
@ -986,7 +986,7 @@ PHP_FUNCTION(xmldocfile)
xmlDoc *docp;
int ret;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(arg);
@ -1018,7 +1018,7 @@ PHP_FUNCTION(domxml_new_child)
int type;
int ret;
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "node", sizeof("node"), (void **)&tmp) == FAILURE) {
@ -1031,7 +1031,7 @@ PHP_FUNCTION(domxml_new_child)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 3) || getParameters(ht, 3, &id, &name, &content) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 3) || getParameters(ht, 3, &id, &name, &content) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -1077,7 +1077,7 @@ PHP_FUNCTION(domxml_add_root)
int type;
int ret;
if (ARG_COUNT(ht) == 1) {
if (ZEND_NUM_ARGS() == 1) {
id = getThis();
if (id) {
if (zend_hash_find(id->value.obj.properties, "doc", sizeof("doc"), (void **)&tmp) == FAILURE) {
@ -1090,7 +1090,7 @@ PHP_FUNCTION(domxml_add_root)
} else {
RETURN_FALSE;
}
} else if ((ARG_COUNT(ht) != 2) || getParameters(ht, 2, &id, &name) == FAILURE) {
} else if ((ZEND_NUM_ARGS() != 2) || getParameters(ht, 2, &id, &name) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long(id);
@ -1130,7 +1130,7 @@ PHP_FUNCTION(domxml_new_xmldoc)
xmlDoc *docp;
int ret;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(arg);
@ -1295,7 +1295,7 @@ PHP_FUNCTION(xmltree)
xmlDoc *docp;
xmlNode *root;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(arg);

View File

@ -175,7 +175,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
if (icase)
copts |= REG_ICASE;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &regex, &findin) == FAILURE) {
WRONG_PARAM_COUNT;
@ -429,7 +429,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
char *replace;
char *ret;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg_pattern, &arg_replace, &arg_string) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg_pattern, &arg_replace, &arg_string) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -504,7 +504,7 @@ PHP_FUNCTION(split)
char *strp, *endp;
int err, size, count;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &spliton, &str) == FAILURE)
WRONG_PARAM_COUNT;
@ -600,7 +600,7 @@ PHPAPI PHP_FUNCTION(sql_regcase)
unsigned char c;
register int i, j;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &string)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &string)==FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -955,7 +955,7 @@ PHPAPI int php_read_jpeg_exif(ImageInfoType *ImageInfo, char *FileName, int Read
Reads the EXIF header data from a JPEG file */
PHP_FUNCTION(read_exif_data) {
pval **p_name;
int ac = ARG_COUNT(ht), ret;
int ac = ZEND_NUM_ARGS(), ret;
ImageInfoType ImageInfo;
char tmp[64];

View File

@ -150,7 +150,7 @@ PHP_FUNCTION(fdf_open) {
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -174,7 +174,7 @@ PHP_FUNCTION(fdf_close) {
FDFDoc fdf;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -222,7 +222,7 @@ PHP_FUNCTION(fdf_get_value) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -263,7 +263,7 @@ PHP_FUNCTION(fdf_set_value) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &arg1, &arg2,&arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2,&arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -297,7 +297,7 @@ PHP_FUNCTION(fdf_next_field_name) {
FDFErc err;
FDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc > 2) || (argc < 1))
WRONG_PARAM_COUNT;
@ -344,7 +344,7 @@ PHP_FUNCTION(fdf_set_ap) {
FDFAppFace face;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 5 || zend_get_parameters_ex(5, &arg1, &arg2,&arg3, &arg4, &arg5) == FAILURE) {
if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &arg1, &arg2,&arg3, &arg4, &arg5) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -392,7 +392,7 @@ PHP_FUNCTION(fdf_set_status) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -424,7 +424,7 @@ PHP_FUNCTION(fdf_get_status) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -459,7 +459,7 @@ PHP_FUNCTION(fdf_set_file) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -491,7 +491,7 @@ PHP_FUNCTION(fdf_get_file) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -526,7 +526,7 @@ PHP_FUNCTION(fdf_save) {
FDFErc err;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -556,7 +556,7 @@ PHP_FUNCTION(fdf_add_template) {
pdfFileSpecRec filespec;
FDF_TLS_VARS;
if (ARG_COUNT(ht) != 5 || zend_get_parameters_ex(5, &arg1, &arg2,&arg3, &arg4, &arg5) == FAILURE) {
if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &arg1, &arg2,&arg3, &arg4, &arg5) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -190,7 +190,7 @@ PHP_FUNCTION(filepro)
PLS_FETCH();
FP_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &dir) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dir) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -288,7 +288,7 @@ PHP_FUNCTION(filepro_rowcount)
PLS_FETCH();
FP_TLS_VARS;
if (ARG_COUNT(ht) != 0) {
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
@ -344,7 +344,7 @@ PHP_FUNCTION(filepro_fieldname)
int i;
FP_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &fno) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &fno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -385,7 +385,7 @@ PHP_FUNCTION(filepro_fieldtype)
int i;
FP_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &fno) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &fno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -424,7 +424,7 @@ PHP_FUNCTION(filepro_fieldwidth)
int i;
FP_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &fno) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &fno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -460,7 +460,7 @@ PHP_FUNCTION(filepro_fieldcount)
{
FP_TLS_VARS;
if (ARG_COUNT(ht) != 0) {
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
@ -495,7 +495,7 @@ PHP_FUNCTION(filepro_retrieve)
PLS_FETCH();
FP_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &rno, &fno) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &rno, &fno) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -140,7 +140,7 @@ PHP_FUNCTION(ftp_connect)
/* arg1 - hostname
* arg2 - [port]
*/
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
@ -179,7 +179,7 @@ PHP_FUNCTION(ftp_login)
* arg2 - username
* arg3 - password
*/
if ( ARG_COUNT(ht) != 3 ||
if ( ZEND_NUM_ARGS() != 3 ||
getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -210,7 +210,7 @@ PHP_FUNCTION(ftp_pwd)
/* arg1 - ftp
*/
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -235,7 +235,7 @@ PHP_FUNCTION(ftp_cdup)
/* arg1 - ftp
*/
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -260,7 +260,7 @@ PHP_FUNCTION(ftp_chdir)
/* arg1 - ftp
* arg2 - directory
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -291,7 +291,7 @@ PHP_FUNCTION(ftp_mkdir)
/* arg1 - ftp
* arg2 - directory
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -328,7 +328,7 @@ PHP_FUNCTION(ftp_rmdir)
/* arg1 - ftp
* arg2 - directory
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -359,7 +359,7 @@ PHP_FUNCTION(ftp_nlist)
/* arg1 - ftp
* arg2 - directory
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -393,7 +393,7 @@ PHP_FUNCTION(ftp_rawlist)
/* arg1 - ftp
* arg2 - directory
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -428,7 +428,7 @@ PHP_FUNCTION(ftp_systype)
/* arg1 - ftp
* arg2 - directory
*/
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -458,7 +458,7 @@ PHP_FUNCTION(ftp_fget)
* arg3 - remote file
* arg4 - transfer mode
*/
if ( ARG_COUNT(ht) != 4 ||
if ( ZEND_NUM_ARGS() != 4 ||
getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -493,7 +493,7 @@ PHP_FUNCTION(ftp_pasv)
/* arg1 - ftp
* arg2 - pasv
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -525,7 +525,7 @@ PHP_FUNCTION(ftp_get)
* arg3 - source (remote) file
* arg4 - transfer mode
*/
if ( ARG_COUNT(ht) != 4 ||
if ( ZEND_NUM_ARGS() != 4 ||
getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -594,7 +594,7 @@ PHP_FUNCTION(ftp_fput)
* arg3 - fp
* arg4 - transfer mode
*/
if ( ARG_COUNT(ht) != 4 ||
if ( ZEND_NUM_ARGS() != 4 ||
getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -629,7 +629,7 @@ PHP_FUNCTION(ftp_put)
* arg3 - source (local) file
* arg4 - transfer mode
*/
if ( ARG_COUNT(ht) != 4 ||
if ( ZEND_NUM_ARGS() != 4 ||
getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -671,7 +671,7 @@ PHP_FUNCTION(ftp_size)
/* arg1 - ftp
* arg2 - path
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -695,7 +695,7 @@ PHP_FUNCTION(ftp_mdtm)
/* arg1 - ftp
* arg2 - path
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -720,7 +720,7 @@ PHP_FUNCTION(ftp_rename)
* arg2 - src
* arg3 - dest
*/
if ( ARG_COUNT(ht) != 3 ||
if ( ZEND_NUM_ARGS() != 3 ||
getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -750,7 +750,7 @@ PHP_FUNCTION(ftp_delete)
/* arg1 - ftp
* arg2 - path
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -779,7 +779,7 @@ PHP_FUNCTION(ftp_site)
/* arg1 - ftp
* arg2 - cmd
*/
if ( ARG_COUNT(ht) != 2 ||
if ( ZEND_NUM_ARGS() != 2 ||
getParameters(ht, 2, &arg1, &arg2) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -807,7 +807,7 @@ PHP_FUNCTION(ftp_quit)
/* arg1 - ftp
*/
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -325,7 +325,7 @@ PHP_FUNCTION(imageloadfont) {
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -403,7 +403,7 @@ PHP_FUNCTION(imagecreate)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &x_size, &y_size) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x_size, &y_size) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -429,7 +429,7 @@ PHP_FUNCTION(imagecreatefrompng)
int issock=0, socketd=0;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(file);
@ -474,7 +474,7 @@ PHP_FUNCTION(imagepng)
int output=1;
GDLS_FETCH();
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &imgind, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -545,7 +545,7 @@ PHP_FUNCTION(imagecreatefromgif )
int issock=0, socketd=0;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -595,7 +595,7 @@ PHP_FUNCTION(imagegif)
int output=1;
GDLS_FETCH();
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &imgind, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -674,7 +674,7 @@ PHP_FUNCTION(imagecreatefromjpeg)
int issock=0, socketd=0;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(file);
@ -719,7 +719,7 @@ PHP_FUNCTION(imagejpeg)
int output=1, q=-1;
GDLS_FETCH();
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 3 || zend_get_parameters_ex(argc, &imgind, &file, &qual) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -790,7 +790,7 @@ PHP_FUNCTION(imagedestroy)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &imgind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &imgind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -812,7 +812,7 @@ PHP_FUNCTION(imagecolorallocate)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &imgind, &red,
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &imgind, &red,
&green, &blue) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -841,7 +841,7 @@ PHP_FUNCTION(imagecolorat)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &imgind, &x, &y) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &imgind, &x, &y) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -872,7 +872,7 @@ PHP_FUNCTION(imagecolorclosest)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &imgind, &red,
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &imgind, &red,
&green, &blue) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -901,7 +901,7 @@ PHP_FUNCTION(imagecolordeallocate)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &imgind, &index) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &imgind, &index) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -931,7 +931,7 @@ PHP_FUNCTION(imagecolorresolve)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &imgind, &red,
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &imgind, &red,
&green, &blue) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -961,7 +961,7 @@ PHP_FUNCTION(imagecolorexact)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &imgind, &red,
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &imgind, &red,
&green, &blue) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -991,7 +991,7 @@ PHP_FUNCTION(imagecolorset)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 5 || zend_get_parameters_ex(5, &imgind, &color, &red, &green, &blue) == FAILURE) {
if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &imgind, &color, &red, &green, &blue) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1027,7 +1027,7 @@ PHP_FUNCTION(imagecolorsforindex)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &imgind, &index) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &imgind, &index) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1060,7 +1060,7 @@ PHP_FUNCTION(imagegammacorrect)
int i;
GDLS_FETCH();
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &IM, &inputgamma, &outputgamma) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1089,7 +1089,7 @@ PHP_FUNCTION(imagesetpixel)
int col, y, x;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &imgind, &xarg, &yarg, &colarg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1119,7 +1119,7 @@ PHP_FUNCTION(imageline)
int col, y2, x2, y1, x1;
GDLS_FETCH();
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &IM, &X1, &Y1, &X2, &Y2, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1153,7 +1153,7 @@ PHP_FUNCTION(imagedashedline)
int col, y2, x2, y1, x1;
GDLS_FETCH();
if (ARG_COUNT(ht) != 6 || zend_get_parameters_ex(6, &IM, &X1, &Y1, &X2, &Y2, &COL) == FAILURE)
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_ex(6, &IM, &X1, &Y1, &X2, &Y2, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -1187,7 +1187,7 @@ PHP_FUNCTION(imagerectangle)
int col, y2, x2, y1, x1;
GDLS_FETCH();
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &IM, &X1, &Y1, &X2, &Y2, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1223,7 +1223,7 @@ PHP_FUNCTION(imagefilledrectangle)
int col, y2, x2, y1, x1;
GDLS_FETCH();
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &IM, &X1, &Y1, &X2, &Y2, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1257,7 +1257,7 @@ PHP_FUNCTION(imagearc)
int col, e, st, h, w, cy, cx;
GDLS_FETCH();
if (ARG_COUNT(ht) != 8 ||
if (ZEND_NUM_ARGS() != 8 ||
zend_get_parameters_ex(8, &IM, &CX, &CY, &W, &H, &ST, &E, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1303,7 +1303,7 @@ PHP_FUNCTION(imagefilltoborder)
int col, border, y, x;
GDLS_FETCH();
if (ARG_COUNT(ht) != 5 ||
if (ZEND_NUM_ARGS() != 5 ||
zend_get_parameters_ex(5, &IM, &X, &Y, &BORDER, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1336,7 +1336,7 @@ PHP_FUNCTION(imagefill)
int col, y, x;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &IM, &X, &Y, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1365,7 +1365,7 @@ PHP_FUNCTION(imagecolorstotal)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", GDG(le_gd));
@ -1384,7 +1384,7 @@ PHP_FUNCTION(imagecolortransparent)
int col;
GDLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &IM) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1421,7 +1421,7 @@ PHP_FUNCTION(imageinterlace)
int interlace;
GDLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &IM) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1459,7 +1459,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) {
int npoints, col, nelem, i;
GDLS_FETCH();
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &IM, &POINTS, &NPOINTS, &COL) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1593,7 +1593,7 @@ static void php_imagefontsize(INTERNAL_FUNCTION_PARAMETERS, int arg)
pval *SIZE;
gdFontPtr font;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &SIZE) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &SIZE) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(SIZE);
@ -1656,7 +1656,7 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode) {
gdFontPtr font;
GDLS_FETCH();
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &IM, &SIZE, &X, &Y, &C, &COL) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1751,7 +1751,7 @@ PHP_FUNCTION(imagecopy)
int srcH, srcW, srcY, srcX, dstY, dstX;
GDLS_FETCH();
if (ARG_COUNT(ht) != 8 ||
if (ZEND_NUM_ARGS() != 8 ||
zend_get_parameters_ex(8, &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH)
== FAILURE) {
WRONG_PARAM_COUNT;
@ -1789,7 +1789,7 @@ PHP_FUNCTION(imagecopyresized)
int srcH, srcW, dstH, dstW, srcY, srcX, dstY, dstX;
GDLS_FETCH();
if (ARG_COUNT(ht) != 10 ||
if (ZEND_NUM_ARGS() != 10 ||
zend_get_parameters_ex(10, &DIM, &SIM, &DX, &DY, &SX, &SY, &DW, &DH,
&SW, &SH) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1830,7 +1830,7 @@ PHP_FUNCTION(imagesx)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1848,7 +1848,7 @@ PHP_FUNCTION(imagesy)
gdImagePtr im;
GDLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1903,11 +1903,11 @@ void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode)
GDLS_FETCH();
if (mode == TTFTEXT_BBOX) {
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &PTSIZE, &ANGLE, &FONTNAME, &C) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &PTSIZE, &ANGLE, &FONTNAME, &C) == FAILURE) {
WRONG_PARAM_COUNT;
}
} else {
if (ARG_COUNT(ht) != 8 || zend_get_parameters_ex(8, &IM, &PTSIZE, &ANGLE, &X, &Y, &COL, &FONTNAME, &C) == FAILURE) {
if (ZEND_NUM_ARGS() != 8 || zend_get_parameters_ex(8, &IM, &PTSIZE, &ANGLE, &X, &Y, &COL, &FONTNAME, &C) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", GDG(le_gd));
@ -1979,7 +1979,7 @@ PHP_FUNCTION(imagepsloadfont)
int f_ind;
int *font;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2028,7 +2028,7 @@ PHP_FUNCTION(imagepscopyfont)
int l_ind, type;
gd_ps_font *nf_ind, *of_ind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &fnt) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &fnt) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2086,7 +2086,7 @@ PHP_FUNCTION(imagepsfreefont)
zval **fnt;
int *f_ind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &fnt) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &fnt) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2110,7 +2110,7 @@ PHP_FUNCTION(imagepsencodefont)
char **enc_vector;
int *f_ind;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &fnt, &enc) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fnt, &enc) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2146,7 +2146,7 @@ PHP_FUNCTION(imagepsextendfont)
zval **fnt, **ext;
int *f_ind;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &fnt, &ext) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fnt, &ext) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2172,7 +2172,7 @@ PHP_FUNCTION(imagepsslantfont)
zval **fnt, **slt;
int *f_ind;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &fnt, &slt) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fnt, &slt) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2209,7 +2209,7 @@ PHP_FUNCTION(imagepstext)
T1_OUTLINE *char_path, *str_path;
T1_TMATRIX *transform = NULL;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 8:
if (zend_get_parameters_ex(8, &img, &str, &fnt, &sz, &fg, &bg, &px, &py) == FAILURE) {
RETURN_FALSE;
@ -2358,7 +2358,7 @@ PHP_FUNCTION(imagepsbbox)
double angle, sin_a = 0, cos_a = 0;
BBox char_bbox, str_bbox = {0, 0, 0, 0};
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 3:
if (zend_get_parameters_ex(3, &str, &fnt, &sz) == FAILURE) {
RETURN_FALSE;

View File

@ -43,7 +43,7 @@ PHP_FUNCTION(imagepsloadfont)
zval **file;
int f_ind, l_ind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -89,7 +89,7 @@ PHP_FUNCTION(imagepscopyfont)
int l_ind, type;
gd_ps_font *nf_ind, *of_ind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &fnt) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &fnt) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -142,7 +142,7 @@ PHP_FUNCTION(imagepsfreefont)
zval **fnt;
int type;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &fnt) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &fnt) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -169,7 +169,7 @@ PHP_FUNCTION(imagepsencodefont)
int type;
int f_ind;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &fnt, &enc) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fnt, &enc) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -207,7 +207,7 @@ PHP_FUNCTION(imagepsextendfont)
int type;
int f_ind;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &fnt, &ext) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fnt, &ext) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -237,7 +237,7 @@ PHP_FUNCTION(imagepsslantfont)
int type;
int f_ind;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &fnt, &slt) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fnt, &slt) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -275,7 +275,7 @@ PHP_FUNCTION(imagepstext)
T1_OUTLINE *char_path, *str_path;
T1_TMATRIX *transform = NULL;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 8:
if (zend_get_parameters_ex(8, &img, &str, &fnt, &sz, &fg, &bg, &px, &py) == FAILURE) {
RETURN_FALSE;
@ -436,7 +436,7 @@ PHP_FUNCTION(imagepsbbox)
double angle, sin_a, cos_a;
BBox char_bbox, str_bbox = {0, 0, 0, 0};
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 3:
if (zend_get_parameters(ht, 3, &str, &fnt, &sz) == FAILURE) {
RETURN_FALSE;

View File

@ -60,7 +60,7 @@ PHP_FUNCTION(textdomain)
char *domain_name, *retval;
char *val;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &domain) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &domain) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(domain);
@ -85,7 +85,7 @@ PHP_FUNCTION(gettext)
pval **msgid;
char *msgstr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &msgid) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &msgid) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(msgid);
@ -103,7 +103,7 @@ PHP_FUNCTION(dgettext)
pval **domain_name, **msgid;
char *msgstr;
if (ARG_COUNT(ht) != 2
if (ZEND_NUM_ARGS() != 2
|| zend_get_parameters_ex(2, &domain_name, &msgid) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -124,7 +124,7 @@ PHP_FUNCTION(dcgettext)
pval **domain_name, **msgid, **category;
char *msgstr;
if (ARG_COUNT(ht) != 3
if (ZEND_NUM_ARGS() != 3
|| zend_get_parameters_ex(3, &domain_name, &msgid, &category) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -149,7 +149,7 @@ PHP_FUNCTION(bindtextdomain)
char *retval, *dir_name;
char *val;
if (ARG_COUNT(ht) != 2
if (ZEND_NUM_ARGS() != 2
|| zend_get_parameters_ex(2, &domain_name, &dir) == FAILURE)
{
WRONG_PARAM_COUNT;

View File

@ -653,7 +653,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
int do_swap;
int version = 0;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
switch(argc) {
case 2:
case 4:
@ -917,7 +917,7 @@ PHP_FUNCTION(hw_close) {
int id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -941,7 +941,7 @@ PHP_FUNCTION(hw_info)
hw_connection *ptr;
char *str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -973,7 +973,7 @@ PHP_FUNCTION(hw_error)
int id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -996,7 +996,7 @@ PHP_FUNCTION(hw_errormsg)
hw_connection *ptr;
char errstr[100];
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -1101,7 +1101,7 @@ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) {
int link, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
return NULL;
}
convert_to_long_ex(arg1);
@ -1260,7 +1260,7 @@ PHP_FUNCTION(hw_dummy) {
int link, id, type, msgid;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -1297,7 +1297,7 @@ PHP_FUNCTION(hw_getobject) {
char *query;
hw_connection *ptr;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc < 2 || argc > 3)
WRONG_PARAM_COUNT;
if (zend_get_parameters_array_ex(argc, argv) == FAILURE)
@ -1384,7 +1384,7 @@ PHP_FUNCTION(hw_insertobject) {
char *objrec, *parms;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -1417,7 +1417,7 @@ PHP_FUNCTION(hw_getandlock) {
int link, id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -1448,7 +1448,7 @@ PHP_FUNCTION(hw_unlock) {
int link, id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -1476,7 +1476,7 @@ PHP_FUNCTION(hw_deleteobject) {
int link, id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -1506,7 +1506,7 @@ PHP_FUNCTION(hw_changeobject) {
char *modification, *oldobjrec, buf[BUFFERLEN];
HashTable *newobjarr;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1); /* Connection */
@ -1597,7 +1597,7 @@ PHP_FUNCTION(hw_modifyobject) {
char *modification;
HashTable *remobjarr, *addobjarr;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc > 5) || (argc < 4))
WRONG_PARAM_COUNT;
@ -1825,11 +1825,11 @@ void php_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) {
switch(mvcp) {
case MOVE: /* Move also has fromID */
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE)
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE)
WRONG_PARAM_COUNT;
break;
case COPY:
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE)
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE)
WRONG_PARAM_COUNT;
break;
}
@ -1931,7 +1931,7 @@ PHP_FUNCTION(hw_gettext) {
hw_document *doc;
hw_connection *ptr;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc > 3) || (argc < 2))
WRONG_PARAM_COUNT;
@ -1991,7 +1991,7 @@ PHP_FUNCTION(hw_edittext) {
hw_connection *ptr;
hw_document *docptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2033,7 +2033,7 @@ PHP_FUNCTION(hw_getcgi) {
hw_connection *ptr;
char cgi_env_str[BUFFERLEN];
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2094,7 +2094,7 @@ PHP_FUNCTION(hw_getremote) {
hw_document *doc;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2134,7 +2134,7 @@ PHP_FUNCTION(hw_getremotechildren) {
hw_connection *ptr;
char *objrec;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2237,7 +2237,7 @@ PHP_FUNCTION(hw_setlinkroot) {
int link, type, rootid;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2267,7 +2267,7 @@ PHP_FUNCTION(hw_pipedocument) {
server_rec *serv = ((request_rec *) SG(server_context))->server;
#endif
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc > 2) || (argc < 2))
WRONG_PARAM_COUNT;
@ -2337,7 +2337,7 @@ PHP_FUNCTION(hw_pipecgi) {
server_rec *serv = ((request_rec *) SG(server_context))->server;
#endif
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2401,7 +2401,7 @@ PHP_FUNCTION(hw_insertdocument) {
server_rec *serv = ((request_rec *) SG(server_context))->server;
#endif
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2445,7 +2445,7 @@ PHP_FUNCTION(hw_new_document) {
char *ptr;
hw_document *doc;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2479,7 +2479,7 @@ PHP_FUNCTION(hw_free_document) {
int id, type;
hw_document *ptr;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2505,7 +2505,7 @@ PHP_FUNCTION(hw_output_document) {
int id, type;
hw_document *ptr;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2535,7 +2535,7 @@ PHP_FUNCTION(hw_document_bodytag) {
hw_document *ptr;
char *temp, *str = NULL;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc > 2) || (argc < 1))
WRONG_PARAM_COUNT;
@ -2574,7 +2574,7 @@ PHP_FUNCTION(hw_document_content) {
int id, type, argc;
hw_document *ptr;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc != 1)
WRONG_PARAM_COUNT;
@ -2601,7 +2601,7 @@ PHP_FUNCTION(hw_document_setcontent) {
hw_document *ptr;
char *str;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc != 2)
WRONG_PARAM_COUNT;
@ -2640,7 +2640,7 @@ PHP_FUNCTION(hw_document_size) {
int id, type;
hw_document *ptr;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2666,7 +2666,7 @@ PHP_FUNCTION(hw_document_attributes) {
int id, type;
hw_document *ptr;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2691,7 +2691,7 @@ PHP_FUNCTION(hw_getparentsobj) {
char **childObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2725,7 +2725,7 @@ PHP_FUNCTION(hw_getparents) {
int count;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(arg1);
@ -2770,7 +2770,7 @@ PHP_FUNCTION(hw_children) {
int count;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -2816,7 +2816,7 @@ PHP_FUNCTION(hw_childrenobj) {
char **childObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -2850,7 +2850,7 @@ PHP_FUNCTION(hw_getchildcoll) {
int count;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -2896,7 +2896,7 @@ PHP_FUNCTION(hw_getchildcollobj) {
char **childObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -2929,7 +2929,7 @@ PHP_FUNCTION(hw_docbyanchor) {
int link, id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -2960,7 +2960,7 @@ PHP_FUNCTION(hw_docbyanchorobj) {
int link, id, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -2998,7 +2998,7 @@ PHP_FUNCTION(hw_getobjectbyquery) {
int *childIDs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3041,7 +3041,7 @@ PHP_FUNCTION(hw_getobjectbyqueryobj) {
char **childObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3079,7 +3079,7 @@ PHP_FUNCTION(hw_getobjectbyquerycoll) {
hw_connection *ptr;
int *childIDs = NULL;
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3124,7 +3124,7 @@ PHP_FUNCTION(hw_getobjectbyquerycollobj) {
hw_connection *ptr;
char **childObjRecs = NULL;
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3163,7 +3163,7 @@ PHP_FUNCTION(hw_getchilddoccoll) {
int *childIDs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3202,7 +3202,7 @@ PHP_FUNCTION(hw_getchilddoccollobj) {
char **childObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3237,7 +3237,7 @@ PHP_FUNCTION(hw_getanchors) {
int *anchorIDs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3276,7 +3276,7 @@ PHP_FUNCTION(hw_getanchorsobj) {
char **anchorObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3308,7 +3308,7 @@ PHP_FUNCTION(hw_getusername) {
int link, type;
hw_connection *ptr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3333,7 +3333,7 @@ PHP_FUNCTION(hw_identify) {
char *name, *passwd, *userdata;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3379,7 +3379,7 @@ PHP_FUNCTION(hw_identify) {
PHP_FUNCTION(hw_objrec2array) {
zval **arg1, **arg2;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if(zend_get_parameters_ex(1, &arg1) == FAILURE)
WRONG_PARAM_COUNT;
@ -3405,7 +3405,7 @@ PHP_FUNCTION(hw_array2objrec) {
pval **arg1;
char *objrec, *retobj;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_array_ex(arg1);
@ -3427,7 +3427,7 @@ PHP_FUNCTION(hw_incollections) {
hw_connection *ptr;
int cobjids, ccollids, *objectIDs, *collIDs, cretids, *retIDs, retcoll;
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3488,7 +3488,7 @@ PHP_FUNCTION(hw_inscoll) {
int id, newid, type, link;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3526,7 +3526,7 @@ PHP_FUNCTION(hw_insdoc) {
int id, newid, type, link, argc;
hw_connection *ptr;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if((argc < 3) || (argc > 4))
WRONG_PARAM_COUNT;
@ -3569,7 +3569,7 @@ PHP_FUNCTION(hw_getsrcbydestobj) {
char **childObjRecs = NULL;
hw_connection *ptr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3601,7 +3601,7 @@ PHP_FUNCTION(hw_mapid) {
int link, type, servid, id, virtid;
hw_connection *ptr;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3634,7 +3634,7 @@ PHP_FUNCTION(hw_getrellink) {
char *anchorstr;
hw_connection *ptr;
if (ARG_COUNT(ht) != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);
@ -3679,7 +3679,7 @@ PHP_FUNCTION(hw_connection_info)
hw_connection *ptr;
int link, type;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg1);

View File

@ -170,7 +170,7 @@ void php_icap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
long flags=0;
long cl_flags=0;
int ind;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc <3 || myargc >4 || getParameters(ht, myargc, &calendar,&user,&passwd,&options) == FAILURE) {
@ -207,7 +207,7 @@ PHP_FUNCTION(icap_close)
pval *options, *streamind;
int ind, ind_type;
pils *icap_le_struct=NULL;
int myargcount=ARG_COUNT(ht);
int myargcount=ZEND_NUM_ARGS();
long flags = 0;
if (myargcount < 1 || myargcount > 2 || getParameters(ht, myargcount, &streamind, &options) == FAILURE) {
@ -252,7 +252,7 @@ PHP_FUNCTION(icap_reopen)
int ind, ind_type;
long flags=0;
long cl_flags=0;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc<2 || myargc>3 || getParameters(ht,myargc,&streamind, &calendar, &options) == FAILURE) {
WRONG_PARAM_COUNT;
@ -292,7 +292,7 @@ PHP_FUNCTION(icap_expunge)
pval *start,*end;
pils *icap_le_struct;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &streamind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -321,7 +321,7 @@ PHP_FUNCTION(icap_fetch_event)
int ind, ind_type;
pils *icap_le_struct=NULL;
CALEVENT *myevent;
int myargcount=ARG_COUNT(ht);
int myargcount=ZEND_NUM_ARGS();
if (myargcount < 1 || myargcount > 3 || getParameters(ht, myargcount, &streamind, &eventid,&options) == FAILURE) {
WRONG_PARAM_COUNT;
@ -396,7 +396,7 @@ PHP_FUNCTION(icap_list_events)
cal_list_t *my_cal_list;
datetime_t begincal,endcal;
int myargc;
myargc=ARG_COUNT(ht);
myargc=ZEND_NUM_ARGS();
if (myargc <2 || myargc > 3 || getParameters(ht,myargc,&streamind,&begindate,&enddate) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -476,7 +476,7 @@ PHP_FUNCTION(icap_create_calendar)
pval *streamind, *calendar;
int ind, ind_type;
pils *icap_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc <1 || myargc > 2 || getParameters(ht,myargc,&streamind,&calendar) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -511,7 +511,7 @@ PHP_FUNCTION(icap_rename_calendar)
pval *streamind, *src_calendar,*dest_calendar;
int ind, ind_type;
pils *icap_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc <2 || myargc > 3 || getParameters(ht,myargc,&streamind,&src_calendar,&dest_calendar) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -549,7 +549,7 @@ PHP_FUNCTION(icap_list_alarms)
unsigned int msgno;
cal_list_t *my_cal_list;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc != 3 || getParameters(ht,myargc,&streamind,&date,&time) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -620,7 +620,7 @@ PHP_FUNCTION(icap_delete_calendar)
pval *streamind, *calendar;
int ind, ind_type;
pils *icap_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc <1 || myargc > 2 || getParameters(ht,myargc,&streamind,&calendar) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -655,7 +655,7 @@ PHP_FUNCTION(icap_delete_event)
pval *streamind, *uid;
int ind, ind_type;
pils *icap_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc <1 || myargc > 2 || getParameters(ht,myargc,&streamind,&uid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -707,7 +707,7 @@ PHP_FUNCTION(icap_store_event)
int myargc;
unsigned long uid;
CALEVENT *myevent;
myargc=ARG_COUNT(ht);
myargc=ZEND_NUM_ARGS();
if (myargc !=2 || getParameters(ht,myargc,&streamind,&storeobject) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -852,7 +852,7 @@ PHP_FUNCTION(icap_snooze)
pils *icap_le_struct;
pval **pvalue;
int myargc;
myargc=ARG_COUNT(ht);
myargc=ZEND_NUM_ARGS();
if (myargc !=2 || getParameters(ht,myargc,&streamind,&uid) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -519,7 +519,7 @@ static void php3_ifx_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
PLS_FETCH();
if (PG(sql_safe_mode)) {
if (ARG_COUNT(ht)>0) {
if (ZEND_NUM_ARGS()>0) {
php_error(E_NOTICE,
"SQL safe mode in effect - ignoring host/user/password information");
}
@ -533,7 +533,7 @@ static void php3_ifx_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
user = IFXG(default_user);
passwd = IFXG(default_password);
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0: /* defaults */
break;
case 1: {
@ -805,7 +805,7 @@ EXEC SQL END DECLARE SECTION;
id = -1;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
id = IFXG(default_link);
break;
@ -895,7 +895,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
if(ARG_COUNT(ht)<2) {
if(ZEND_NUM_ARGS()<2) {
WRONG_PARAM_COUNT;
}
@ -903,7 +903,7 @@ EXEC SQL END DECLARE SECTION;
/* get the first 2 parameters,
php4 insists on the correct number of arguments */
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &query, &ifx_link)==FAILURE)
RETURN_FALSE;
@ -1012,11 +1012,11 @@ EXEC SQL END DECLARE SECTION;
strcpy(Ifx_Result->descrpid, descrpid);
strcpy(Ifx_Result->statemid, statemid);
if(ARG_COUNT(ht)>3) {
if(ZEND_NUM_ARGS()>3) {
WRONG_PARAM_COUNT;
}
if(ARG_COUNT(ht)==3) {
if(ZEND_NUM_ARGS()==3) {
if (zend_get_parameters_ex(3, &dummy, &dummy, &pblobidarr) == FAILURE) {
php_error(E_WARNING,"Can't get blob array param");
EXEC SQL DEALLOCATE DESCRIPTOR :descrpid;
@ -1102,7 +1102,7 @@ EXEC SQL END DECLARE SECTION;
ctype = 0; /* preset */
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
break;
case 3:
@ -1283,7 +1283,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
if(ARG_COUNT(ht)<2) {
if(ZEND_NUM_ARGS()<2) {
WRONG_PARAM_COUNT;
}
@ -1291,7 +1291,7 @@ EXEC SQL END DECLARE SECTION;
/* get the first 2 parameters,
php4 insists on the correct number of arguments */
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &query, &ifx_link)==FAILURE)
RETURN_FALSE;
@ -1401,10 +1401,10 @@ EXEC SQL END DECLARE SECTION;
strcpy(Ifx_Result->descrpid, descrpid);
if(ARG_COUNT(ht)>3) {
if(ZEND_NUM_ARGS()>3) {
WRONG_PARAM_COUNT;
}
if(ARG_COUNT(ht)==3) {
if(ZEND_NUM_ARGS()==3) {
Ifx_Result->paramquery=1;
if (zend_get_parameters_ex(3, &dummy, &dummy,&pblobidarr) == FAILURE) {
php_error(E_WARNING,"Can't get blob array param");
@ -1474,7 +1474,7 @@ EXEC SQL END DECLARE SECTION;
ctype = 0;; /* preset */
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
break;
case 3:
@ -1562,7 +1562,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
WRONG_PARAM_COUNT;
break;
@ -1711,7 +1711,7 @@ PHP_FUNCTION(ifx_error)
IFXLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = IFXG(default_link);
break;
@ -1752,7 +1752,7 @@ PHP_FUNCTION(ifx_errormsg)
IFXLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
if (IFXG(sv_sqlcode) == 0)
ifx_errorcode = SQLCODE;
@ -1812,7 +1812,7 @@ PHP_FUNCTION(ifx_affected_rows)
IFXLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
WRONG_PARAM_COUNT;
break;
@ -1905,7 +1905,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
WRONG_PARAM_COUNT;
break;
@ -2290,7 +2290,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &result)==FAILURE) {
RETURN_FALSE;
@ -2618,7 +2618,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &result)==FAILURE) {
RETURN_FALSE;
@ -2797,7 +2797,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &result)==FAILURE) {
RETURN_FALSE;
@ -2961,7 +2961,7 @@ PHP_FUNCTION(ifx_num_rows)
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2996,7 +2996,7 @@ PHP_FUNCTION(ifx_getsqlca)
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -3037,7 +3037,7 @@ PHP_FUNCTION(ifx_num_fields)
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -3080,7 +3080,7 @@ EXEC SQL END DECLARE SECTION;
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -3178,7 +3178,7 @@ PHP_FUNCTION(ifx_create_blob) {
long id;
long mode,type;
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &ptype,&pmode,&pparam)==FAILURE) {
if (ZEND_NUM_ARGS()!=3 || getParameters(ht, 3, &ptype,&pmode,&pparam)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -3291,7 +3291,7 @@ PHP_FUNCTION(ifx_copy_blob) {
pval *pbid;
long newid;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -3398,7 +3398,7 @@ PHP_FUNCTION(ifx_free_blob) {
pval *pid;
long ret;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pid);
@ -3518,7 +3518,7 @@ PHP_FUNCTION(ifx_get_blob) {
long len;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -3611,7 +3611,7 @@ PHP_FUNCTION(ifx_update_blob) {
long ret;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &pbid,&pparam)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &pbid,&pparam)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -3744,7 +3744,7 @@ PHP_FUNCTION(ifx_blobinfile_mode) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -3773,7 +3773,7 @@ PHP_FUNCTION(ifx_textasvarchar) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -3803,7 +3803,7 @@ PHP_FUNCTION(ifx_byteasvarchar) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -3833,7 +3833,7 @@ PHP_FUNCTION(ifx_nullformat) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -3882,7 +3882,7 @@ PHP_FUNCTION(ifx_create_char) {
pval *pparam;
long id;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pparam)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pparam)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(pparam);
@ -3954,7 +3954,7 @@ PHP_FUNCTION(ifx_get_char) {
long len;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -4012,7 +4012,7 @@ PHP_FUNCTION(ifx_free_char) {
pval *pid;
long ret;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pid);
@ -4076,7 +4076,7 @@ PHP_FUNCTION(ifx_update_char) {
long ret;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &pbid,&pparam)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &pbid,&pparam)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -4161,7 +4161,7 @@ PHP_FUNCTION(ifxus_create_slob) {
long id;
long mode,create_mode;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -4245,7 +4245,7 @@ PHP_FUNCTION(ifxus_free_slob) {
pval *pid;
long ret;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pid);
@ -4313,7 +4313,7 @@ PHP_FUNCTION(ifxus_close_slob) {
pval *pid;
long ret;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pid);
@ -4385,7 +4385,7 @@ PHP_FUNCTION(ifxus_open_slob) {
pval *pbid,*pmode;
long mode,create_mode;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 1, &pbid,&pmode)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 1, &pbid,&pmode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pmode);
@ -4527,7 +4527,7 @@ PHP_FUNCTION(ifxus_tell_slob) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -4577,7 +4577,7 @@ PHP_FUNCTION(ifxus_seek_slob) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &pbid, &pmode, &poffset)==FAILURE) {
if (ZEND_NUM_ARGS()!=3 || getParameters(ht, 3, &pbid, &pmode, &poffset)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -4640,7 +4640,7 @@ PHP_FUNCTION(ifxus_read_slob) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &pbid, &pnbytes)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &pbid, &pnbytes)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);
@ -4694,7 +4694,7 @@ PHP_FUNCTION(ifxus_write_slob) {
IFXLS_FETCH();
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &pbid, &pcontent)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &pbid, &pcontent)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(pbid);

View File

@ -637,17 +637,17 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
ib_uname_len = ib_uname ? strlen(ib_uname) : 0;
ib_passwd_len = ib_passwd ? strlen(ib_passwd) : 0;
if(ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 7){
if(ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 7){
WRONG_PARAM_COUNT;
}
args = (pval ***) emalloc(sizeof(pval **)*ARG_COUNT(ht));
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args) == FAILURE) {
args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
RETURN_FALSE;
}
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 7:
convert_to_string_ex(args[6]);
ib_role = (*args[6])->value.str.val;
@ -853,7 +853,7 @@ PHP_FUNCTION(ibase_close)
RESET_ERRMSG;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
link_id = IBG(default_link);
break;
@ -1394,7 +1394,7 @@ PHP_FUNCTION(ibase_trans)
link_id = IBG(default_link);
/* TODO: multi-databases trans */
argn = ARG_COUNT(ht);
argn = ZEND_NUM_ARGS();
if (argn < 0 || argn > 2) {
WRONG_PARAM_COUNT;
}
@ -1500,7 +1500,7 @@ static void _php_ibase_trans_end(INTERNAL_FUNCTION_PARAMETERS, int commit)
RESET_ERRMSG;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
link_id = IBG(default_link);
break;
@ -1569,12 +1569,12 @@ PHP_FUNCTION(ibase_query)
RESET_ERRMSG;
if (ARG_COUNT(ht) < 1) {
if (ZEND_NUM_ARGS() < 1) {
WRONG_PARAM_COUNT;
}
args = (pval ***) emalloc(sizeof(pval **)*ARG_COUNT(ht));
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args) == FAILURE) {
args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
RETURN_FALSE;
}
@ -1600,11 +1600,11 @@ PHP_FUNCTION(ibase_query)
RETURN_FALSE;
}
if (ARG_COUNT(ht) > i) { /* have variables to bind */
if (ZEND_NUM_ARGS() > i) { /* have variables to bind */
/* XXX Remove or fix??? Variable placeholders and binding makes
absolutely no sense if not using a prepared SQL statement.
*/
bind_n = ARG_COUNT(ht) - i;
bind_n = ZEND_NUM_ARGS() - i;
bind_args = args[i];
}
@ -1842,14 +1842,14 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
RESET_ERRMSG;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (ARG_COUNT(ht)==1 && zend_get_parameters_ex(1, &result_arg)==FAILURE) {
if (ZEND_NUM_ARGS()==1 && zend_get_parameters_ex(1, &result_arg)==FAILURE) {
RETURN_FALSE;
}
break;
case 2:
if (ARG_COUNT(ht)==2 && zend_get_parameters_ex(2, &result_arg, &flag_arg)==FAILURE) {
if (ZEND_NUM_ARGS()==2 && zend_get_parameters_ex(2, &result_arg, &flag_arg)==FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(flag_arg);
@ -2072,7 +2072,7 @@ PHP_FUNCTION(ibase_free_result)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2097,7 +2097,7 @@ PHP_FUNCTION(ibase_prepare)
RESET_ERRMSG;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &query_arg) == FAILURE) {
RETURN_FALSE;
@ -2150,23 +2150,23 @@ PHP_FUNCTION(ibase_execute)
RESET_ERRMSG;
if (ARG_COUNT(ht) < 1) {
if (ZEND_NUM_ARGS() < 1) {
WRONG_PARAM_COUNT;
}
args = (pval ***)emalloc(ARG_COUNT(ht) * sizeof(pval **));
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args) == FAILURE) {
args = (pval ***)emalloc(ZEND_NUM_ARGS() * sizeof(pval **));
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(ib_query, ibase_query *, args[0], -1, "InterBase query", IBG(le_query));
if (ARG_COUNT(ht) > 1) { /* have variables to bind */
if (ZEND_NUM_ARGS() > 1) { /* have variables to bind */
bind_args = args[1];
}
if ( _php_ibase_exec(&ib_result, ib_query, ARG_COUNT(ht)-1, bind_args) == FAILURE) {
if ( _php_ibase_exec(&ib_result, ib_query, ZEND_NUM_ARGS()-1, bind_args) == FAILURE) {
efree(args);
RETURN_FALSE;
}
@ -2193,7 +2193,7 @@ PHP_FUNCTION(ibase_free_query)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &query_arg) == FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &query_arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2217,17 +2217,17 @@ PHP_FUNCTION(ibase_timefmt)
RESET_ERRMSG; /* ??? */
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2){
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2){
WRONG_PARAM_COUNT;
}
args = (pval ***) emalloc(sizeof(pval **)*ARG_COUNT(ht));
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args) == FAILURE) {
args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
RETURN_FALSE;
}
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
convert_to_long_ex(args[1]);
type = (*args[1])->value.lval;
@ -2275,7 +2275,7 @@ PHP_FUNCTION(ibase_num_fields)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2306,7 +2306,7 @@ PHP_FUNCTION(ibase_field_info)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &result_arg, &field_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &result_arg, &field_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2443,7 +2443,7 @@ PHP_FUNCTION(ibase_blob_create)
RESET_ERRMSG;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
link_id = IBG(default_link);
break;
@ -2493,7 +2493,7 @@ PHP_FUNCTION(ibase_blob_open)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2532,7 +2532,7 @@ PHP_FUNCTION(ibase_blob_add)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &blob_arg, &string_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &blob_arg, &string_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2563,7 +2563,7 @@ PHP_FUNCTION(ibase_blob_get)
RESET_ERRMSG;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &blob_arg, &len_arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &blob_arg, &len_arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2614,7 +2614,7 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2673,7 +2673,7 @@ PHP_FUNCTION(ibase_blob_info)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2751,7 +2751,7 @@ PHP_FUNCTION(ibase_blob_echo)
RESET_ERRMSG;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &blob_arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2813,7 +2813,7 @@ PHP_FUNCTION(ibase_blob_import)
RESET_ERRMSG;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &file_arg) == FAILURE) {
RETURN_FALSE;

View File

@ -328,7 +328,7 @@ void java_call_function_handler
zend_overloaded_element *function_name = (zend_overloaded_element *)
property_reference->elements_list->tail->data;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
jlong result = 0;
pval **arguments = (pval **) emalloc(sizeof(pval *)*arg_count);

View File

@ -221,7 +221,7 @@ PHP_FUNCTION(ldap_connect)
LDAP *ldap;
LDAPLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
host = NULL;
port = 0;
@ -378,7 +378,7 @@ PHP_FUNCTION(ldap_bind)
char *ldap_bind_rdn, *ldap_bind_pw;
LDAP *ldap;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1: /* Anonymous Bind */
if (zend_get_parameters_ex(1, &link) == FAILURE) {
WRONG_PARAM_COUNT;
@ -433,7 +433,7 @@ PHP_FUNCTION(ldap_unbind)
pval **link;
LDAP *ldap;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &link) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &link) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -459,7 +459,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
int num_attribs=0, i;
LDAPLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 3 :
if (zend_get_parameters_ex(3, &link, &base_dn,&filter) == FAILURE) {
WRONG_PARAM_COUNT;
@ -581,7 +581,7 @@ PHP_FUNCTION(ldap_free_result)
pval **result;
LDAPMessage *ldap_result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &result) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -604,7 +604,7 @@ PHP_FUNCTION(ldap_count_entries)
LDAP *ldap;
LDAPMessage *ldap_result;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link, &result) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &result) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -628,7 +628,7 @@ PHP_FUNCTION(ldap_first_entry)
LDAPMessage *ldap_result_entry;
LDAPLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link, &result) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &result) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -655,7 +655,7 @@ PHP_FUNCTION(ldap_next_entry)
LDAPMessage *ldap_result_entry, *ldap_result_entry_next;
LDAPLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link,&result_entry) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link,&result_entry) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -689,7 +689,7 @@ PHP_FUNCTION(ldap_get_entries)
char **ldap_value;
char *dn;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link, &result) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &result) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -771,7 +771,7 @@ PHP_FUNCTION(ldap_first_attribute)
char *attribute;
LDAPLS_FETCH();
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &link,&result,&berp) == FAILURE || ParameterPassedByReference(ht,3)==0 ) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &link,&result,&berp) == FAILURE || ParameterPassedByReference(ht,3)==0 ) {
WRONG_PARAM_COUNT;
}
@ -806,7 +806,7 @@ PHP_FUNCTION(ldap_next_attribute)
BerElement *ber;
char *attribute;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &link,&result,&berp) == FAILURE ) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &link,&result,&berp) == FAILURE ) {
WRONG_PARAM_COUNT;
}
@ -842,7 +842,7 @@ PHP_FUNCTION(ldap_get_attributes)
int i, count, num_values, num_attrib;
BerElement *ber;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link, &result_entry) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &result_entry) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -898,7 +898,7 @@ PHP_FUNCTION(ldap_get_values)
char **ldap_value;
int i, num_values;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &link,&result_entry, &attr) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &link,&result_entry, &attr) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -949,7 +949,7 @@ PHP_FUNCTION(ldap_get_values_len)
struct berval **ldap_value_len;
int i, num_values;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &link, &result_entry, &attr) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -999,7 +999,7 @@ PHP_FUNCTION(ldap_get_dn)
LDAPMessage *entry;
char *text;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link, &entryp) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &entryp) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1029,7 +1029,7 @@ PHP_FUNCTION(ldap_explode_dn)
char **ldap_value;
int i, count;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &dn,&with_attrib) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &dn,&with_attrib) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1062,7 +1062,7 @@ PHP_FUNCTION(ldap_dn2ufn)
pval **dn;
char *ufn;
if (ARG_COUNT(ht) !=1 || zend_get_parameters_ex(1,&dn)==FAILURE) {
if (ZEND_NUM_ARGS() !=1 || zend_get_parameters_ex(1,&dn)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1096,7 +1096,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
ulong index;
int is_full_add=0; /* flag for full add operation so ldap_mod_add can be put back into oper, gerrit THomson */
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &link, &dn,&entry) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &link, &dn,&entry) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1246,7 +1246,7 @@ PHP_FUNCTION(ldap_delete)
LDAP *ldap;
char *ldap_dn;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &link, &dn) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &dn) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1271,7 +1271,7 @@ PHP_FUNCTION(ldap_errno) {
LDAP* ldap;
pval** ldap_link;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(ht, &ldap_link) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ht, &ldap_link) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(ldap_link);
@ -1300,7 +1300,7 @@ PHP_FUNCTION(ldap_errno) {
PHP_FUNCTION(ldap_err2str) {
zval** perrno;
if ( ARG_COUNT(ht) != 1 || zend_get_parameters_ex(ht, &perrno) == FAILURE) {
if ( ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ht, &perrno) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(perrno);
@ -1316,7 +1316,7 @@ PHP_FUNCTION(ldap_error) {
pval** link;
int ld_errno;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(ht, &link) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ht, &link) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -230,7 +230,7 @@ void php_mcal_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
long flags=0;
int ind;
int myargc = ARG_COUNT(ht);
int myargc = ZEND_NUM_ARGS();
if (myargc < 3 || myargc > 4 || zend_get_parameters_ex(myargc, &calendar, &user, &passwd, &options) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -345,7 +345,7 @@ PHP_FUNCTION(mcal_close)
zval **options, **streamind;
int ind, ind_type;
pils *mcal_le_struct=NULL;
int myargcount=ARG_COUNT(ht);
int myargcount=ZEND_NUM_ARGS();
long flags = 0;
if (myargcount < 1 || myargcount > 2 || zend_get_parameters_ex(myargcount, &streamind, &options) == FAILURE) {
@ -394,7 +394,7 @@ PHP_FUNCTION(mcal_reopen)
int ind, ind_type;
long flags=0;
long cl_flags=0;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc < 2 || myargc > 3 || zend_get_parameters_ex(myargc, &streamind, &calendar, &options) == FAILURE) {
WRONG_PARAM_COUNT;
@ -430,7 +430,7 @@ PHP_FUNCTION(mcal_expunge)
int ind, ind_type;
pils *mcal_le_struct;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -457,7 +457,7 @@ PHP_FUNCTION(mcal_fetch_event)
int ind, ind_type;
pils *mcal_le_struct=NULL;
CALEVENT *myevent;
int myargcount=ARG_COUNT(ht);
int myargcount=ZEND_NUM_ARGS();
if (myargcount < 1 || myargcount > 3 || zend_get_parameters_ex(myargcount, &streamind, &eventid, &options) == FAILURE) {
WRONG_PARAM_COUNT;
@ -490,7 +490,7 @@ PHP_FUNCTION(mcal_fetch_current_stream_event)
zval **streamind;
int ind, ind_type;
pils *mcal_le_struct=NULL;
int myargcount=ARG_COUNT(ht);
int myargcount=ZEND_NUM_ARGS();
if (myargcount != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
@ -519,7 +519,7 @@ PHP_FUNCTION(mcal_list_events)
datetime_t startdate=DT_INIT;
datetime_t enddate=DT_INIT;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if ((myargc != 1 && myargc != 7) || zend_get_parameters_ex(myargc, &streamind, &startyear, &startmonth, &startday, &endyear, &endmonth, &endday) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -571,7 +571,7 @@ PHP_FUNCTION(mcal_create_calendar)
zval **streamind, **calendar;
int ind, ind_type;
pils *mcal_le_struct;
int myargc = ARG_COUNT(ht);
int myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &calendar) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -605,7 +605,7 @@ PHP_FUNCTION(mcal_rename_calendar)
zval **streamind, **src_calendar, **dest_calendar;
int ind, ind_type;
pils *mcal_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &streamind, &src_calendar, &dest_calendar) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -638,7 +638,7 @@ PHP_FUNCTION(mcal_list_alarms)
int ind, ind_type;
pils *mcal_le_struct;
cal_list_t *my_cal_list;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc != 1 || myargc !=7 || zend_get_parameters_ex(myargc, &streamind, &year, &month, &day, &hour, &min, &sec) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -687,7 +687,7 @@ PHP_FUNCTION(mcal_delete_calendar)
zval **streamind, **calendar;
int ind, ind_type;
pils *mcal_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &calendar) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -722,7 +722,7 @@ PHP_FUNCTION(mcal_delete_event)
zval **streamind, **uid;
int ind, ind_type;
pils *mcal_le_struct;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &uid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -757,7 +757,7 @@ PHP_FUNCTION(mcal_append_event)
unsigned long uid;
CALEVENT *myevent=NULL;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -787,7 +787,7 @@ PHP_FUNCTION(mcal_store_event)
int myargc;
CALEVENT *myevent=NULL;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -814,7 +814,7 @@ PHP_FUNCTION(mcal_snooze)
int ind, ind_type;
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &uid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -847,7 +847,7 @@ PHP_FUNCTION(mcal_event_set_category)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &category) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -874,7 +874,7 @@ PHP_FUNCTION(mcal_event_set_title)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &title) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -901,7 +901,7 @@ PHP_FUNCTION(mcal_event_set_description)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &description) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -929,7 +929,7 @@ PHP_FUNCTION(mcal_event_set_start)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc < 4 || myargc > 7 || zend_get_parameters_ex(myargc, &streamind, &year, &month, &date, &hour, &min, &sec) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -970,7 +970,7 @@ PHP_FUNCTION(mcal_event_set_end)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc < 4 || myargc > 7 || zend_get_parameters_ex(myargc, &streamind, &year, &month, &date, &hour, &min, &sec) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1007,7 +1007,7 @@ PHP_FUNCTION(mcal_event_set_alarm)
int ind, ind_type;
pils *mcal_le_struct;
int myargc;
myargc=ARG_COUNT(ht);
myargc=ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &alarm) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1035,7 +1035,7 @@ PHP_FUNCTION(mcal_event_init)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1061,7 +1061,7 @@ PHP_FUNCTION(mcal_event_set_class)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &streamind, &class) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1089,7 +1089,7 @@ PHP_FUNCTION(mcal_event_add_attribute)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &streamind, &attribute, &val) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1123,7 +1123,7 @@ PHP_FUNCTION(mcal_is_leap_year)
zval **year;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 1 || zend_get_parameters_ex(1, &year) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1146,7 +1146,7 @@ PHP_FUNCTION(mcal_days_in_month)
zval **month, **leap;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters_ex(2, &month, &leap) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1166,7 +1166,7 @@ PHP_FUNCTION(mcal_date_valid)
zval **year, **month, **day;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &year, &month, &day) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1191,7 +1191,7 @@ PHP_FUNCTION(mcal_time_valid)
zval **hour, **min, **sec;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &hour, &min, &sec) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1217,7 +1217,7 @@ PHP_FUNCTION(mcal_day_of_week)
int myargc;
datetime_t mydate;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &year, &month, &day) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1241,7 +1241,7 @@ PHP_FUNCTION(mcal_day_of_year)
int myargc;
datetime_t mydate;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &year, &month, &day) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1264,7 +1264,7 @@ PHP_FUNCTION(mcal_week_of_year)
zval **year, **month, **day;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &day, &month, &year) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1291,7 +1291,7 @@ PHP_FUNCTION(mcal_date_compare)
int myargc;
datetime_t myadate, mybdate;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 6 || zend_get_parameters_ex(6, &ayear, &amonth, &aday, &byear, &bmonth, &bday) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1322,7 +1322,7 @@ PHP_FUNCTION(mcal_next_recurrence)
int myargc;
datetime_t mydate;
myargc=ARG_COUNT(ht);
myargc=ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters_ex(3, &streamind, &weekstart, &next) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1397,7 +1397,7 @@ PHP_FUNCTION(mcal_event_set_recur_none)
pils *mcal_le_struct;
int myargc;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 1 || zend_get_parameters_ex(1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1425,7 +1425,7 @@ PHP_FUNCTION(mcal_event_set_recur_daily)
int myargc;
datetime_t endtime = DT_INIT;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 5 || zend_get_parameters_ex(5, &streamind, &year, &month, &day, &interval) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1458,7 +1458,7 @@ PHP_FUNCTION(mcal_event_set_recur_weekly)
int myargc;
datetime_t endtime=DT_INIT;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 6 || zend_get_parameters_ex(6, &streamind, &year, &month, &day, &interval, &weekdays) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1492,7 +1492,7 @@ PHP_FUNCTION(mcal_event_set_recur_monthly_mday)
int myargc;
datetime_t endtime=DT_INIT;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 5 || zend_get_parameters_ex(5, &streamind, &year, &month, &day, &interval) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1525,7 +1525,7 @@ PHP_FUNCTION(mcal_event_set_recur_monthly_wday)
int myargc;
datetime_t endtime=DT_INIT;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 5 || zend_get_parameters_ex(5, &streamind, &year, &month, &day, &interval) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1558,7 +1558,7 @@ PHP_FUNCTION(mcal_event_set_recur_yearly)
int myargc;
datetime_t endtime=DT_INIT;
myargc = ARG_COUNT(ht);
myargc = ZEND_NUM_ARGS();
if (myargc != 5 || zend_get_parameters_ex(5, &streamind, &year, &month, &day, &interval) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -186,7 +186,7 @@ PHP_FUNCTION(mcrypt_create_iv)
int i;
int n = 0;
if(ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &size, &psource) == FAILURE) {
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &size, &psource) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -232,7 +232,7 @@ PHP_FUNCTION(mcrypt_get_cipher_name)
pval **cipher;
char *str, *nstr;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &cipher) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &cipher) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -255,7 +255,7 @@ PHP_FUNCTION(mcrypt_get_key_size)
{
pval **cipher;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &cipher) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &cipher) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -271,7 +271,7 @@ PHP_FUNCTION(mcrypt_get_block_size)
{
pval **cipher;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &cipher) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &cipher) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -287,7 +287,7 @@ PHP_FUNCTION(mcrypt_ofb)
{
MCRYPT_ARGS;
if(ARG_COUNT(ht) != 5 ||
if(ZEND_NUM_ARGS() != 5 ||
zend_get_parameters_ex(5, &cipher, &key, &data, &mode, &iv) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -309,7 +309,7 @@ PHP_FUNCTION(mcrypt_cfb)
{
MCRYPT_ARGS;
if(ARG_COUNT(ht) != 5 ||
if(ZEND_NUM_ARGS() != 5 ||
zend_get_parameters_ex(5, &cipher, &key, &data, &mode, &iv) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -331,7 +331,7 @@ PHP_FUNCTION(mcrypt_cfb)
PHP_FUNCTION(mcrypt_cbc)
{
MCRYPT_ARGS;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if(ac < 4 || ac > 5 ||
zend_get_parameters_ex(ac, &cipher, &key, &data, &mode, &iv) == FAILURE) {
@ -362,7 +362,7 @@ PHP_FUNCTION(mcrypt_ecb)
{
MCRYPT_ARGS2;
if(ARG_COUNT(ht) != 4 ||
if(ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &cipher, &key, &data, &mode) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -81,7 +81,7 @@ PHP_FUNCTION(mhash_get_block_size)
{
pval **hash;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &hash) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &hash) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -98,7 +98,7 @@ PHP_FUNCTION(mhash_get_hash_name)
pval **hash;
char *name;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &hash) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &hash) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -123,7 +123,7 @@ PHP_FUNCTION(mhash)
int bsize;
unsigned char *hash_data;
if(ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &hash, &data) == FAILURE) {
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &hash, &data) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -220,7 +220,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
int hashed_details_length;
int msql;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0: /* defaults */
host=NULL;
hashed_details=estrndup("msql_",5);
@ -389,7 +389,7 @@ DLEXPORT PHP_FUNCTION(msql_close)
int id;
int msql;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
id = msql_globals.default_link;
break;
@ -420,7 +420,7 @@ DLEXPORT PHP_FUNCTION(msql_select_db)
int id;
int msql;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &db)==FAILURE) {
RETURN_FALSE;
@ -460,7 +460,7 @@ DLEXPORT PHP_FUNCTION(msql_create_db)
int id;
int msql;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &db)==FAILURE) {
WRONG_PARAM_COUNT;
@ -498,7 +498,7 @@ DLEXPORT PHP_FUNCTION(msql_drop_db)
int id;
int msql;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &db)==FAILURE) {
WRONG_PARAM_COUNT;
@ -537,7 +537,7 @@ DLEXPORT PHP_FUNCTION(msql_query)
int msql;
int af_rows;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &query)==FAILURE) {
WRONG_PARAM_COUNT;
@ -575,7 +575,7 @@ DLEXPORT PHP_FUNCTION(msql_db_query)
int msql;
int af_rows;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (getParameters(ht, 2, &db, &query)==FAILURE) {
RETURN_FALSE;
@ -618,7 +618,7 @@ DLEXPORT PHP_FUNCTION(msql_list_dbs)
int msql;
m_result *msql_result;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU);
break;
@ -653,7 +653,7 @@ DLEXPORT PHP_FUNCTION(msql_list_tables)
int msql;
m_result *msql_result;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &db)==FAILURE) {
RETURN_FALSE;
@ -695,7 +695,7 @@ DLEXPORT PHP_FUNCTION(msql_list_fields)
int msql;
m_result *msql_result;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (getParameters(ht, 2, &db, &table)==FAILURE) {
RETURN_FALSE;
@ -733,7 +733,7 @@ DLEXPORT PHP_FUNCTION(msql_list_fields)
Returns the text of the error message from previous mSQL operation */
PHP_FUNCTION(msql_error)
{
if (ARG_COUNT(ht)) {
if (ZEND_NUM_ARGS()) {
WRONG_PARAM_COUNT;
}
RETURN_STRING(msqlErrMsg,1);
@ -751,7 +751,7 @@ DLEXPORT PHP_FUNCTION(msql_result)
int field_offset=0;
PLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (getParameters(ht, 2, &result, &row)==FAILURE) {
RETURN_FALSE;
@ -852,7 +852,7 @@ DLEXPORT PHP_FUNCTION(msql_num_rows)
m_result *msql_result;
m_query *msql_query;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -870,7 +870,7 @@ DLEXPORT PHP_FUNCTION(msql_num_fields)
m_result *msql_result;
m_query *msql_query;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -891,7 +891,7 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
int i;
PLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &result)==FAILURE) {
RETURN_FALSE;
@ -992,7 +992,7 @@ DLEXPORT PHP_FUNCTION(msql_data_seek)
m_result *msql_result;
m_query *msql_query;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &result, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1056,7 +1056,7 @@ DLEXPORT PHP_FUNCTION(msql_fetch_field)
m_field *msql_field;
m_query *msql_query;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &result)==FAILURE) {
RETURN_FALSE;
@ -1108,7 +1108,7 @@ DLEXPORT PHP_FUNCTION(msql_field_seek)
m_result *msql_result;
m_query *msql_query;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &result, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1140,7 +1140,7 @@ static void php_msql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
m_field *msql_field;
m_query *msql_query;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &field)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &result, &field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1267,7 +1267,7 @@ DLEXPORT PHP_FUNCTION(msql_free_result)
m_result *msql_result;
m_query *msql_query;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1285,7 +1285,7 @@ DLEXPORT PHP_FUNCTION(msql_affected_rows)
m_result *msql_result;
m_query *msql_query;
if(ARG_COUNT(ht) != 1 || getParameters(ht, 1, &result) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &result) == FAILURE) {
WRONG_PARAM_COUNT;
}
MSQL_GET_QUERY(result);

View File

@ -297,7 +297,7 @@ void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
MSSQLLS_FETCH();
/* PLS_FETCH(); */
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0: /* defaults */
host=user=passwd=NULL;
hashed_details_length=5+3;
@ -600,7 +600,7 @@ PHP_FUNCTION(mssql_close)
MSSQLLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
id = php_mssql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU MSSQLLS_CC);
CHECK_LINK(id);
@ -633,7 +633,7 @@ PHP_FUNCTION(mssql_select_db)
MSSQLLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &db)==FAILURE) {
RETURN_FALSE;
@ -764,7 +764,7 @@ PHP_FUNCTION(mssql_query)
MSSQLLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &query)==FAILURE) {
RETURN_FALSE;
@ -897,7 +897,7 @@ PHP_FUNCTION(mssql_free_result)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -932,7 +932,7 @@ PHP_FUNCTION(mssql_num_rows)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -953,7 +953,7 @@ PHP_FUNCTION(mssql_num_fields)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -975,7 +975,7 @@ PHP_FUNCTION(mssql_fetch_row)
zval *field_content;
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1007,7 +1007,7 @@ static void php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
PLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1066,7 +1066,7 @@ PHP_FUNCTION(mssql_data_seek)
MSSQLLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &mssql_result_index, &offset)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &mssql_result_index, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1151,7 +1151,7 @@ PHP_FUNCTION(mssql_fetch_field)
MSSQLLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
RETURN_FALSE;
@ -1185,7 +1185,7 @@ PHP_FUNCTION(mssql_fetch_field)
}
if (field_offset<0 || field_offset >= result->num_fields) {
if (ARG_COUNT(ht)==2) { /* field specified explicitly */
if (ZEND_NUM_ARGS()==2) { /* field specified explicitly */
php_error(E_WARNING,"MS SQL: Bad column offset");
}
RETURN_FALSE;
@ -1213,7 +1213,7 @@ PHP_FUNCTION(mssql_field_length)
MSSQLLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
RETURN_FALSE;
@ -1247,7 +1247,7 @@ PHP_FUNCTION(mssql_field_length)
}
if (field_offset<0 || field_offset >= result->num_fields) {
if (ARG_COUNT(ht)==2) { /* field specified explicitly */
if (ZEND_NUM_ARGS()==2) { /* field specified explicitly */
php_error(E_WARNING,"MS SQL: Bad column offset");
}
RETURN_FALSE;
@ -1269,7 +1269,7 @@ PHP_FUNCTION(mssql_field_name)
MSSQLLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
RETURN_FALSE;
@ -1303,7 +1303,7 @@ PHP_FUNCTION(mssql_field_name)
}
if (field_offset<0 || field_offset >= result->num_fields) {
if (ARG_COUNT(ht)==2) { /* field specified explicitly */
if (ZEND_NUM_ARGS()==2) { /* field specified explicitly */
php_error(E_WARNING,"MS SQL: Bad column offset");
}
RETURN_FALSE;
@ -1326,7 +1326,7 @@ PHP_FUNCTION(mssql_field_type)
MSSQLLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &mssql_result_index)==FAILURE) {
RETURN_FALSE;
@ -1360,7 +1360,7 @@ PHP_FUNCTION(mssql_field_type)
}
if (field_offset<0 || field_offset >= result->num_fields) {
if (ARG_COUNT(ht)==2) { /* field specified explicitly */
if (ZEND_NUM_ARGS()==2) { /* field specified explicitly */
php_error(E_WARNING,"MS SQL: Bad column offset");
}
RETURN_FALSE;
@ -1383,7 +1383,7 @@ PHP_FUNCTION(mssql_field_seek)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &mssql_result_index, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &mssql_result_index, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1420,7 +1420,7 @@ PHP_FUNCTION(mssql_result)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=3 || zend_get_parameters_ex(3, &mssql_result_index, &row, &field)==FAILURE) {
if (ZEND_NUM_ARGS()!=3 || zend_get_parameters_ex(3, &mssql_result_index, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1479,7 +1479,7 @@ PHP_FUNCTION(mssql_min_error_severity)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &severity)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &severity)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(severity);
@ -1496,7 +1496,7 @@ PHP_FUNCTION(mssql_min_message_severity)
MSSQLLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &severity)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &severity)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(severity);

View File

@ -321,7 +321,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
PLS_FETCH();
if (PG(sql_safe_mode)) {
if (ARG_COUNT(ht)>0) {
if (ZEND_NUM_ARGS()>0) {
php_error(E_NOTICE,"SQL safe mode in effect - ignoring host/user/password information");
}
host=passwd=NULL;
@ -334,7 +334,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
user = MySG(default_user);
passwd = MySG(default_password);
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0: /* defaults */
break;
case 1: {
@ -580,7 +580,7 @@ PHP_FUNCTION(mysql_close)
MYSQL *mysql;
MySLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
id = MySG(default_link);
break;
@ -612,7 +612,7 @@ PHP_FUNCTION(mysql_select_db)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &db)==FAILURE) {
RETURN_FALSE;
@ -654,7 +654,7 @@ PHP_FUNCTION(mysql_create_db)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &db)==FAILURE) {
RETURN_FALSE;
@ -694,7 +694,7 @@ PHP_FUNCTION(mysql_drop_db)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &db)==FAILURE) {
RETURN_FALSE;
@ -736,7 +736,7 @@ PHP_FUNCTION(mysql_query)
MYSQL_RES *mysql_result;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &query)==FAILURE) {
RETURN_FALSE;
@ -791,7 +791,7 @@ PHP_FUNCTION(mysql_db_query)
MYSQL_RES *mysql_result;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &db, &query)==FAILURE) {
RETURN_FALSE;
@ -851,7 +851,7 @@ PHP_FUNCTION(mysql_list_dbs)
MYSQL_RES *mysql_result;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU MySLS_CC);
CHECK_LINK(id);
@ -888,7 +888,7 @@ PHP_FUNCTION(mysql_list_tables)
MYSQL_RES *mysql_result;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &db)==FAILURE) {
RETURN_FALSE;
@ -932,7 +932,7 @@ PHP_FUNCTION(mysql_list_fields)
MYSQL_RES *mysql_result;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &db, &table)==FAILURE) {
RETURN_FALSE;
@ -976,7 +976,7 @@ PHP_FUNCTION(mysql_error)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = MySG(default_link);
if (id==-1) {
@ -1011,7 +1011,7 @@ PHP_FUNCTION(mysql_errno)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = MySG(default_link);
if (id==-1) {
@ -1046,7 +1046,7 @@ PHP_FUNCTION(mysql_affected_rows)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = MySG(default_link);
CHECK_LINK(id);
@ -1080,7 +1080,7 @@ PHP_FUNCTION(mysql_insert_id)
MYSQL *mysql;
MySLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = MySG(default_link);
CHECK_LINK(id);
@ -1116,7 +1116,7 @@ PHP_FUNCTION(mysql_result)
int field_offset=0;
PLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &result, &row)==FAILURE) {
RETURN_FALSE;
@ -1216,7 +1216,7 @@ PHP_FUNCTION(mysql_num_rows)
pval **result;
MYSQL_RES *mysql_result;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1235,7 +1235,7 @@ PHP_FUNCTION(mysql_num_fields)
pval **result;
MYSQL_RES *mysql_result;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1258,7 +1258,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
int i;
PLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &result)==FAILURE) {
RETURN_FALSE;
@ -1366,7 +1366,7 @@ PHP_FUNCTION(mysql_data_seek)
pval **result, **offset;
MYSQL_RES *mysql_result;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &result, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &result, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1394,7 +1394,7 @@ PHP_FUNCTION(mysql_fetch_lengths)
int i;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1472,7 +1472,7 @@ PHP_FUNCTION(mysql_fetch_field)
MYSQL_RES *mysql_result;
MYSQL_FIELD *mysql_field;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &result)==FAILURE) {
RETURN_FALSE;
@ -1528,7 +1528,7 @@ PHP_FUNCTION(mysql_field_seek)
pval **result, **offset;
MYSQL_RES *mysql_result;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &result, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &result, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1560,7 +1560,7 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
char buf[512];
int len;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &result, &field)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &result, &field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1724,7 +1724,7 @@ PHP_FUNCTION(mysql_free_result)
pval **result;
MYSQL_RES *mysql_result;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -2372,7 +2372,7 @@ PHP_FUNCTION(ocidefinebyname)
oci_statement *statement;
oci_define *define, *tmp_define;
ub2 ocitype = SQLT_CHR; /* zero terminated string */
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 3 || ac > 4 || zend_get_parameters_ex(ac, &stmt, &name, &var, &type) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2436,7 +2436,7 @@ PHP_FUNCTION(ocibindbyname)
OCIStmt *mystmt = 0;
dvoid *mydescr = 0;
sb4 value_sz = -1;
int ac = ARG_COUNT(ht), inx;
int ac = ZEND_NUM_ARGS(), inx;
if (ac < 3 || ac > 5 || zend_get_parameters_ex(ac, &stmt, &name, &var, &maxlen, &type) == FAILURE) { WRONG_PARAM_COUNT;
}
@ -2777,7 +2777,7 @@ PHP_FUNCTION(ociwritelobtofile)
oci_descriptor *descr;
char *buffer=0;
ub4 loblen;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
int fp = -1,inx;
OCILobLocator *mylob;
int coffs;
@ -3367,7 +3367,7 @@ PHP_FUNCTION(ocifetchinto)
ub4 nrows = 1;
int i, used;
int mode = OCI_NUM;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 2 || ac > 3 || zend_get_parameters_ex(ac, &stmt, &array, &fmode) == FAILURE) {
WRONG_PARAM_COUNT;
@ -3438,7 +3438,7 @@ PHP_FUNCTION(ocifetchstatement)
int mode = OCI_NUM;
int rows = 0;
char namebuf[ 128 ];
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 2 || ac > 3 || zend_get_parameters_ex(ac, &stmt, &array, &fmode) == FAILURE) {
WRONG_PARAM_COUNT;

View File

@ -781,7 +781,7 @@ PHP_FUNCTION(odbc_execute)
int numArgs, i, ne;
RETCODE rc;
numArgs = ARG_COUNT(ht);
numArgs = ZEND_NUM_ARGS();
if (numArgs == 1) {
if (zend_get_parameters_ex(1, &pv_res) == FAILURE)
WRONG_PARAM_COUNT;
@ -1003,7 +1003,7 @@ PHP_FUNCTION(odbc_exec)
UDWORD scrollopts;
#endif
numArgs = ARG_COUNT(ht);
numArgs = ZEND_NUM_ARGS();
if (numArgs > 2) {
if (zend_get_parameters_ex(3, &pv_conn, &pv_query, &pv_flags) == FAILURE)
WRONG_PARAM_COUNT;
@ -1105,7 +1105,7 @@ PHP_FUNCTION(odbc_fetch_into)
SDWORD rownum = -1;
pval **pv_res, **pv_row, **pv_res_arr, *tmp;
numArgs = ARG_COUNT(ht);
numArgs = ZEND_NUM_ARGS();
switch(numArgs) {
case 2:
@ -1125,7 +1125,7 @@ PHP_FUNCTION(odbc_fetch_into)
#else
pval **pv_res, **pv_res_arr, *tmp;
numArgs = ARG_COUNT(ht);
numArgs = ZEND_NUM_ARGS();
if (numArgs != 2 || zend_get_parameters_ex(2, &pv_res, &pv_res_arr) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1271,7 +1271,7 @@ PHP_FUNCTION(odbc_fetch_row)
UWORD RowStatus[1];
#endif
numArgs = ARG_COUNT(ht);
numArgs = ZEND_NUM_ARGS();
if (numArgs == 1) {
if (zend_get_parameters_ex(1, &pv_res) == FAILURE)
WRONG_PARAM_COUNT;
@ -1333,7 +1333,7 @@ PHP_FUNCTION(odbc_result)
field_ind = -1;
field = NULL;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2 , &pv_res, &pv_field) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2 , &pv_res, &pv_field) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1499,7 +1499,7 @@ PHP_FUNCTION(odbc_result_all)
UWORD RowStatus[1];
#endif
numArgs = ARG_COUNT(ht);
numArgs = ZEND_NUM_ARGS();
if (numArgs == 1) {
if (zend_get_parameters_ex(1, &pv_res) == FAILURE)
WRONG_PARAM_COUNT;
@ -1741,7 +1741,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
/* Now an optional 4th parameter specifying the cursor type
* defaulting to the cursors default
*/
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 3:
if (zend_get_parameters_ex(3, &pv_db, &pv_uid, &pv_pwd) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2123,7 +2123,7 @@ PHP_FUNCTION(odbc_autocommit)
pval **pv_conn, **pv_onoff = NULL;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 2) {
if (zend_get_parameters_ex(2, &pv_conn, &pv_onoff) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2253,7 +2253,7 @@ PHP_FUNCTION(odbc_tables)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 1) {
if (zend_get_parameters_ex(1, &pv_conn) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2335,7 +2335,7 @@ PHP_FUNCTION(odbc_columns)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 1) {
if (zend_get_parameters_ex(1, &pv_conn) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2418,7 +2418,7 @@ PHP_FUNCTION(odbc_columnprivileges)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 5) {
if (zend_get_parameters_ex(5, &pv_conn, &pv_cat, &pv_schema, &pv_table, &pv_column) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2500,7 +2500,7 @@ PHP_FUNCTION(odbc_foreignkeys)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 7) {
if (zend_get_parameters_ex(7, &pv_conn, &pv_pcat, &pv_pschema, &pv_ptable,
&pv_fcat, &pv_fschema, &pv_ftable) == FAILURE) {
@ -2597,7 +2597,7 @@ PHP_FUNCTION(odbc_gettypeinfo)
int argc;
SWORD data_type = SQL_ALL_TYPES;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 1) {
if (zend_get_parameters_ex(1, &pv_conn) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2669,7 +2669,7 @@ PHP_FUNCTION(odbc_primarykeys)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 4) {
if (zend_get_parameters_ex(4, &pv_conn, &pv_cat, &pv_schema, &pv_table) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2745,7 +2745,7 @@ PHP_FUNCTION(odbc_procedurecolumns)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 1) {
if (zend_get_parameters_ex(1, &pv_conn) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2829,7 +2829,7 @@ PHP_FUNCTION(odbc_procedures)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 1) {
if (zend_get_parameters_ex(1, &pv_conn) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2912,7 +2912,7 @@ PHP_FUNCTION(odbc_specialcolumns)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 7) {
if (zend_get_parameters_ex(7, &pv_conn, &pv_type, &pv_cat, &pv_schema,
&pv_name, &pv_scope, &pv_nullable) == FAILURE) {
@ -2999,7 +2999,7 @@ PHP_FUNCTION(odbc_statistics)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 6) {
if (zend_get_parameters_ex(6, &pv_conn, &pv_cat, &pv_schema,
&pv_name, &pv_unique, &pv_reserved) == FAILURE) {
@ -3082,7 +3082,7 @@ PHP_FUNCTION(odbc_tableprivileges)
RETCODE rc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc == 4) {
if (zend_get_parameters_ex(4, &pv_conn, &pv_cat, &pv_schema, &pv_table) == FAILURE) {
WRONG_PARAM_COUNT;

View File

@ -208,7 +208,7 @@ PHP_FUNCTION(velocis_connect)
php_error(E_WARNING,"Velocis: Too many open connections (%d)",php_velocis_module.num_links);
RETURN_FALSE;
}
if ( ARG_COUNT(ht) != 3 ||
if ( ZEND_NUM_ARGS() != 3 ||
getParameters(ht,3,&serv,&user,&pass) == FAILURE ) {
WRONG_PARAM_COUNT;
}
@ -245,7 +245,7 @@ PHP_FUNCTION(velocis_close)
pval *id;
VConn *conn;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&id) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&id) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
@ -272,7 +272,7 @@ PHP_FUNCTION(velocis_exec)
SWORD cols,i,colnamelen;
SDWORD rows,coldesc;
if ( ARG_COUNT(ht) != 2 || getParameters(ht,2,&ind,&exec_str) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&ind,&exec_str) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(ind);
@ -367,7 +367,7 @@ PHP_FUNCTION(velocis_fetch)
UDWORD row;
UWORD RowStat[1];
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&ind) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&ind) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(ind);
@ -403,7 +403,7 @@ PHP_FUNCTION(velocis_result)
SWORD indx = -1;
char *field = NULL;
if ( ARG_COUNT(ht) != 2 || getParameters(ht,2,&ind,&col) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&ind,&col) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(ind);
@ -494,7 +494,7 @@ PHP_FUNCTION(velocis_freeresult)
pval *ind;
Vresult *res;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&ind) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&ind) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(ind);
@ -514,7 +514,7 @@ PHP_FUNCTION(velocis_autocommit)
RETCODE stat;
VConn *conn;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&id) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&id) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
@ -537,7 +537,7 @@ PHP_FUNCTION(velocis_off_autocommit)
RETCODE stat;
VConn *conn;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&id) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&id) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
@ -560,7 +560,7 @@ PHP_FUNCTION(velocis_commit)
RETCODE stat;
VConn *conn;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&id) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&id) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
@ -583,7 +583,7 @@ PHP_FUNCTION(velocis_rollback)
RETCODE stat;
VConn *conn;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&id) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&id) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
@ -606,7 +606,7 @@ PHP_FUNCTION(velocis_fieldname)
Vresult *res;
SWORD indx;
if ( ARG_COUNT(ht) != 2 || getParameters(ht,2,&ind,&col) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 2 || getParameters(ht,2,&ind,&col) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(ind);
@ -629,7 +629,7 @@ PHP_FUNCTION(velocis_fieldnum)
pval *ind;
Vresult *res;
if ( ARG_COUNT(ht) != 1 || getParameters(ht,1,&ind) == FAILURE ) {
if ( ZEND_NUM_ARGS() != 1 || getParameters(ht,1,&ind) == FAILURE ) {
WRONG_PARAM_COUNT;
}
convert_to_long(ind);

View File

@ -566,7 +566,7 @@ PHP_FUNCTION(ora_open)
oraConnection *conn = NULL;
oraCursor *cursor = NULL;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE2(conn, oraConnection *, arg, -1, "Oracle-Connection", le_conn, le_pconn);
@ -701,7 +701,7 @@ PHP_FUNCTION(ora_parse)
sword defer = 0;
text *query;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 3:
zend_get_parameters_ex(3,&curs,&sql,&def);
convert_to_long_ex(def);
@ -761,7 +761,7 @@ PHP_FUNCTION(ora_bind)
oraCursor *cursor;
char *paramname;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 5:
zend_get_parameters_ex(5,&curs,&pvar,&svar,&plen,&ptyp);
convert_to_long_ex(ptyp);
@ -942,7 +942,7 @@ PHP_FUNCTION(ora_do)
oraCursor *cursor = NULL;
text *query;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &con,&sql) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &con,&sql) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE2(conn, oraConnection *, con, -1, "Oracle-Connection", le_conn, le_pconn);
@ -1053,7 +1053,7 @@ PHP_FUNCTION(ora_fetch_into)
int i;
int flags = 0;
switch(ARG_COUNT(ht)){
switch(ZEND_NUM_ARGS()){
case 2:
zend_get_parameters_ex(2, &curs, &arr);
break;
@ -1193,7 +1193,7 @@ PHP_FUNCTION(ora_columnname)
pval **curs, **col;
oraCursor *cursor = NULL;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1231,7 +1231,7 @@ PHP_FUNCTION(ora_columntype)
int colno;
oraCursor *cursor = NULL;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1299,7 +1299,7 @@ PHP_FUNCTION(ora_columnsize)
pval **curs, **col;
oraCursor *cursor = NULL;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* Find the cursor */
@ -1339,7 +1339,7 @@ PHP_FUNCTION(ora_getcolumn)
int len;
sb2 type;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &curs, &col) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1465,7 +1465,7 @@ PHP_FUNCTION(ora_error)
void *res;
int what;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
res = zend_fetch_resource(arg, -1,"Oracle-Connection/Cursor",&what,3,le_conn, le_pconn, le_cursor);
@ -1491,7 +1491,7 @@ PHP_FUNCTION(ora_errorcode)
void *res;
int what;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
res = zend_fetch_resource(arg, -1,"Oracle-Connection/Cursor",&what,3,le_conn, le_pconn, le_cursor);

View File

@ -324,7 +324,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
/* Get function parameters and do error-checking. */
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (global || zend_get_parameters_ex(2, &regex, &subject) == FAILURE) {
WRONG_PARAM_COUNT;
@ -859,7 +859,7 @@ PHP_FUNCTION(preg_replace)
ulong num_key;
/* Get function parameters and do error-checking. */
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &regex, &replace, &subject) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &regex, &replace, &subject) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -934,7 +934,7 @@ PHP_FUNCTION(preg_split)
*last_match; /* Location of last match */
/* Get function parameters and do error checking */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 4 || zend_get_parameters_ex(argc, &regex, &subject, &limit, &flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1047,8 +1047,8 @@ PHP_FUNCTION(preg_quote)
zend_bool quote_delim = 0; /* Whether to quote additional delim char */
/* Get the arguments and check for errors */
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &in_str_arg, &delim) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &in_str_arg, &delim) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1062,7 +1062,7 @@ PHP_FUNCTION(preg_quote)
RETVAL_STRINGL(empty_string, 0, 0);
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_string_ex(delim);
if (Z_STRLEN_PP(delim) > 0) {
delim_char = Z_STRVAL_PP(delim)[0];
@ -1134,7 +1134,7 @@ PHP_FUNCTION(preg_grep)
/* Get arguments and do error checking */
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(ARG_COUNT(ht), &regex, &input) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(ZEND_NUM_ARGS(), &regex, &input) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -269,7 +269,7 @@ PHP_FUNCTION(pdf_set_info_creator) {
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -298,7 +298,7 @@ PHP_FUNCTION(pdf_set_info_title) {
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -327,7 +327,7 @@ PHP_FUNCTION(pdf_set_info_subject) {
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -356,7 +356,7 @@ PHP_FUNCTION(pdf_set_info_author) {
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -385,7 +385,7 @@ PHP_FUNCTION(pdf_set_info_keywords) {
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -415,7 +415,7 @@ PHP_FUNCTION(pdf_open) {
int argc;
PDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc > 1)
WRONG_PARAM_COUNT;
if (argc != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
@ -452,7 +452,7 @@ PHP_FUNCTION(pdf_close) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -479,7 +479,7 @@ PHP_FUNCTION(pdf_begin_page) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -509,7 +509,7 @@ PHP_FUNCTION(pdf_end_page) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -535,7 +535,7 @@ PHP_FUNCTION(pdf_show) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -562,7 +562,7 @@ PHP_FUNCTION(pdf_show_xy) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -592,7 +592,7 @@ PHP_FUNCTION(pdf_show_boxed) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 7 || getParameters(ht, 7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) {
if (ZEND_NUM_ARGS() != 7 || getParameters(ht, 7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -624,7 +624,7 @@ PHP_FUNCTION(pdf_set_font) {
PDF *pdf;
PDF_TLS_VARS;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 4:
if (getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
@ -674,7 +674,7 @@ PHP_FUNCTION(pdf_get_font) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -701,7 +701,7 @@ PHP_FUNCTION(pdf_get_fontname) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -728,7 +728,7 @@ PHP_FUNCTION(pdf_get_fontsize) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -754,7 +754,7 @@ PHP_FUNCTION(pdf_set_leading) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -781,7 +781,7 @@ PHP_FUNCTION(pdf_set_text_rendering) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -808,7 +808,7 @@ PHP_FUNCTION(pdf_set_horiz_scaling) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -835,7 +835,7 @@ PHP_FUNCTION(pdf_set_text_rise) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -866,7 +866,7 @@ PHP_FUNCTION(pdf_set_text_matrix) {
float *pdfmatrixptr;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -916,7 +916,7 @@ PHP_FUNCTION(pdf_set_text_pos) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -944,7 +944,7 @@ PHP_FUNCTION(pdf_set_char_spacing) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -971,7 +971,7 @@ PHP_FUNCTION(pdf_set_word_spacing) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -998,7 +998,7 @@ PHP_FUNCTION(pdf_continue_text) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1026,7 +1026,7 @@ PHP_FUNCTION(pdf_stringwidth) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1053,7 +1053,7 @@ PHP_FUNCTION(pdf_save) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1079,7 +1079,7 @@ PHP_FUNCTION(pdf_restore) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1105,7 +1105,7 @@ PHP_FUNCTION(pdf_translate) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1133,7 +1133,7 @@ PHP_FUNCTION(pdf_scale) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1161,7 +1161,7 @@ PHP_FUNCTION(pdf_rotate) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1188,7 +1188,7 @@ PHP_FUNCTION(pdf_skew) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1216,7 +1216,7 @@ PHP_FUNCTION(pdf_setflat) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1248,7 +1248,7 @@ PHP_FUNCTION(pdf_setlinejoin) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1280,7 +1280,7 @@ PHP_FUNCTION(pdf_setlinecap) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1312,7 +1312,7 @@ PHP_FUNCTION(pdf_setmiterlimit) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1344,7 +1344,7 @@ PHP_FUNCTION(pdf_setlinewidth) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1371,7 +1371,7 @@ PHP_FUNCTION(pdf_setdash) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1399,7 +1399,7 @@ PHP_FUNCTION(pdf_moveto) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1427,7 +1427,7 @@ PHP_FUNCTION(pdf_curveto) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 7 || getParameters(ht, 7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) {
if (ZEND_NUM_ARGS() != 7 || getParameters(ht, 7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1464,7 +1464,7 @@ PHP_FUNCTION(pdf_lineto) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1492,7 +1492,7 @@ PHP_FUNCTION(pdf_circle) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1521,7 +1521,7 @@ PHP_FUNCTION(pdf_arc) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
if (ZEND_NUM_ARGS() != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1552,7 +1552,7 @@ PHP_FUNCTION(pdf_rect) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 5 || getParameters(ht, 5, &arg1, &arg2, &arg3, &arg4, &arg5) == FAILURE) {
if (ZEND_NUM_ARGS() != 5 || getParameters(ht, 5, &arg1, &arg2, &arg3, &arg4, &arg5) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1585,7 +1585,7 @@ PHP_FUNCTION(pdf_closepath) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1611,7 +1611,7 @@ PHP_FUNCTION(pdf_closepath_stroke) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1637,7 +1637,7 @@ PHP_FUNCTION(pdf_stroke) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1663,7 +1663,7 @@ PHP_FUNCTION(pdf_fill) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1689,7 +1689,7 @@ PHP_FUNCTION(pdf_fill_stroke) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1715,7 +1715,7 @@ PHP_FUNCTION(pdf_closepath_fill_stroke) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1741,7 +1741,7 @@ PHP_FUNCTION(pdf_endpath) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1767,7 +1767,7 @@ PHP_FUNCTION(pdf_clip) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1793,7 +1793,7 @@ PHP_FUNCTION(pdf_set_parameter) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1821,7 +1821,7 @@ PHP_FUNCTION(pdf_setgray_fill) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1848,7 +1848,7 @@ PHP_FUNCTION(pdf_setgray_stroke) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1875,7 +1875,7 @@ PHP_FUNCTION(pdf_setgray) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1902,7 +1902,7 @@ PHP_FUNCTION(pdf_setrgbcolor_fill) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1931,7 +1931,7 @@ PHP_FUNCTION(pdf_setrgbcolor_stroke) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1960,7 +1960,7 @@ PHP_FUNCTION(pdf_setrgbcolor) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1990,7 +1990,7 @@ PHP_FUNCTION(pdf_add_outline) {
PDF *pdf;
PDF_TLS_VARS;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
@ -2019,7 +2019,7 @@ PHP_FUNCTION(pdf_add_outline) {
RETURN_FALSE;
}
if (ARG_COUNT(ht) > 2) {
if (ZEND_NUM_ARGS() > 2) {
convert_to_long(arg3);
id = arg3->value.lval;
@ -2035,7 +2035,7 @@ PHP_FUNCTION(pdf_add_outline) {
parentid = 0;
}
if (ARG_COUNT(ht) > 3) {
if (ZEND_NUM_ARGS() > 3) {
convert_to_long(arg4);
open = arg4->value.lval;
} else {
@ -2061,7 +2061,7 @@ PHP_FUNCTION(pdf_set_transition) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2116,7 +2116,7 @@ PHP_FUNCTION(pdf_set_duration) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2144,7 +2144,7 @@ PHP_FUNCTION(pdf_open_gif) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2178,7 +2178,7 @@ PHP_FUNCTION(pdf_open_jpeg) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2212,7 +2212,7 @@ PHP_FUNCTION(pdf_open_png) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2246,7 +2246,7 @@ PHP_FUNCTION(pdf_open_tiff) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2280,7 +2280,7 @@ PHP_FUNCTION(pdf_open_image_file) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2319,7 +2319,7 @@ PHP_FUNCTION(pdf_open_memory_image) {
PDF *pdf;
PDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
@ -2377,7 +2377,7 @@ PHP_FUNCTION(pdf_close_image) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2412,7 +2412,7 @@ PHP_FUNCTION(pdf_place_image) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 5 || getParameters(ht, 5, &arg1, &arg2, &arg3, &arg4, &arg5) == FAILURE) {
if (ZEND_NUM_ARGS() != 5 || getParameters(ht, 5, &arg1, &arg2, &arg3, &arg4, &arg5) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2452,7 +2452,7 @@ PHP_FUNCTION(pdf_get_image_width) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2488,7 +2488,7 @@ PHP_FUNCTION(pdf_get_image_height) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2522,7 +2522,7 @@ PHP_FUNCTION(pdf_add_weblink) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
if (ZEND_NUM_ARGS() != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2553,7 +2553,7 @@ PHP_FUNCTION(pdf_add_pdflink) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 8 || getParameters(ht, 8, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7, &arg8) == FAILURE) {
if (ZEND_NUM_ARGS() != 8 || getParameters(ht, 8, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7, &arg8) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2586,7 +2586,7 @@ PHP_FUNCTION(pdf_set_border_style) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2614,7 +2614,7 @@ PHP_FUNCTION(pdf_set_border_color) {
PDF *pdf;
PDF_TLS_VARS;
if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2643,7 +2643,7 @@ PHP_FUNCTION(pdf_add_annotation) {
PDF *pdf;
PDF_TLS_VARS;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc != 7)
WRONG_PARAM_COUNT;
if (getParametersArray(ht, argc, argv) == FAILURE)

View File

@ -149,7 +149,7 @@ PHP_FUNCTION(posix_kill)
pval *sig;
int result;
if (ARG_COUNT(ht) != 2 || zend_get_parameters(ht, 2, &pid, &sig)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters(ht, 2, &pid, &sig)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -242,7 +242,7 @@ PHP_FUNCTION(posix_setuid)
pval *uid;
int result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &uid)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &uid)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -267,7 +267,7 @@ PHP_FUNCTION(posix_setgid)
pval *gid;
int result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &gid)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &gid)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -360,7 +360,7 @@ PHP_FUNCTION(posix_setpgid)
pval *pgid;
int result;
if (ARG_COUNT(ht) != 2 || zend_get_parameters(ht, 2, &pid, &pgid)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters(ht, 2, &pid, &pgid)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -388,7 +388,7 @@ PHP_FUNCTION(posix_getpgid)
pid_t pgid;
pval *pid;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &pid)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &pid)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -417,7 +417,7 @@ PHP_FUNCTION(posix_getsid)
pid_t sid;
pval *pid;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &pid)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &pid)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -518,7 +518,7 @@ PHP_FUNCTION(posix_ttyname)
pval *fd;
char *p;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &fd)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &fd)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(fd);
@ -542,7 +542,7 @@ PHP_FUNCTION(posix_isatty)
pval *fd;
int result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &fd)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &fd)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(fd);
@ -597,7 +597,7 @@ PHP_FUNCTION(posix_mkfifo)
pval *mode;
int result;
if (ARG_COUNT(ht) != 2 || zend_get_parameters(ht, 2, &path, &mode) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters(ht, 2, &path, &mode) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(path);
@ -644,7 +644,7 @@ PHP_FUNCTION(posix_getgrnam)
char **p;
int count;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &name)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &name)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(name);
@ -680,7 +680,7 @@ PHP_FUNCTION(posix_getgrgid)
char **p;
int count;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &gid)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &gid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(gid);
@ -712,7 +712,7 @@ PHP_FUNCTION(posix_getpwnam)
pval *name;
struct passwd *pw;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &name)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &name)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(name);
@ -744,7 +744,7 @@ PHP_FUNCTION(posix_getpwuid)
pval *uid;
struct passwd *pw;
if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &uid)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &uid)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(uid);

View File

@ -94,7 +94,7 @@ PHP_FUNCTION(readline)
{
char *result;
pval **arg;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
@ -123,7 +123,7 @@ PHP_FUNCTION(readline_info)
zval **value;
int oldval;
char *oldstr;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 0 || ac > 2 || zend_get_parameters_ex(ac, &what, &value) == FAILURE) {
WRONG_PARAM_COUNT;
@ -208,7 +208,7 @@ PHP_FUNCTION(readline_info)
PHP_FUNCTION(readline_add_history)
{
pval **arg;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 1 || ac > 1 || zend_get_parameters_ex(ac, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
@ -225,7 +225,7 @@ PHP_FUNCTION(readline_add_history)
Clears the history */
PHP_FUNCTION(readline_clear_history)
{
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 0 || ac > 0) {
WRONG_PARAM_COUNT;
@ -242,7 +242,7 @@ PHP_FUNCTION(readline_clear_history)
PHP_FUNCTION(readline_list_history)
{
HIST_ENTRY **history;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac) {
WRONG_PARAM_COUNT;
@ -267,7 +267,7 @@ PHP_FUNCTION(readline_read_history)
{
pval **arg;
char *filename = NULL;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
@ -294,7 +294,7 @@ PHP_FUNCTION(readline_write_history)
{
pval **arg;
char *filename = NULL;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
@ -393,7 +393,7 @@ static char **_readline_completion_cb(char *text, int start, int end)
PHP_FUNCTION(readline_completion_function)
{
pval **arg;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &arg) == FAILURE) {
WRONG_PARAM_COUNT;

View File

@ -113,7 +113,7 @@ PHP_FUNCTION(recode_string)
bool success;
ReSLS_FETCH();
if (ARG_COUNT(ht) != 2
if (ZEND_NUM_ARGS() != 2
|| zend_get_parameters_ex(2, &req, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -165,7 +165,7 @@ PHP_FUNCTION(recode_file)
int in_type, out_type;
ReSLS_FETCH();
if (ARG_COUNT(ht) != 3
if (ZEND_NUM_ARGS() != 3
|| zend_get_parameters_ex(3, &req, &input, &output) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -248,7 +248,7 @@ PHP_FUNCTION(COM_load)
char *error_message;
char *clsid_str;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
getParameters(ht, 1, &module_name);
break;
@ -546,7 +546,7 @@ PHP_FUNCTION(COM_invoke)
pval *object, *function_name;
IDispatch *i_dispatch;
int type;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
VARIANTARG var_result;
if (arg_count<2) {
@ -723,7 +723,7 @@ PHP_FUNCTION(com_propget)
IDispatch *i_dispatch;
VARIANTARG var_result;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &arg_idispatch, &arg_property)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &arg_idispatch, &arg_property)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -752,7 +752,7 @@ PHP_FUNCTION(com_propput)
int type;
IDispatch *i_dispatch;
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &arg_idispatch, &arg_property, &arg_value)==FAILURE) {
if (ZEND_NUM_ARGS()!=3 || getParameters(ht, 3, &arg_idispatch, &arg_property, &arg_value)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -931,7 +931,7 @@ void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_r
} else {
VARIANTARG object_handle = _php_COM_get_property_handler(property_reference);
pval **arguments;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
VARIANTARG var_result;
if (object_handle.vt != VT_DISPATCH) {

View File

@ -328,7 +328,7 @@ void java_call_function_handler
zend_overloaded_element *function_name = (zend_overloaded_element *)
property_reference->elements_list->tail->data;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
jlong result = 0;
pval **arguments = (pval **) emalloc(sizeof(pval *)*arg_count);

View File

@ -907,7 +907,7 @@ PHP_FUNCTION(session_get_cookie_params)
{
PSLS_FETCH();
if (ARG_COUNT(ht) != 0) {
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
@ -927,7 +927,7 @@ PHP_FUNCTION(session_get_cookie_params)
PHP_FUNCTION(session_name)
{
pval **p_name;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
char *old;
PSLS_FETCH();
@ -951,7 +951,7 @@ PHP_FUNCTION(session_name)
PHP_FUNCTION(session_module_name)
{
pval **p_name;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
char *old;
PSLS_FETCH();
@ -990,7 +990,7 @@ PHP_FUNCTION(session_set_save_handler)
ps_user *mdata;
PSLS_FETCH();
if (ARG_COUNT(ht) != 6 || zend_get_parameters_array_ex(6, args) == FAILURE)
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) == FAILURE)
WRONG_PARAM_COUNT;
if (PS(nr_open_sessions) > 0)
@ -1016,7 +1016,7 @@ PHP_FUNCTION(session_set_save_handler)
PHP_FUNCTION(session_save_path)
{
pval **p_name;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
char *old;
PSLS_FETCH();
@ -1040,7 +1040,7 @@ PHP_FUNCTION(session_save_path)
PHP_FUNCTION(session_id)
{
pval **p_name;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
char *old = empty_string;
PSLS_FETCH();
@ -1088,7 +1088,7 @@ static void php_register_var(zval** entry PSLS_DC PLS_DC)
PHP_FUNCTION(session_register)
{
zval ***args;
int argc = ARG_COUNT(ht);
int argc = ZEND_NUM_ARGS();
int i;
PSLS_FETCH();
PLS_FETCH();
@ -1123,7 +1123,7 @@ PHP_FUNCTION(session_register)
PHP_FUNCTION(session_unregister)
{
pval **p_name;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
PSLS_FETCH();
if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
@ -1144,7 +1144,7 @@ PHP_FUNCTION(session_is_registered)
{
pval **p_name;
pval *p_var;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
PSLS_FETCH();
if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
@ -1181,7 +1181,7 @@ PHP_FUNCTION(session_decode)
pval **str;
PSLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE)
WRONG_PARAM_COUNT;
convert_to_string_ex(str);

View File

@ -139,7 +139,7 @@ void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
int keepwalking=1;
long timeout=SNMP_DEFAULT_TIMEOUT;
long retries=SNMP_DEFAULT_RETRIES;
int myargc = ARG_COUNT(ht);
int myargc = ZEND_NUM_ARGS();
char type = (char) 0;
char *value = (char *) 0;
@ -362,7 +362,7 @@ PHP_FUNCTION(snmp_get_quick_print) {
Return all objects including their respective object id withing the specified one */
PHP_FUNCTION(snmp_set_quick_print) {
zval **a1;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &a1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &a1) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(a1);

View File

@ -178,8 +178,8 @@ PHP_FUNCTION(krsort)
int sort_type_val = SORT_REGULAR;
HashTable *target_hash;
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &array, &sort_type) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &array, &sort_type) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -187,7 +187,7 @@ PHP_FUNCTION(krsort)
php_error(E_WARNING, "Wrong datatype in krsort() call");
return;
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_long_ex(sort_type);
sort_type_val = Z_LVAL_PP(sort_type);
}
@ -207,8 +207,8 @@ PHP_FUNCTION(ksort)
int sort_type_val = SORT_REGULAR;
HashTable *target_hash;
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &array, &sort_type) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &array, &sort_type) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -216,7 +216,7 @@ PHP_FUNCTION(ksort)
php_error(E_WARNING, "Wrong datatype in ksort() call");
return;
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_long_ex(sort_type);
sort_type_val = Z_LVAL_PP(sort_type);
}
@ -234,7 +234,7 @@ PHP_FUNCTION(count)
pval **array;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -348,7 +348,7 @@ static void php_natsort(INTERNAL_FUNCTION_PARAMETERS, int fold_case)
zval **array;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -399,8 +399,8 @@ PHP_FUNCTION(asort)
int sort_type_val = SORT_REGULAR;
HashTable *target_hash;
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &array, &sort_type) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &array, &sort_type) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -408,7 +408,7 @@ PHP_FUNCTION(asort)
php_error(E_WARNING, "Wrong datatype in asort() call");
return;
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_long_ex(sort_type);
sort_type_val = Z_LVAL_PP(sort_type);
}
@ -428,8 +428,8 @@ PHP_FUNCTION(arsort)
int sort_type_val = SORT_REGULAR;
HashTable *target_hash;
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &array, &sort_type) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &array, &sort_type) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -437,7 +437,7 @@ PHP_FUNCTION(arsort)
php_error(E_WARNING, "Wrong datatype in arsort() call");
RETURN_FALSE;
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_long_ex(sort_type);
sort_type_val = Z_LVAL_PP(sort_type);
}
@ -457,8 +457,8 @@ PHP_FUNCTION(sort)
int sort_type_val = SORT_REGULAR;
HashTable *target_hash;
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &array, &sort_type) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &array, &sort_type) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -466,7 +466,7 @@ PHP_FUNCTION(sort)
php_error(E_WARNING, "Wrong datatype in sort() call");
RETURN_FALSE;
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_long_ex(sort_type);
sort_type_val = Z_LVAL_PP(sort_type);
}
@ -486,8 +486,8 @@ PHP_FUNCTION(rsort)
int sort_type_val = SORT_REGULAR;
HashTable *target_hash;
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &array, &sort_type) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &array, &sort_type) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -495,7 +495,7 @@ PHP_FUNCTION(rsort)
php_error(E_WARNING, "Wrong datatype in rsort() call");
RETURN_FALSE;
}
if (ARG_COUNT(ht) == 2) {
if (ZEND_NUM_ARGS() == 2) {
convert_to_long_ex(sort_type);
sort_type_val = Z_LVAL_PP(sort_type);
}
@ -545,7 +545,7 @@ PHP_FUNCTION(usort)
BLS_FETCH();
old_compare_func = BG(user_compare_func_name);
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
BG(user_compare_func_name) = old_compare_func;
WRONG_PARAM_COUNT;
}
@ -574,7 +574,7 @@ PHP_FUNCTION(uasort)
BLS_FETCH();
old_compare_func = BG(user_compare_func_name);
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
BG(user_compare_func_name) = old_compare_func;
WRONG_PARAM_COUNT;
}
@ -652,7 +652,7 @@ PHP_FUNCTION(uksort)
BLS_FETCH();
old_compare_func = BG(user_compare_func_name);
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &array, &BG(user_compare_func_name)) == FAILURE) {
BG(user_compare_func_name) = old_compare_func;
WRONG_PARAM_COUNT;
}
@ -678,7 +678,7 @@ PHP_FUNCTION(end)
pval **array, **entry;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -706,7 +706,7 @@ PHP_FUNCTION(prev)
pval **array, **entry;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -734,7 +734,7 @@ PHP_FUNCTION(next)
pval **array, **entry;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -762,7 +762,7 @@ PHP_FUNCTION(reset)
pval **array, **entry;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -790,7 +790,7 @@ PHP_FUNCTION(current)
pval **array, **entry;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -815,7 +815,7 @@ PHP_FUNCTION(key)
ulong num_key;
HashTable *target_hash;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
@ -843,7 +843,7 @@ PHP_FUNCTION(key)
Return the lowest value in an array or a series of arguments */
PHP_FUNCTION(min)
{
int argc=ARG_COUNT(ht);
int argc=ZEND_NUM_ARGS();
pval **result;
if (argc<=0) {
@ -865,18 +865,18 @@ PHP_FUNCTION(min)
RETURN_FALSE;
}
} else {
pval ***args = (pval ***) emalloc(sizeof(pval **)*ARG_COUNT(ht));
pval ***args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
pval **min, result;
int i;
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args)==FAILURE) {
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args)==FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
}
min = args[0];
for (i=1; i<ARG_COUNT(ht); i++) {
for (i=1; i<ZEND_NUM_ARGS(); i++) {
is_smaller_function(&result, *args[i], *min);
if (result.value.lval == 1) {
min = args[i];
@ -895,7 +895,7 @@ PHP_FUNCTION(min)
Return the highest value in an array or a series of arguments */
PHP_FUNCTION(max)
{
int argc=ARG_COUNT(ht);
int argc=ZEND_NUM_ARGS();
pval **result;
if (argc<=0) {
@ -917,18 +917,18 @@ PHP_FUNCTION(max)
RETURN_FALSE;
}
} else {
pval ***args = (pval ***) emalloc(sizeof(pval **)*ARG_COUNT(ht));
pval ***args = (pval ***) emalloc(sizeof(pval **)*ZEND_NUM_ARGS());
pval **max, result;
int i;
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args)==FAILURE) {
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args)==FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
}
max = args[0];
for (i=1; i<ARG_COUNT(ht); i++) {
for (i=1; i<ZEND_NUM_ARGS(); i++) {
is_smaller_or_equal_function(&result, *args[i], *max);
if (result.value.lval == 0) {
max = args[i];
@ -1004,7 +1004,7 @@ PHP_FUNCTION(array_walk) {
HashTable *target_hash;
BLS_FETCH();
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
old_walk_func_name = BG(array_walk_func_name);
if (argc < 2 || argc > 3 ||
zend_get_parameters_ex(argc, &array, &BG(array_walk_func_name), &userdata) == FAILURE) {
@ -1036,8 +1036,8 @@ PHP_FUNCTION(in_array)
HashTable *target_hash; /* array hashtable */
int (*compare_func)(zval *, zval *, zval *) = is_equal_function;
if (ARG_COUNT(ht) < 2 || ARG_COUNT(ht) > 3 ||
zend_get_parameters_ex(ARG_COUNT(ht), &value, &array, &strict) == FAILURE) {
if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 3 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &value, &array, &strict) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1051,7 +1051,7 @@ PHP_FUNCTION(in_array)
RETURN_FALSE;
}
if (ARG_COUNT(ht) == 3) {
if (ZEND_NUM_ARGS() == 3) {
convert_to_boolean_ex(strict);
if (Z_LVAL_PP(strict) == 1)
compare_func = is_identical_function;
@ -1109,7 +1109,7 @@ PHP_FUNCTION(extract)
ulong lkey;
int res, extype;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &var_array) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1244,16 +1244,16 @@ PHP_FUNCTION(compact)
zval ***args; /* function arguments array */
int i;
args = (zval ***)emalloc(ARG_COUNT(ht) * sizeof(zval **));
args = (zval ***)emalloc(ZEND_NUM_ARGS() * sizeof(zval **));
if (zend_get_parameters_array_ex(ARG_COUNT(ht), args) == FAILURE) {
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
}
array_init(return_value);
for (i=0; i<ARG_COUNT(ht); i++)
for (i=0; i<ZEND_NUM_ARGS(); i++)
{
_compact_var(EG(active_symbol_table), return_value, *args[i]);
}
@ -1269,7 +1269,7 @@ PHP_FUNCTION(range)
zval **zlow, **zhigh;
int low, high;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2,&zlow,&zhigh) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2,&zlow,&zhigh) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(zlow);
@ -1311,7 +1311,7 @@ PHP_FUNCTION(shuffle)
{
zval **array;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
if ((*array)->type != IS_ARRAY) {
@ -1427,7 +1427,7 @@ PHP_FUNCTION(array_push)
argc; /* Number of function arguments */
/* Get the argument count and check it */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2) {
WRONG_PARAM_COUNT;
}
@ -1470,7 +1470,7 @@ static void _phpi_pop(INTERNAL_FUNCTION_PARAMETERS, int off_the_end)
HashTable *new_hash; /* New stack */
/* Get the arguments and do error-checking */
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &stack) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &stack) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1531,7 +1531,7 @@ PHP_FUNCTION(array_unshift)
/* Get the argument count and check it */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2) {
WRONG_PARAM_COUNT;
}
@ -1580,7 +1580,7 @@ PHP_FUNCTION(array_splice)
repl_num = 0; /* Number of replacement elements */
/* Get the argument count and check it */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2 || argc > 4) {
WRONG_PARAM_COUNT;
}
@ -1662,7 +1662,7 @@ PHP_FUNCTION(array_slice)
/* Get the arguments and do error-checking */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2 || argc > 3 || zend_get_parameters_ex(argc, &input, &offset, &length)) {
WRONG_PARAM_COUNT;
}
@ -1782,7 +1782,7 @@ static void php_array_merge(INTERNAL_FUNCTION_PARAMETERS, int recursive)
i;
/* Get the argument count and check it */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2) {
WRONG_PARAM_COUNT;
}
@ -1839,8 +1839,8 @@ PHP_FUNCTION(array_keys)
search_value = NULL;
/* Get arguments and do error-checking */
if (ARG_COUNT(ht) < 1 || ARG_COUNT(ht) > 2 ||
zend_get_parameters_ex(ARG_COUNT(ht), &input, &search_value) == FAILURE) {
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &input, &search_value) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1896,7 +1896,7 @@ PHP_FUNCTION(array_values)
**entry; /* An entry in the input array */
/* Get arguments and do error-checking */
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(ARG_COUNT(ht), &input) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), &input) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1932,7 +1932,7 @@ PHP_FUNCTION(array_count_values)
HashTable *myht;
/* Get arguments and do error-checking */
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &input) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &input) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1993,7 +1993,7 @@ PHP_FUNCTION(array_reverse)
ulong num_key;
/* Get arguments and do error-checking */
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &input) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &input) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2044,7 +2044,7 @@ PHP_FUNCTION(array_pad)
int i;
/* Get arguments and do error-checking */
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &input, &pad_size, &pad_value) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &input, &pad_size, &pad_value) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2101,7 +2101,7 @@ PHP_FUNCTION(array_flip)
char *string_key;
ulong num_key;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2187,7 +2187,7 @@ PHP_FUNCTION(array_multisort)
ARRAYLS_FETCH();
/* Get the argument count and check it */
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1) {
WRONG_PARAM_COUNT;
}

View File

@ -145,7 +145,7 @@ PHP_FUNCTION(assert)
RETURN_TRUE;
}
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &assertion) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &assertion) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -250,7 +250,7 @@ PHP_FUNCTION(assert_options)
pval **what,**value;
int oldint;
char *oldstr;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
ASSERTLS_FETCH();
if (ac < 1 || ac > 2 || zend_get_parameters_ex(ac, &what, &value) == FAILURE) {

View File

@ -156,7 +156,7 @@ PHP_FUNCTION(base64_encode) {
unsigned char *result;
int ret_length;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&str) == FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -179,7 +179,7 @@ PHP_FUNCTION(base64_decode) {
unsigned char *result;
int ret_length;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&str) == FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);

View File

@ -757,7 +757,7 @@ PHP_FUNCTION(ip2long)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -774,7 +774,7 @@ PHP_FUNCTION(long2ip)
zval **num;
struct in_addr myaddr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -798,7 +798,7 @@ PHP_FUNCTION(getenv)
char *ptr;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -828,7 +828,7 @@ PHP_FUNCTION(putenv)
pval **str;
BLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -913,7 +913,7 @@ PHP_FUNCTION(intval)
pval **num, **arg_base;
int base;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
@ -942,7 +942,7 @@ PHP_FUNCTION(doubleval)
{
pval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
*return_value=**num;
@ -957,7 +957,7 @@ PHP_FUNCTION(strval)
{
pval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
*return_value=**num;
@ -980,7 +980,7 @@ PHP_FUNCTION(sleep)
{
pval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(num);
@ -995,7 +995,7 @@ PHP_FUNCTION(usleep)
#if HAVE_USLEEP
pval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(num);
@ -1010,7 +1010,7 @@ PHP_FUNCTION(gettype)
{
pval **arg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
switch ((*arg)->type) {
@ -1063,7 +1063,7 @@ PHP_FUNCTION(settype)
pval **var, **type;
char *new_type;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &var, &type) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &var, &type) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(type);
@ -1107,7 +1107,7 @@ PHP_FUNCTION(get_cfg_var)
pval **varname;
char *value;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &varname)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &varname)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1128,7 +1128,7 @@ PHP_FUNCTION(set_magic_quotes_runtime)
pval **new_setting;
PLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &new_setting)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &new_setting)==FAILURE) {
RETURN_FALSE;
}
convert_to_boolean_ex(new_setting);
@ -1163,7 +1163,7 @@ void php_is_type(INTERNAL_FUNCTION_PARAMETERS,int type)
{
pval **arg;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
RETURN_FALSE;
}
if ((*arg)->type == type) {
@ -1236,7 +1236,7 @@ PHP_FUNCTION(is_numeric)
zval **arg;
int result;
if (ARG_COUNT(ht) !=1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() !=1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1283,7 +1283,7 @@ PHP_FUNCTION(error_log)
int opt_err = 0;
char *message, *opt=NULL, *headers=NULL;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1,&string) == FAILURE) {
php_error(E_WARNING,"Invalid argument 1 in error_log");
@ -1384,7 +1384,7 @@ PHP_FUNCTION(call_user_func)
{
pval ***params;
pval *retval_ptr;
int arg_count=ARG_COUNT(ht);
int arg_count=ZEND_NUM_ARGS();
CLS_FETCH();
if (arg_count<1) {
@ -1413,7 +1413,7 @@ PHP_FUNCTION(call_user_method)
{
pval ***params;
pval *retval_ptr;
int arg_count=ARG_COUNT(ht);
int arg_count=ZEND_NUM_ARGS();
CLS_FETCH();
if (arg_count<2) {
@ -1499,7 +1499,7 @@ PHP_FUNCTION(register_shutdown_function)
int i;
BLS_FETCH();
shutdown_function_entry.arg_count = ARG_COUNT(ht);
shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
if (shutdown_function_entry.arg_count<1) {
WRONG_PARAM_COUNT;
@ -1540,7 +1540,7 @@ PHP_FUNCTION(highlight_file)
zend_syntax_highlighter_ini syntax_highlighter_ini;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &filename)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &filename)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);
@ -1562,7 +1562,7 @@ PHP_FUNCTION(highlight_string)
pval **expr;
zend_syntax_highlighter_ini syntax_highlighter_ini;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &expr)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &expr)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1682,7 +1682,7 @@ void test_class_call_function(INTERNAL_FUNCTION_PARAMETERS, zend_property_refere
pval_destructor(&overloaded_property->element);
}
printf("%d arguments\n", ARG_COUNT(ht));
printf("%d arguments\n", ZEND_NUM_ARGS());
return_value->value.str.val = estrndup("testing", 7);
return_value->value.str.len = 7;
return_value->type = IS_STRING;
@ -1707,7 +1707,7 @@ PHP_FUNCTION(ini_get)
{
pval **varname;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &varname)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &varname)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1732,7 +1732,7 @@ PHP_FUNCTION(ini_set)
pval **varname, **new_value;
char *old_value;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &varname, &new_value)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &varname, &new_value)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1758,7 +1758,7 @@ PHP_FUNCTION(ini_restore)
{
pval **varname;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &varname)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &varname)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1774,7 +1774,7 @@ PHP_FUNCTION(print_r)
{
pval **expr;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &expr)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &expr)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1826,7 +1826,7 @@ PHP_FUNCTION(ignore_user_abort)
PLS_FETCH();
old_setting = PG(ignore_user_abort);
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
break;
case 1:
@ -1851,7 +1851,7 @@ PHP_FUNCTION(getservbyname)
pval **name,**proto;
struct servent *serv;
if(ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2,&name,&proto) == FAILURE) {
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2,&name,&proto) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
@ -1874,7 +1874,7 @@ PHP_FUNCTION(getservbyport)
pval **port,**proto;
struct servent *serv;
if(ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2,&port,&proto) == FAILURE) {
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2,&port,&proto) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(port);
@ -1897,7 +1897,7 @@ PHP_FUNCTION(getprotobyname)
pval **name;
struct protoent *ent;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &name) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &name) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1923,7 +1923,7 @@ PHP_FUNCTION(getprotobynumber)
pval **proto;
struct protoent *ent;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &proto) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &proto) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1950,7 +1950,7 @@ static int php_add_extension_info(zend_module_entry *module, void *arg)
Return an array containing names of loaded extensions */
PHP_FUNCTION(get_loaded_extensions)
{
if (ARG_COUNT(ht) != 0) {
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
@ -1966,7 +1966,7 @@ PHP_FUNCTION(extension_loaded)
{
zval **extension_name;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &extension_name)) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) {
WRONG_PARAM_COUNT;
}
@ -1988,7 +1988,7 @@ PHP_FUNCTION(get_extension_funcs)
zend_module_entry *module;
zend_function_entry *func;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &extension_name)) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) {
WRONG_PARAM_COUNT;
}

View File

@ -61,7 +61,7 @@ PHP_FUNCTION(get_browser)
RETURN_FALSE;
}
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
if (zend_hash_find(&EG(symbol_table), "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name)==FAILURE) {
*agent_name = &tmp;

View File

@ -128,7 +128,7 @@ PHP_FUNCTION(crypt)
available (passing always 2-character salt). At least for glibc6.1 */
memset(&salt[1], '$', PHP_MAX_SALT_LEN-1);
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &arg1)==FAILURE) {
RETURN_FALSE;

View File

@ -274,7 +274,7 @@ PHP_FUNCTION(convert_cyr_string)
pval **str_arg, **fr_cs, **to_cs;
unsigned char *str;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3,&str_arg,&fr_cs, &to_cs)==FAILURE)
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,&str_arg,&fr_cs, &to_cs)==FAILURE)
{
WRONG_PARAM_COUNT;
}

View File

@ -79,7 +79,7 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
pval **arguments[7];
struct tm *ta, tmbuf;
time_t t;
int i, gmadjust, seconds, arg_count = ARG_COUNT(ht);
int i, gmadjust, seconds, arg_count = ZEND_NUM_ARGS();
if (arg_count > 7 || zend_get_parameters_array_ex(arg_count,arguments) == FAILURE) {
WRONG_PARAM_COUNT;
@ -201,7 +201,7 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
int i, size = 0, length, h, beat;
char tmp_buff[16];
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &format) == FAILURE) {
WRONG_PARAM_COUNT;
@ -467,7 +467,7 @@ PHP_FUNCTION(localtime)
struct tm *ta, tmbuf;
time_t timestamp;
int assoc_array = 0;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
if (arg_count < 0 || arg_count > 2 ||
zend_get_parameters_ex(arg_count, &timestamp_arg, &assoc_array_arg) == FAILURE) {
@ -527,9 +527,9 @@ PHP_FUNCTION(getdate)
struct tm *ta, tmbuf;
time_t timestamp;
if (ARG_COUNT(ht) == 0) {
if (ZEND_NUM_ARGS() == 0) {
timestamp = time(NULL);
} else if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1,&timestamp_arg) == FAILURE) {
} else if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,&timestamp_arg) == FAILURE) {
WRONG_PARAM_COUNT;
} else {
convert_to_long_ex(timestamp_arg);
@ -596,7 +596,7 @@ PHP_FUNCTION(checkdate)
pval **month, **day, **year;
int m, d, y;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &month, &day, &year) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -633,7 +633,7 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm)
int max_reallocs = 5;
size_t buf_len=64, real_len;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1,&format_arg)==FAILURE) {
RETURN_FALSE;
@ -703,7 +703,7 @@ PHP_FUNCTION(strtotime)
int ac;
struct timeval tv;
ac = ARG_COUNT(ht);
ac = ZEND_NUM_ARGS();
if (ac < 1 || ac > 2 || zend_get_parameters_ex(ac, &timep,&nowp)==FAILURE) {
WRONG_PARAM_COUNT;

View File

@ -64,7 +64,7 @@ static int le_dirp;
static zend_class_entry *dir_class_entry_ptr;
#define FETCH_DIRP() \
if (ARG_COUNT(ht) == 0) { \
if (ZEND_NUM_ARGS() == 0) { \
myself = getThis(); \
if (myself) { \
if (zend_hash_find(myself->value.obj.properties, "handle", sizeof("handle"), (void **)&tmp) == FAILURE) { \
@ -75,7 +75,7 @@ static zend_class_entry *dir_class_entry_ptr;
} else { \
ZEND_FETCH_RESOURCE(dirp,php_dir *,0,DIR(default_dir), "Directory", le_dirp); \
} \
} else if ((ARG_COUNT(ht) != 1) || zend_get_parameters_ex(1, &id) == FAILURE) { \
} else if ((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &id) == FAILURE) { \
WRONG_PARAM_COUNT; \
} else { \
ZEND_FETCH_RESOURCE(dirp,php_dir *,id,-1, "Directory", le_dirp); \
@ -129,7 +129,7 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
php_dir *dirp;
DIRLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -204,7 +204,7 @@ PHP_FUNCTION(chdir)
pval **arg;
int ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -228,7 +228,7 @@ PHP_FUNCTION(getcwd)
char path[MAXPATHLEN];
char *ret=NULL;
if (ARG_COUNT(ht) != 0) {
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}

View File

@ -49,7 +49,7 @@ PHP_FUNCTION(dl)
PLS_FETCH();
/* obtain arguments */
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -57,7 +57,7 @@ PHP_FUNCTION(gethostbyaddr)
{
pval **arg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -97,7 +97,7 @@ PHP_FUNCTION(gethostbyname)
{
pval **arg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -117,7 +117,7 @@ PHP_FUNCTION(gethostbynamel)
struct in_addr in;
int i;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -172,7 +172,7 @@ PHP_FUNCTION(checkdnsrr)
#endif
u_char ans[MAXPACKET];
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
@ -235,7 +235,7 @@ PHP_FUNCTION(getmxrr)
u_char *cp,*end;
int i;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters(ht, 2, &host, &mx_list) == FAILURE) {
WRONG_PARAM_COUNT;

View File

@ -200,7 +200,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
PHP_FUNCTION(exec)
{
pval **arg1, **arg2, **arg3;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
int ret;
if (arg_count > 3 || zend_get_parameters_ex(arg_count, &arg1,&arg2, &arg3) == FAILURE) {
@ -237,7 +237,7 @@ PHP_FUNCTION(exec)
PHP_FUNCTION(system)
{
pval **arg1, **arg2;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
int ret;
if (arg_count > 2 || zend_get_parameters_ex(arg_count, &arg1,&arg2) == FAILURE) {
@ -264,7 +264,7 @@ PHP_FUNCTION(system)
PHP_FUNCTION(passthru)
{
pval **arg1, **arg2;
int arg_count = ARG_COUNT(ht);
int arg_count = ZEND_NUM_ARGS();
int ret;
if (arg_count > 2 || zend_get_parameters_ex(arg_count, &arg1,&arg2) == FAILURE) {
@ -353,7 +353,7 @@ PHP_FUNCTION(shell_exec)
pval **cmd;
PLS_FETCH();
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&cmd)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&cmd)==FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -157,7 +157,7 @@ PHP_FUNCTION(diskfreespace)
double bytesfree = 0;
#endif /* WINDOWS */
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&path)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&path)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -235,7 +235,7 @@ PHP_FUNCTION(chgrp)
int ret;
PLS_FETCH();
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2,&filename,&group)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2,&filename,&group)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);
@ -283,7 +283,7 @@ PHP_FUNCTION(chown)
struct passwd *pw = NULL;
PLS_FETCH();
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2,&filename,&user)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2,&filename,&user)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);
@ -327,7 +327,7 @@ PHP_FUNCTION(chmod)
int ret;
PLS_FETCH();
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2,&filename,&mode)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2,&filename,&mode)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);
@ -361,7 +361,7 @@ PHP_FUNCTION(touch)
struct stat sb;
FILE *file;
struct utimbuf *newtime = NULL;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
PLS_FETCH();
if (ac == 1 && zend_get_parameters_ex(1,&filename) != FAILURE) {
@ -608,7 +608,7 @@ static void php_stat(const char *filename, int type, pval *return_value)
#define FileFunction(name, funcnum) \
void name(INTERNAL_FUNCTION_PARAMETERS) { \
pval **filename; \
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&filename) == FAILURE) { \
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&filename) == FAILURE) { \
WRONG_PARAM_COUNT; \
} \
convert_to_string_ex(filename); \

View File

@ -371,7 +371,7 @@ php_formatted_print(int ht, int *len)
int alignment, width, precision, currarg, adjusting;
char *format, *result, padding;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1) {
WRONG_PARAM_COUNT_WITH_RETVAL(NULL);

View File

@ -211,7 +211,7 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
pval **args[5];
int *sock=emalloc(sizeof(int));
int *sockp;
int arg_count=ARG_COUNT(ht);
int arg_count=ZEND_NUM_ARGS();
int socketd = -1;
unsigned char udp = 0;
struct timeval timeout = { 60, 0 };

View File

@ -125,7 +125,7 @@ PHP_FUNCTION(setcookie)
pval **arg[6];
int arg_count;
arg_count = ARG_COUNT(ht);
arg_count = ZEND_NUM_ARGS();
if (arg_count < 1 || arg_count > 6 || zend_get_parameters_array_ex(arg_count, arg) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -92,7 +92,7 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
int len;
char *new;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -133,7 +133,7 @@ PHP_FUNCTION(get_html_translation_table)
{
zval **whichone;
int which = 0;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
int inx;
char ind[ 2 ];

View File

@ -339,7 +339,7 @@ PHP_FUNCTION(getimagesize)
char temp[64];
struct gfxinfo *result = NULL;
switch(ARG_COUNT(ht)){
switch(ZEND_NUM_ARGS()){
case 1:
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;

View File

@ -560,7 +560,7 @@ PHP_FUNCTION(phpinfo)
zval **flag_arg;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
flag = 0xFFFFFFFF;
break;
@ -598,7 +598,7 @@ PHP_FUNCTION(phpcredits)
zval **flag_arg;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
flag = 0xFFFFFFFF;
break;

View File

@ -171,7 +171,7 @@ PHP_FUNCTION(iptcembed)
unsigned char *spoolbuf=0,*poi=0;
struct stat sb;
switch(ARG_COUNT(ht)){
switch(ZEND_NUM_ARGS()){
case 3:
if (zend_get_parameters_ex(3, &iptcdata, &jpeg_file, &spool_flag) == FAILURE) {
WRONG_PARAM_COUNT;
@ -303,7 +303,7 @@ PHP_FUNCTION(iptcparse)
unsigned char key[ 16 ];
zval *values, **str, **element;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);

View File

@ -102,7 +102,7 @@ PHP_FUNCTION(levenshtein)
zval **str1, **str2;
int l;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &str1, &str2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &str1, &str2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str1);

View File

@ -57,7 +57,7 @@ PHP_FUNCTION(readlink)
char buff[256];
int ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);
@ -83,7 +83,7 @@ PHP_FUNCTION(linkinfo)
struct stat sb;
int ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);
@ -107,7 +107,7 @@ PHP_FUNCTION(symlink)
int ret;
PLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &topath, &frompath) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &topath, &frompath) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(topath);
@ -140,7 +140,7 @@ PHP_FUNCTION(link)
int ret;
PLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &topath, &frompath) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &topath, &frompath) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(topath);
@ -172,7 +172,7 @@ PHP_FUNCTION(unlink)
int ret;
PLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(filename);

View File

@ -46,7 +46,7 @@ PHP_FUNCTION(mail)
char *to=NULL, *message=NULL, *headers=NULL, *subject=NULL;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 3 || argc > 4 || zend_get_parameters_array_ex(argc, argv) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -40,7 +40,7 @@ PHP_FUNCTION(abs)
{
zval **value;
if (ARG_COUNT(ht)!=1||zend_get_parameters_ex(1,&value)==FAILURE) {
if (ZEND_NUM_ARGS()!=1||zend_get_parameters_ex(1,&value)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -63,7 +63,7 @@ PHP_FUNCTION(ceil)
{
zval **value;
if (ARG_COUNT(ht)!=1||zend_get_parameters_ex(1,&value)==FAILURE) {
if (ZEND_NUM_ARGS()!=1||zend_get_parameters_ex(1,&value)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -85,7 +85,7 @@ PHP_FUNCTION(ceil)
PHP_FUNCTION(floor) {
zval **value;
if (ARG_COUNT(ht)!=1||zend_get_parameters_ex(1,&value)==FAILURE) {
if (ZEND_NUM_ARGS()!=1||zend_get_parameters_ex(1,&value)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -162,7 +162,7 @@ PHP_FUNCTION(sin)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -178,7 +178,7 @@ PHP_FUNCTION(cos)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -192,7 +192,7 @@ PHP_FUNCTION(tan)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -208,7 +208,7 @@ PHP_FUNCTION(asin)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -224,7 +224,7 @@ PHP_FUNCTION(acos)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -240,7 +240,7 @@ PHP_FUNCTION(atan)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -256,7 +256,7 @@ PHP_FUNCTION(atan2)
{
zval **num1, **num2;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &num1, &num2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &num1, &num2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num1);
@ -283,7 +283,7 @@ PHP_FUNCTION(pow)
{
zval **num1, **num2;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2,&num1,&num2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2,&num1,&num2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num1);
@ -299,7 +299,7 @@ PHP_FUNCTION(exp)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -315,7 +315,7 @@ PHP_FUNCTION(log)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -331,7 +331,7 @@ PHP_FUNCTION(log10)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -347,7 +347,7 @@ PHP_FUNCTION(sqrt)
{
zval **num;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(num);
@ -363,7 +363,7 @@ PHP_FUNCTION(deg2rad)
{
zval **deg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &deg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &deg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(deg);
@ -378,7 +378,7 @@ PHP_FUNCTION(rad2deg)
{
zval **rad;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &rad) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &rad) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_double_ex(rad);
@ -471,7 +471,7 @@ PHP_FUNCTION(bindec)
zval **arg;
long ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -490,7 +490,7 @@ PHP_FUNCTION(hexdec)
zval **arg;
long ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -509,7 +509,7 @@ PHP_FUNCTION(octdec)
zval **arg;
long ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -528,7 +528,7 @@ PHP_FUNCTION(decbin)
zval **arg;
char *result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -549,7 +549,7 @@ PHP_FUNCTION(decoct)
zval **arg;
char *result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -570,7 +570,7 @@ PHP_FUNCTION(dechex)
zval **arg;
char *result;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -592,7 +592,7 @@ PHP_FUNCTION(base_convert)
zval **number, **frombase, **tobase, temp;
char *result;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &number, &frombase, &tobase) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &number, &frombase, &tobase) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(number);
@ -687,7 +687,7 @@ PHP_FUNCTION(number_format)
zval **num,**dec,**t_s,**d_p;
char thousand_sep=',', dec_point='.';
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &num)==FAILURE) {
RETURN_FALSE;

View File

@ -36,7 +36,7 @@ PHP_NAMED_FUNCTION(php_if_md5)
int i;
char *r;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);

View File

@ -95,7 +95,7 @@ PHP_FUNCTION(gettimeofday)
PHP_FUNCTION(getrusage)
{
struct rusage usg;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
pval **pwho;
int who = RUSAGE_SELF;

View File

@ -101,7 +101,7 @@ PHP_FUNCTION(pack)
int outputpos = 0, outputsize = 0;
char *output;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1) {
WRONG_PARAM_COUNT;
@ -480,7 +480,7 @@ PHP_FUNCTION(unpack)
int inputpos, inputlen;
int i;
if ((ARG_COUNT(ht) != 2) || zend_get_parameters_ex(2,&formatarg,&inputarg) == FAILURE) {
if ((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2,&formatarg,&inputarg) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -63,7 +63,7 @@ PHP_FUNCTION(quoted_printable_decode)
char *str;
int i = 0, j = 0;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1,&arg1)==FAILURE)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,&arg1)==FAILURE)
{
WRONG_PARAM_COUNT;
}

View File

@ -195,7 +195,7 @@ PHP_FUNCTION(srand)
{
pval **arg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg);
@ -218,7 +218,7 @@ PHP_FUNCTION(mt_srand)
pval **arg;
BLS_FETCH();
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg);
@ -232,7 +232,7 @@ PHP_FUNCTION(rand)
{
pval **p_min=NULL, **p_max=NULL;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
break;
case 2:
@ -300,7 +300,7 @@ PHP_FUNCTION(mt_rand)
{
pval **p_min=NULL, **p_max=NULL;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
break;
case 2:

View File

@ -175,7 +175,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
if (icase)
copts |= REG_ICASE;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &regex, &findin) == FAILURE) {
WRONG_PARAM_COUNT;
@ -429,7 +429,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
char *replace;
char *ret;
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg_pattern, &arg_replace, &arg_string) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg_pattern, &arg_replace, &arg_string) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -504,7 +504,7 @@ PHP_FUNCTION(split)
char *strp, *endp;
int err, size, count;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &spliton, &str) == FAILURE)
WRONG_PARAM_COUNT;
@ -600,7 +600,7 @@ PHPAPI PHP_FUNCTION(sql_regcase)
unsigned char c;
register int i, j;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &string)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &string)==FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -61,7 +61,7 @@ PHP_FUNCTION(soundex)
0, /* Y */
'2'}; /* Z */
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &parg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &parg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(parg);

View File

@ -67,7 +67,7 @@ PHP_FUNCTION(bin2hex)
char *result;
size_t newlen;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &data) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -89,7 +89,7 @@ PHP_FUNCTION(strspn)
{
zval **s1,**s2;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
@ -106,7 +106,7 @@ PHP_FUNCTION(strcspn)
{
zval **s1,**s2;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
@ -163,7 +163,7 @@ PHP_FUNCTION(chop)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -182,7 +182,7 @@ PHP_FUNCTION(trim)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -201,7 +201,7 @@ PHP_FUNCTION(ltrim)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -243,7 +243,7 @@ PHP_FUNCTION(explode)
zval **str, **delim, **zlimit = NULL;
int limit;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &delim, &str) == FAILURE)
WRONG_PARAM_COUNT;
@ -328,7 +328,7 @@ PHP_FUNCTION(implode)
{
zval **arg1, **arg2, *delim, *arr;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -361,7 +361,7 @@ PHP_FUNCTION(strtok)
int argc;
BLS_FETCH();
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if ((argc == 1 && zend_get_parameters_ex(1, &tok) == FAILURE) ||
(argc == 2 && zend_get_parameters_ex(2, &str, &tok) == FAILURE) ||
@ -429,7 +429,7 @@ PHP_FUNCTION(strtoupper)
{
zval **arg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg)) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -462,7 +462,7 @@ PHP_FUNCTION(strtolower)
zval **str;
char *ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str)) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -511,7 +511,7 @@ PHP_FUNCTION(basename)
zval **str;
char *ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str)) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -547,7 +547,7 @@ PHP_FUNCTION(dirname)
zval **str;
char *ret;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str)) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -608,7 +608,7 @@ PHP_FUNCTION(stristr)
char *haystack_orig;
char needle_char[2];
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &haystack, &needle) ==
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &haystack, &needle) ==
FAILURE) {
WRONG_PARAM_COUNT;
}
@ -657,7 +657,7 @@ PHP_FUNCTION(strstr)
char *found = NULL;
char needle_char[2];
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &haystack, &needle) ==
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &haystack, &needle) ==
FAILURE) {
WRONG_PARAM_COUNT;
}
@ -701,7 +701,7 @@ PHP_FUNCTION(strpos)
char *endp;
char *startp;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &haystack, &needle) == FAILURE) {
WRONG_PARAM_COUNT;
@ -765,7 +765,7 @@ PHP_FUNCTION(strrpos)
zval **haystack, **needle;
char *found = NULL;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &haystack, &needle) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &haystack, &needle) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(haystack);
@ -792,7 +792,7 @@ PHP_FUNCTION(strrchr)
zval **haystack, **needle;
char *found = NULL;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &haystack, &needle) ==
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &haystack, &needle) ==
FAILURE) {
WRONG_PARAM_COUNT;
}
@ -863,7 +863,7 @@ PHP_FUNCTION(chunk_split)
int chunklen = 76;
int result_len;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 3 ||
zend_get_parameters_ex(argc, &p_str, &p_chunklen, &p_ending) == FAILURE) {
@ -906,7 +906,7 @@ PHP_FUNCTION(substr)
int argc, l;
int f;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if ((argc == 2 && zend_get_parameters_ex(2, &str, &from) == FAILURE) ||
(argc == 3 && zend_get_parameters_ex(3, &str, &from, &len) == FAILURE) ||
@ -971,7 +971,7 @@ PHP_FUNCTION(substr_replace)
int l;
int f;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if ((argc == 3 && zend_get_parameters_ex(3, &str, &repl, &from) == FAILURE) ||
(argc == 4 && zend_get_parameters_ex(4, &str, &repl, &from, &len) == FAILURE) ||
@ -1042,7 +1042,7 @@ PHP_FUNCTION(quotemeta)
char *p, *q;
char c;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -1087,7 +1087,7 @@ PHP_FUNCTION(ord)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -1102,7 +1102,7 @@ PHP_FUNCTION(chr)
zval **num;
char temp[2];
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(num);
@ -1118,7 +1118,7 @@ PHP_FUNCTION(ucfirst)
{
zval **arg;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -1140,7 +1140,7 @@ PHP_FUNCTION(ucwords)
zval **str;
register char *r, *r_end;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -1289,7 +1289,7 @@ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *has
PHP_FUNCTION(strtr)
{ /* strtr(STRING,FROM,TO) */
zval **str, **from, **to;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
if (ac < 2 || ac > 3 || zend_get_parameters_ex(ac, &str, &from, &to) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1329,7 +1329,7 @@ PHP_FUNCTION(strrev)
int i,len;
char c;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &str)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &str)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1392,7 +1392,7 @@ static int php_similar_char(const char *txt1, int len1,
PHP_FUNCTION(similar_text)
{
zval **t1, **t2, **percent;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
int sim;
if (ac < 2 || ac > 3 ||
@ -1480,7 +1480,7 @@ PHP_FUNCTION(addcslashes)
{
zval **str, **what;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &str, &what) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &str, &what) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -1496,7 +1496,7 @@ PHP_FUNCTION(addslashes)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -1511,7 +1511,7 @@ PHP_FUNCTION(stripcslashes)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -1528,7 +1528,7 @@ PHP_FUNCTION(stripslashes)
{
zval **str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -1833,7 +1833,7 @@ PHP_FUNCTION(str_replace)
char *result;
int len = 0;
if(ARG_COUNT(ht) != 3 ||
if(ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &needle, &str, &haystack) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1881,7 +1881,7 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines)
int begin,end,char_count,orig_begin;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &str)==FAILURE) {
RETURN_FALSE;
@ -2057,7 +2057,7 @@ PHP_FUNCTION(nl2br)
{
zval **str;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &str)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &str)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2076,7 +2076,7 @@ PHP_FUNCTION(strip_tags)
char *allowed_tags=NULL;
int allowed_tags_len=0;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if(zend_get_parameters_ex(1, &str)==FAILURE) {
RETURN_FALSE;
@ -2111,7 +2111,7 @@ PHP_FUNCTION(setlocale)
char *loc, *retval;
BLS_FETCH();
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &pcategory, &plocale)==FAILURE)
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &pcategory, &plocale)==FAILURE)
WRONG_PARAM_COUNT;
#ifdef HAVE_SETLOCALE
convert_to_string_ex(pcategory);
@ -2372,7 +2372,7 @@ PHP_FUNCTION(str_repeat)
int result_len; /* Length of the resulting string */
int i;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &input_str, &mult) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &input_str, &mult) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2412,7 +2412,7 @@ PHP_FUNCTION(count_chars)
{
zval **input, **mode;
int chars[256];
int ac=ARG_COUNT(ht);
int ac=ZEND_NUM_ARGS();
int mymode=0;
unsigned char *buf;
int len, inx;
@ -2487,7 +2487,7 @@ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case)
{
zval **s1, **s2;
if (ARG_COUNT(ht)!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -2526,7 +2526,7 @@ PHP_FUNCTION(substr_count)
int i, length, count = 0;
char *p, *endp, cmp;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &haystack, &needle) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &haystack, &needle) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -205,7 +205,7 @@ PHP_FUNCTION(openlog)
pval **ident, **option, **facility;
BLS_FETCH();
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &ident, &option, &facility) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &ident, &option, &facility) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(ident);
@ -241,7 +241,7 @@ PHP_FUNCTION(syslog)
{
pval **priority, **message;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &priority, &message) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &priority, &message) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(priority);

View File

@ -50,7 +50,7 @@ PHP_FUNCTION(uniqid)
int sec, usec, argc;
struct timeval tv;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &prefix, &flags)) {
WRONG_PARAM_COUNT;
}

View File

@ -163,7 +163,7 @@ PHP_FUNCTION(parse_url)
pval **str;
url *resource;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
@ -271,7 +271,7 @@ PHP_FUNCTION(urlencode)
pval **arg;
char *str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -293,7 +293,7 @@ PHP_FUNCTION(urldecode)
pval **arg;
int len;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -371,7 +371,7 @@ PHP_FUNCTION(rawurlencode)
pval **arg;
char *str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -392,7 +392,7 @@ PHP_FUNCTION(rawurldecode)
pval **arg;
int len;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);

View File

@ -140,10 +140,10 @@ PHP_FUNCTION(var_dump)
int argc;
int i;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
args = (zval ***)emalloc(argc * sizeof(zval **));
if (ARG_COUNT(ht) == 0 || zend_get_parameters_array_ex(argc, args) == FAILURE) {
if (ZEND_NUM_ARGS() == 0 || zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT;
}
@ -559,7 +559,7 @@ PHP_FUNCTION(serialize)
{
pval **struc;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &struc) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &struc) == FAILURE) {
WRONG_PARAM_COUNT;
}
return_value->type = IS_STRING;
@ -577,7 +577,7 @@ PHP_FUNCTION(unserialize)
{
pval **buf;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &buf) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &buf) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -153,7 +153,7 @@ PHP_FUNCTION(swf_openfile)
{
zval **name, **sizeX, **sizeY, **frameRate, **r, **g, **b;
char *na;
if (ARG_COUNT(ht) != 7 ||
if (ZEND_NUM_ARGS() != 7 ||
zend_get_parameters_ex(7, &name, &sizeX, &sizeY, &frameRate, &r, &g, &b) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -187,7 +187,7 @@ PHP_FUNCTION(swf_closefile)
PHP_FUNCTION(swf_labelframe)
{
zval **name;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &name) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -209,7 +209,7 @@ PHP_FUNCTION(swf_showframe)
PHP_FUNCTION(swf_setframe)
{
zval **frameno;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &frameno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -229,7 +229,7 @@ PHP_FUNCTION(swf_getframe)
void col_swf(INTERNAL_FUNCTION_PARAMETERS, int opt) {
zval **r, **g, **b, **a;
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &r, &g, &b, &a) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -265,7 +265,7 @@ PHP_FUNCTION(swf_addcolor)
PHP_FUNCTION(swf_placeobject)
{
zval **objid, **depth;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &objid, &depth) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -280,7 +280,7 @@ PHP_FUNCTION(swf_placeobject)
PHP_FUNCTION(swf_modifyobject)
{
zval **depth, **how;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &depth, &how) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -296,7 +296,7 @@ PHP_FUNCTION(swf_modifyobject)
PHP_FUNCTION(swf_removeobject)
{
zval **depth;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &depth) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -334,7 +334,7 @@ PHP_FUNCTION(swf_enddoaction)
PHP_FUNCTION(swf_actiongotoframe)
{
zval **frameno;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &frameno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -349,7 +349,7 @@ PHP_FUNCTION(swf_actiongotoframe)
PHP_FUNCTION(swf_actiongeturl)
{
zval **url, **target;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &url, &target) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -405,7 +405,7 @@ PHP_FUNCTION(swf_actiontogglequality)
PHP_FUNCTION(swf_actionwaitforframe)
{
zval **frame, **skipcount;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &frame, &skipcount) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -421,7 +421,7 @@ PHP_FUNCTION(swf_actionwaitforframe)
PHP_FUNCTION(swf_actionsettarget)
{
zval **target;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &target) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -436,7 +436,7 @@ PHP_FUNCTION(swf_actionsettarget)
PHP_FUNCTION(swf_actiongotolabel)
{
zval **label;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &label) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -449,7 +449,7 @@ PHP_FUNCTION(swf_actiongotolabel)
void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **objid, **x1, **y1, **x2, **y2, **width;
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &objid, &x1, &y1, &x2, &y2, &width) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -494,7 +494,7 @@ PHP_FUNCTION(swf_definepoly)
int npoints, i;
float coords[256][2];
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &obj_id, &coordinates, &NumPoints, &width) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -532,7 +532,7 @@ PHP_FUNCTION(swf_definepoly)
PHP_FUNCTION(swf_startshape)
{
zval **objid;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &objid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -546,7 +546,7 @@ PHP_FUNCTION(swf_startshape)
PHP_FUNCTION(swf_shapelinesolid)
{
zval **r, **g, **b, **a, **width;
if (ARG_COUNT(ht) != 5 ||
if (ZEND_NUM_ARGS() != 5 ||
zend_get_parameters_ex(5, &r, &g, &b, &a, &width) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -573,7 +573,7 @@ PHP_FUNCTION(swf_shapefilloff)
PHP_FUNCTION(swf_shapefillsolid)
{
zval **r, **g, **b, **a;
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &r, &g, &b, &a) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -590,7 +590,7 @@ PHP_FUNCTION(swf_shapefillsolid)
void php_swf_fill_bitmap(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **bitmapid;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &bitmapid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -622,7 +622,7 @@ PHP_FUNCTION(swf_shapefillbitmaptile)
void php_swf_shape(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **x, **y;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &x, &y) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -657,7 +657,7 @@ PHP_FUNCTION(swf_shapelineto)
PHP_FUNCTION(swf_shapecurveto)
{
zval **x1, **y1, **x2, **y2;
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &x1, &y1, &x2, &y2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -675,7 +675,7 @@ PHP_FUNCTION(swf_shapecurveto)
PHP_FUNCTION(swf_shapecurveto3)
{
zval **x1, **y1, **x2, **y2, **x3, **y3;
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &x1, &y1, &x2, &y2, &x3, &y3) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -696,7 +696,7 @@ PHP_FUNCTION(swf_shapecurveto3)
PHP_FUNCTION(swf_shapearc)
{
zval **x, **y, **r, **ang1, **ang2;
if (ARG_COUNT(ht) != 5 ||
if (ZEND_NUM_ARGS() != 5 ||
zend_get_parameters_ex(5, &x, &y, &r, &ang1, &ang2) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -724,7 +724,7 @@ PHP_FUNCTION(swf_endshape)
PHP_FUNCTION(swf_definefont)
{
zval **fontid, **name;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &fontid, &name) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -740,7 +740,7 @@ PHP_FUNCTION(swf_definefont)
PHP_FUNCTION(swf_setfont)
{
zval **fontid;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &fontid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -754,7 +754,7 @@ PHP_FUNCTION(swf_setfont)
PHP_FUNCTION(swf_fontsize)
{
zval **height;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &height) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -769,7 +769,7 @@ PHP_FUNCTION(swf_fontsize)
PHP_FUNCTION(swf_fontslant)
{
zval **slant;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &slant) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -784,7 +784,7 @@ PHP_FUNCTION(swf_fontslant)
PHP_FUNCTION(swf_fonttracking)
{
zval **track;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &track) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -813,7 +813,7 @@ PHP_FUNCTION(swf_getfontinfo)
PHP_FUNCTION(swf_definetext)
{
zval **objid, **str, **docCenter;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &objid, &str, &docCenter) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -830,7 +830,7 @@ PHP_FUNCTION(swf_definetext)
PHP_FUNCTION(swf_textwidth)
{
zval **str;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -844,7 +844,7 @@ PHP_FUNCTION(swf_textwidth)
PHP_FUNCTION(swf_definebitmap)
{
zval **objid, **imgname;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &objid, &imgname) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -862,7 +862,7 @@ PHP_FUNCTION(swf_getbitmapinfo)
zval **bitmapid;
int size, width, height;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &bitmapid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -885,7 +885,7 @@ PHP_FUNCTION(swf_getbitmapinfo)
PHP_FUNCTION(swf_startsymbol)
{
zval **objid;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &objid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -908,7 +908,7 @@ PHP_FUNCTION(swf_endsymbol)
PHP_FUNCTION(swf_startbutton)
{
zval **objid, **type;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &objid, &type) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -924,7 +924,7 @@ PHP_FUNCTION(swf_startbutton)
PHP_FUNCTION(swf_addbuttonrecord)
{
zval **state, **objid, **depth;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &state, &objid, &depth) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -941,7 +941,7 @@ PHP_FUNCTION(swf_addbuttonrecord)
PHP_FUNCTION(swf_oncondition)
{
zval **transitions;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &transitions) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -962,7 +962,7 @@ PHP_FUNCTION(swf_endbutton)
void php_swf_geo_same(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **arg1, **arg2, **arg3, **arg4;
if (ARG_COUNT(ht) != 4 ||
if (ZEND_NUM_ARGS() != 4 ||
zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1007,7 +1007,7 @@ PHP_FUNCTION(swf_ortho2)
PHP_FUNCTION(swf_ortho)
{
zval **xmin, **xmax, **ymin, **ymax, **zmin, **zmax;
if (ARG_COUNT(ht) != 6 ||
if (ZEND_NUM_ARGS() != 6 ||
zend_get_parameters_ex(6, &xmin, &xmax, &ymin, &ymax, &zmin, &zmax) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1045,7 +1045,7 @@ PHP_FUNCTION(swf_perspective)
PHP_FUNCTION(swf_lookat)
{
zval **vx, **vy, **vz, **px, **py, **pz, **twist;
if (ARG_COUNT(ht) != 7 ||
if (ZEND_NUM_ARGS() != 7 ||
zend_get_parameters_ex(7, &vx, &vy, &vz, &px, &py, &pz, &twist) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1083,7 +1083,7 @@ PHP_FUNCTION(swf_popmatrix)
PHP_FUNCTION(swf_scale)
{
zval **x, **y, **z;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &x, &y, &z) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1100,7 +1100,7 @@ PHP_FUNCTION(swf_scale)
PHP_FUNCTION(swf_translate)
{
zval **x, **y, **z;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &x, &y, &z) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1117,7 +1117,7 @@ PHP_FUNCTION(swf_translate)
PHP_FUNCTION(swf_rotate)
{
zval **angle, **axis;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &angle, &axis) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1133,7 +1133,7 @@ PHP_FUNCTION(swf_rotate)
PHP_FUNCTION(swf_posround)
{
zval **doit;
if (ARG_COUNT(ht) != 1 ||
if (ZEND_NUM_ARGS() != 1 ||
zend_get_parameters_ex(1, &doit) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -259,7 +259,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
int hashed_details_length;
sybase_link sybase,*sybase_ptr;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0: /* defaults */
host=user=passwd=NULL;
hashed_details_length=6+3;
@ -506,7 +506,7 @@ PHP_FUNCTION(sybase_close)
pval *sybase_link_index;
int id,type;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
id = php_sybase_module.default_link;
break;
@ -542,7 +542,7 @@ PHP_FUNCTION(sybase_select_db)
int id,type;
sybase_link *sybase_ptr;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &db)==FAILURE) {
RETURN_FALSE;
@ -675,7 +675,7 @@ PHP_FUNCTION(sybase_query)
int i,j;
int *column_types;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &query)==FAILURE) {
RETURN_FALSE;
@ -810,7 +810,7 @@ PHP_FUNCTION(sybase_free_result)
sybase_result *result;
int type;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -847,7 +847,7 @@ PHP_FUNCTION(sybase_num_rows)
int type,id;
sybase_result *result;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -873,7 +873,7 @@ PHP_FUNCTION(sybase_num_fields)
int type,id;
sybase_result *result;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -900,7 +900,7 @@ PHP_FUNCTION(sybase_fetch_row)
sybase_result *result;
pval *field_content;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -937,7 +937,7 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
int i;
pval *tmp;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1002,7 +1002,7 @@ PHP_FUNCTION(sybase_data_seek)
int type,id;
sybase_result *result;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1081,7 +1081,7 @@ PHP_FUNCTION(sybase_fetch_field)
int type,id,field_offset;
sybase_result *result;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &sybase_result_index)==FAILURE) {
RETURN_FALSE;
@ -1115,7 +1115,7 @@ PHP_FUNCTION(sybase_fetch_field)
}
if (field_offset<0 || field_offset >= result->num_fields) {
if (ARG_COUNT(ht)==2) { /* field specified explicitly */
if (ZEND_NUM_ARGS()==2) { /* field specified explicitly */
php_error(E_WARNING,"Sybase: Bad column offset");
}
RETURN_FALSE;
@ -1140,7 +1140,7 @@ PHP_FUNCTION(sybase_field_seek)
int type,id,field_offset;
sybase_result *result;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1175,7 +1175,7 @@ PHP_FUNCTION(sybase_result)
sybase_result *result;
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &sybase_result_index, &row, &field)==FAILURE) {
if (ZEND_NUM_ARGS()!=3 || getParameters(ht, 3, &sybase_result_index, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1261,7 +1261,7 @@ PHP_FUNCTION(sybase_min_error_severity)
{
pval *severity;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &severity)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &severity)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(severity);
@ -1275,7 +1275,7 @@ PHP_FUNCTION(sybase_min_message_severity)
{
pval *severity;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &severity)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &severity)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(severity);

View File

@ -394,7 +394,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
int hashed_details_length;
sybase_link *sybase_ptr;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0: /* defaults */
host=user=passwd=NULL;
hashed_details_length=6+3;
@ -626,7 +626,7 @@ PHP_FUNCTION(sybase_close)
int id;
sybase_link *sybase_ptr;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 0:
id = sybase_globals.default_link;
break;
@ -735,7 +735,7 @@ PHP_FUNCTION(sybase_select_db)
char *cmdbuf;
sybase_link *sybase_ptr;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &db)==FAILURE) {
RETURN_FALSE;
@ -947,7 +947,7 @@ PHP_FUNCTION(sybase_query)
Q_FAILURE, /* Failure, no results. */
} status;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &query)==FAILURE) {
RETURN_FALSE;
@ -1146,7 +1146,7 @@ PHP_FUNCTION(sybase_free_result)
pval *sybase_result_index;
sybase_result *result;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1177,7 +1177,7 @@ PHP_FUNCTION(sybase_num_rows)
pval *sybase_result_index;
sybase_result *result;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1193,7 +1193,7 @@ PHP_FUNCTION(sybase_num_fields)
pval *sybase_result_index;
sybase_result *result;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1211,7 +1211,7 @@ PHP_FUNCTION(sybase_fetch_row)
sybase_result *result;
pval *field_content;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1241,7 +1241,7 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
pval *tmp;
PLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1293,7 +1293,7 @@ PHP_FUNCTION(sybase_data_seek)
pval *sybase_result_index,*offset;
sybase_result *result;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1361,7 +1361,7 @@ PHP_FUNCTION(sybase_fetch_field)
int field_offset;
sybase_result *result;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (getParameters(ht, 1, &sybase_result_index)==FAILURE) {
RETURN_FALSE;
@ -1388,7 +1388,7 @@ PHP_FUNCTION(sybase_fetch_field)
}
if (field_offset<0 || field_offset >= result->num_fields) {
if (ARG_COUNT(ht)==2) { /* field specified explicitly */
if (ZEND_NUM_ARGS()==2) { /* field specified explicitly */
php_error(E_WARNING,"Sybase: Bad column offset");
}
RETURN_FALSE;
@ -1411,7 +1411,7 @@ PHP_FUNCTION(sybase_field_seek)
int field_offset;
sybase_result *result;
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &sybase_result_index, &offset)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1437,7 +1437,7 @@ PHP_FUNCTION(sybase_result)
sybase_result *result;
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &sybase_result_index, &row, &field)==FAILURE) {
if (ZEND_NUM_ARGS()!=3 || getParameters(ht, 3, &sybase_result_index, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1487,7 +1487,7 @@ PHP_FUNCTION(sybase_affected_rows)
sybase_link *sybase_ptr;
int id;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
id = php_sybase_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU);
break;
@ -1544,7 +1544,7 @@ PHP_FUNCTION(sybase_min_client_severity)
{
pval *severity;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &severity)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &severity)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(severity);
@ -1556,7 +1556,7 @@ PHP_FUNCTION(sybase_min_server_severity)
{
pval *severity;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &severity)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &severity)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(severity);

View File

@ -144,7 +144,7 @@ PHP_FUNCTION(sem_get)
max_acquire = 1;
perm = 0666;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &arg_key)==FAILURE) {
RETURN_FALSE;
@ -287,7 +287,7 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
sysvsem_sem *sem_ptr;
struct sembuf sop;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &arg_id)==FAILURE) {
RETURN_FALSE;

View File

@ -86,7 +86,7 @@ PHP_FUNCTION(shm_attach)
sysvshm_chunk_head *chunk_ptr;
key_t shm_key = (key_t) 0;
long shm_id,list_id;
int ac = ARG_COUNT(ht);
int ac = ZEND_NUM_ARGS();
shm_flag = 0666;
shm_size = php_sysvshm.init_mem;
@ -157,7 +157,7 @@ PHP_FUNCTION(shm_detach)
pval **arg_id;
long id;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg_id) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg_id) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -178,7 +178,7 @@ PHP_FUNCTION(shm_remove)
long id;
key_t key;
if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg_key) == FAILURE) {
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg_key) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -212,7 +212,7 @@ PHP_FUNCTION(shm_put_var)
pval shm_var;
int ret;
if(ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &arg_id, &arg_key,&arg_var) == FAILURE) {
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg_id, &arg_key,&arg_var) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -262,7 +262,7 @@ PHP_FUNCTION(shm_get_var)
long shm_varpos;
sysvshm_chunk *shm_var;
if(ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg_id, &arg_key) == FAILURE) {
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg_id, &arg_key) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -305,7 +305,7 @@ PHP_FUNCTION(shm_remove_var)
int type;
long shm_varpos;
if(ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg_id, &arg_key) == FAILURE) {
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg_id, &arg_key) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -783,7 +783,7 @@ PHP_FUNCTION(wddx_serialize_value)
wddx_packet *packet;
char *buf;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if(argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &var, &comment) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -820,7 +820,7 @@ PHP_FUNCTION(wddx_serialize_vars)
zval ***args;
char *buf;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
/* Allocate arguments array and get the arguments, checking for errors. */
args = (zval ***)emalloc(argc * sizeof(zval **));
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
@ -877,7 +877,7 @@ PHP_FUNCTION(wddx_packet_start)
wddx_packet *packet;
comment = NULL;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc > 1 || (argc == 1 && zend_get_parameters_ex(1, &comment)==FAILURE)) {
WRONG_PARAM_COUNT;
@ -910,7 +910,7 @@ PHP_FUNCTION(wddx_packet_end)
char *buf;
wddx_packet *packet = NULL;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &packet_id)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &packet_id)==FAILURE) {
WRONG_PARAM_COUNT;
}
@ -938,7 +938,7 @@ PHP_FUNCTION(wddx_add_vars)
zval **packet_id;
wddx_packet *packet = NULL;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2) {
WRONG_PARAM_COUNT;
}
@ -977,7 +977,7 @@ PHP_FUNCTION(wddx_deserialize)
{
zval **packet;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1, &packet) == FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &packet) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -986,7 +986,7 @@ PHP_FUNCTION(xml_parser_create)
char thisfunc[] = "xml_parser_create";
XMLLS_FETCH();
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc > 1 || zend_get_parameters_ex(argc, &encodingArg) == FAILURE) {
WRONG_PARAM_COUNT;
@ -1034,7 +1034,7 @@ PHP_FUNCTION(xml_set_object)
xml_parser *parser;
zval **pind, **mythis;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &pind, &mythis) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1073,7 +1073,7 @@ PHP_FUNCTION(xml_set_element_handler)
xml_parser *parser;
zval **pind, **shdl, **ehdl;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &pind, &shdl, &ehdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1094,7 +1094,7 @@ PHP_FUNCTION(xml_set_character_data_handler)
xml_parser *parser;
zval **pind, **hdl;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1113,7 +1113,7 @@ PHP_FUNCTION(xml_set_processing_instruction_handler)
xml_parser *parser;
zval **pind, **hdl;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1132,7 +1132,7 @@ PHP_FUNCTION(xml_set_default_handler)
xml_parser *parser;
zval **pind, **hdl;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1150,7 +1150,7 @@ PHP_FUNCTION(xml_set_unparsed_entity_decl_handler)
xml_parser *parser;
zval **pind, **hdl;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1169,7 +1169,7 @@ PHP_FUNCTION(xml_set_notation_decl_handler)
xml_parser *parser;
zval **pind, **hdl;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1187,7 +1187,7 @@ PHP_FUNCTION(xml_set_external_entity_ref_handler)
xml_parser *parser;
zval **pind, **hdl;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1206,7 +1206,7 @@ PHP_FUNCTION(xml_parse)
zval **pind, **data, **final;
int argc, isFinal, ret;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 2 || argc > 3 || zend_get_parameters_ex(argc, &pind, &data, &final) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1235,7 +1235,7 @@ PHP_FUNCTION(xml_parse_into_struct)
zval **pind, **data, **xdata, **info = 0;
int argc, ret;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (zend_get_parameters_ex(4, &pind, &data, &xdata,&info) == SUCCESS) {
if (!ParameterPassedByReference(ht, 4)) {
php_error(E_WARNING, "Array to be filled with values must be passed by reference.");
@ -1281,7 +1281,7 @@ PHP_FUNCTION(xml_get_error_code)
xml_parser *parser;
zval **pind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1297,7 +1297,7 @@ PHP_FUNCTION(xml_error_string)
zval **code;
char *str;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &code) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &code) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(code);
@ -1315,7 +1315,7 @@ PHP_FUNCTION(xml_get_current_line_number)
xml_parser *parser;
zval **pind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1331,7 +1331,7 @@ PHP_FUNCTION(xml_get_current_column_number)
xml_parser *parser;
zval **pind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1347,7 +1347,7 @@ PHP_FUNCTION(xml_get_current_byte_index)
xml_parser *parser;
zval **pind;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1363,7 +1363,7 @@ PHP_FUNCTION(xml_parser_free)
zval **pind;
xml_parser *parser;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -1385,7 +1385,7 @@ PHP_FUNCTION(xml_parser_set_option)
zval **pind, **opt, **val;
char thisfunc[] = "xml_parser_set_option";
if (ARG_COUNT(ht) != 3 || zend_get_parameters_ex(3, &pind, &opt, &val) == FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &pind, &opt, &val) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1434,7 +1434,7 @@ PHP_FUNCTION(xml_parser_get_option)
zval **pind, **opt;
char thisfunc[] = "xml_parser_get_option";
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &pind, &opt) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &pind, &opt) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
@ -1465,7 +1465,7 @@ PHP_FUNCTION(utf8_encode)
XML_Char *encoded;
int len;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);
@ -1485,7 +1485,7 @@ PHP_FUNCTION(utf8_decode)
XML_Char *decoded;
int len;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg);

View File

@ -835,7 +835,7 @@ PHP_FUNCTION(yaz_connect)
char *cp;
char *zurl_str;
pval **zurl;
if (ARG_COUNT(ht) < 1 || zend_get_parameters_ex (1, &zurl) == FAILURE)
if (ZEND_NUM_ARGS() < 1 || zend_get_parameters_ex (1, &zurl) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -892,7 +892,7 @@ PHP_FUNCTION(yaz_close)
{
pval **id;
int i;
if (ARG_COUNT(ht) != 1)
if (ZEND_NUM_ARGS() != 1)
WRONG_PARAM_COUNT;
if (zend_get_parameters_ex (1, &id) == FAILURE)
RETURN_FALSE;
@ -914,7 +914,7 @@ PHP_FUNCTION(yaz_search)
pval **id, **type, **query;
Yaz_Association p;
Yaz_ResultSet r;
if (ARG_COUNT(ht) != 3)
if (ZEND_NUM_ARGS() != 3)
WRONG_PARAM_COUNT;
if (zend_get_parameters_ex(3, &id, &type, &query) == FAILURE)
{
@ -996,7 +996,7 @@ PHP_FUNCTION(yaz_errno)
{
pval **id;
Yaz_Association p;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -1015,7 +1015,7 @@ PHP_FUNCTION(yaz_error)
{
pval **id;
Yaz_Association p;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -1071,7 +1071,7 @@ PHP_FUNCTION(yaz_addinfo)
{
pval **id;
Yaz_Association p;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -1089,7 +1089,7 @@ PHP_FUNCTION(yaz_hits)
{
pval **id;
Yaz_Association p;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &id) == FAILURE)
{
WRONG_PARAM_COUNT;
}
@ -1363,7 +1363,7 @@ PHP_FUNCTION(yaz_record)
int pos;
char *type;
if (ARG_COUNT(ht) != 3)
if (ZEND_NUM_ARGS() != 3)
WRONG_PARAM_COUNT;
if (zend_get_parameters_ex(3, &pval_id, &pval_pos, &pval_type) == FAILURE)
{
@ -1458,7 +1458,7 @@ PHP_FUNCTION(yaz_syntax)
{
pval **pval_id, **pval_syntax;
Yaz_Association p;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &pval_id, &pval_syntax) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1479,7 +1479,7 @@ PHP_FUNCTION(yaz_element)
{
pval **pval_id, **pval_element;
Yaz_Association p;
if (ARG_COUNT(ht) != 2 ||
if (ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &pval_id, &pval_element) == FAILURE)
{
WRONG_PARAM_COUNT;
@ -1501,7 +1501,7 @@ PHP_FUNCTION(yaz_range)
{
pval **pval_id, **pval_start, **pval_number;
Yaz_Association p;
if (ARG_COUNT(ht) != 3 ||
if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, &pval_id, &pval_start, &pval_number) ==
FAILURE)
{

View File

@ -74,7 +74,7 @@ PHP_FUNCTION(yp_order) {
int outval;
#endif
if((ARG_COUNT(ht) != 2) || zend_get_parameters_ex(2,&domain,&map) == FAILURE) {
if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2,&domain,&map) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -95,7 +95,7 @@ PHP_FUNCTION(yp_master) {
pval **domain, **map;
char *outname;
if((ARG_COUNT(ht) != 2) || zend_get_parameters_ex(2,&domain,&map) == FAILURE) {
if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2,&domain,&map) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -117,7 +117,7 @@ PHP_FUNCTION(yp_match) {
char *outval;
int outvallen;
if((ARG_COUNT(ht) != 3) || zend_get_parameters_ex(3,&domain,&map,&key) == FAILURE) {
if((ZEND_NUM_ARGS() != 3) || zend_get_parameters_ex(3,&domain,&map,&key) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -140,7 +140,7 @@ PHP_FUNCTION(yp_first) {
char *outval, *outkey;
int outvallen, outkeylen;
if((ARG_COUNT(ht) != 2) || zend_get_parameters_ex(2,&domain,&map) == FAILURE) {
if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2,&domain,&map) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -163,7 +163,7 @@ PHP_FUNCTION(yp_next) {
char *outval, *outkey;
int outvallen, outkeylen;
if((ARG_COUNT(ht) != 3) || zend_get_parameters_ex(3,&domain,&map,&key) == FAILURE) {
if((ZEND_NUM_ARGS() != 3) || zend_get_parameters_ex(3,&domain,&map,&key) == FAILURE) {
WRONG_PARAM_COUNT;
}

View File

@ -287,7 +287,7 @@ PHP_FUNCTION(gzfile) {
PLS_FETCH();
/* check args */
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1,&filename) == FAILURE) {
WRONG_PARAM_COUNT;
@ -341,7 +341,7 @@ PHP_FUNCTION(gzopen) {
int use_include_path = 0;
ZLIBLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2,&arg1,&arg2) == FAILURE) {
WRONG_PARAM_COUNT;
@ -384,7 +384,7 @@ PHP_FUNCTION(gzclose) {
pval **arg1;
gzFile *zp;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
@ -399,7 +399,7 @@ PHP_FUNCTION(gzeof) {
pval **arg1;
gzFile *zp;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
@ -421,7 +421,7 @@ PHP_FUNCTION(gzgets) {
char *buf;
PLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg2);
@ -456,7 +456,7 @@ PHP_FUNCTION(gzgetc) {
int c;
char *buf;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -490,7 +490,7 @@ PHP_FUNCTION(gzgetss)
int allowed_tags_len=0;
ZLIBLS_FETCH();
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 2:
if(zend_get_parameters_ex(2, &fd, &bytes) == FAILURE) {
RETURN_FALSE;
@ -540,7 +540,7 @@ PHP_FUNCTION(gzwrite) {
int num_bytes;
PLS_FETCH();
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &arg1, &arg2)==FAILURE) {
RETURN_FALSE;
@ -583,7 +583,7 @@ PHP_FUNCTION(gzrewind) {
pval **arg1;
gzFile *zp;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -601,7 +601,7 @@ PHP_FUNCTION(gztell) {
long pos;
gzFile *zp;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -619,7 +619,7 @@ PHP_FUNCTION(gzseek) {
int ret;
gzFile *zp;
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg2);
@ -645,7 +645,7 @@ PHP_FUNCTION(readgzfile) {
/* check args */
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1,&arg1) == FAILURE) {
WRONG_PARAM_COUNT;
@ -693,7 +693,7 @@ PHP_FUNCTION(gzpassthru) {
char buf[8192];
int size, b;
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
@ -720,7 +720,7 @@ PHP_FUNCTION(gzread)
int len;
PLS_FETCH();
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg2);
@ -752,7 +752,7 @@ PHP_FUNCTION(gzcompress)
unsigned long l2;
char *s2;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &data) == FAILURE)
WRONG_PARAM_COUNT;
@ -802,7 +802,7 @@ PHP_FUNCTION(gzuncompress)
unsigned long plength=0,length;
char *s1=NULL,*s2=NULL;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &data) == FAILURE)
WRONG_PARAM_COUNT;