summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_statement.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-19 08:07:31 +0200
committerAnatol Belski <ab@php.net>2014-08-19 08:07:31 +0200
commit63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc (patch)
treee561a58d6e084c5e4cbdde1f84aed16cf4724383 /ext/pdo_sqlite/sqlite_statement.c
parent1e8273964fbd517a2eb9e560f9cdb4afffa0c034 (diff)
downloadphp-git-63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc.tar.gz
basic macro replacements, all at once
Diffstat (limited to 'ext/pdo_sqlite/sqlite_statement.c')
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index 5f18c8a0cf..ccd2dc5efd 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -117,13 +117,13 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
return 1;
}
} else {
- convert_to_long(parameter);
+ convert_to_int(parameter);
#if LONG_MAX > 2147483647
- if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) {
+ if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_IVAL_P(parameter))) {
return 1;
}
#else
- if (SQLITE_OK == sqlite3_bind_int(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) {
+ if (SQLITE_OK == sqlite3_bind_int(S->stmt, param->paramno + 1, Z_IVAL_P(parameter))) {
return 1;
}
#endif
@@ -159,7 +159,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
if (SQLITE_OK == sqlite3_bind_blob(S->stmt, param->paramno + 1,
Z_STRVAL_P(parameter),
- Z_STRLEN_P(parameter),
+ Z_STRSIZE_P(parameter),
SQLITE_STATIC)) {
return 1;
}
@@ -180,7 +180,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
convert_to_string(parameter);
if (SQLITE_OK == sqlite3_bind_text(S->stmt, param->paramno + 1,
Z_STRVAL_P(parameter),
- Z_STRLEN_P(parameter),
+ Z_STRSIZE_P(parameter),
SQLITE_STATIC)) {
return 1;
}