summaryrefslogtreecommitdiff
path: root/ext/interbase/php_ibase_udf.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
committerAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
commitc3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch)
treed82a76de5c8d117d1cf2dcca19bb30a283621870 /ext/interbase/php_ibase_udf.c
parent0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff)
downloadphp-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz
master renames phase 1
Diffstat (limited to 'ext/interbase/php_ibase_udf.c')
-rw-r--r--ext/interbase/php_ibase_udf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c
index d37e077240..5a53df8b6b 100644
--- a/ext/interbase/php_ibase_udf.c
+++ b/ext/interbase/php_ibase_udf.c
@@ -231,7 +231,7 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
case dtype_short:
if (argv[i]->dsc_scale == 0) {
- ZVAL_INT(&args[i], *(short*)argv[i]->dsc_address);
+ ZVAL_LONG(&args[i], *(short*)argv[i]->dsc_address);
} else {
ZVAL_DOUBLE(&args[i],
((double)*(short*)argv[i]->dsc_address)/scales[-argv[i]->dsc_scale]);
@@ -240,7 +240,7 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
case dtype_long:
if (argv[i]->dsc_scale == 0) {
- ZVAL_INT(&args[i], *(ISC_LONG*)argv[i]->dsc_address);
+ ZVAL_LONG(&args[i], *(ISC_LONG*)argv[i]->dsc_address);
} else {
ZVAL_DOUBLE(&args[i],
((double)*(ISC_LONG*)argv[i]->dsc_address)/scales[-argv[i]->dsc_scale]);
@@ -251,7 +251,7 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
l = *(ISC_INT64*)argv[i]->dsc_address;
if (argv[i]->dsc_scale == 0 && l <= LONG_MAX && l >= LONG_MIN) {
- ZVAL_INT(&args[i], (long)l);
+ ZVAL_LONG(&args[i], (long)l);
} else {
ZVAL_DOUBLE(&args[i], ((double)l)/scales[-argv[i]->dsc_scale]);
}
@@ -307,9 +307,9 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
/* return whatever type we got back from the callback: let DB handle conversion */
switch (Z_TYPE(return_value)) {
- case IS_INT:
+ case IS_LONG:
r->dsc_dtype = dtype_long;
- *(long*)r->dsc_address = Z_IVAL(return_value);
+ *(long*)r->dsc_address = Z_LVAL(return_value);
r->dsc_length = sizeof(long);
break;
@@ -329,7 +329,7 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
case IS_STRING:
r->dsc_dtype = dtype_varying;
memcpy(res->vary_string, Z_STRVAL(return_value),
- (res->vary_length = min(r->dsc_length-2,Z_STRSIZE(return_value))));
+ (res->vary_length = min(r->dsc_length-2,Z_STRLEN(return_value))));
r->dsc_length = res->vary_length+2;
break;
}