Skip to content

Commit fff93cd

Browse files
committed
another 64-bit fix - 's' in zend_parse_parameters uses int, so it should not get long *
1 parent 0230c72 commit fff93cd

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

ext/sqlite/sqlite.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,8 @@ PHP_FUNCTION(sqlite_popen)
757757
{
758758
long mode = 0666;
759759
char *filename, *fullpath, *hashkey;
760-
long filename_len, hashkeylen;
760+
int filename_len;
761+
long hashkeylen;
761762
zval *errmsg = NULL;
762763
struct php_sqlite_db *db = NULL;
763764
list_entry *le;
@@ -832,7 +833,7 @@ PHP_FUNCTION(sqlite_open)
832833
{
833834
long mode = 0666;
834835
char *filename, *fullpath = NULL;
835-
long filename_len;
836+
int filename_len;
836837
zval *errmsg = NULL;
837838

838839
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/",
@@ -1054,7 +1055,7 @@ PHP_FUNCTION(sqlite_unbuffered_query)
10541055
zval *zdb;
10551056
struct php_sqlite_db *db;
10561057
char *sql;
1057-
long sql_len;
1058+
int sql_len;
10581059
long mode = PHPSQLITE_BOTH;
10591060
char *errtext = NULL;
10601061

@@ -1090,7 +1091,7 @@ PHP_FUNCTION(sqlite_query)
10901091
zval *zdb;
10911092
struct php_sqlite_db *db;
10921093
char *sql;
1093-
long sql_len;
1094+
int sql_len;
10941095
long mode = PHPSQLITE_BOTH;
10951096
char *errtext = NULL;
10961097

@@ -1125,7 +1126,7 @@ PHP_FUNCTION(sqlite_exec)
11251126
zval *zdb;
11261127
struct php_sqlite_db *db;
11271128
char *sql;
1128-
long sql_len;
1129+
int sql_len;
11291130
char *errtext = NULL;
11301131

11311132
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
@@ -1335,7 +1336,7 @@ PHP_FUNCTION(sqlite_array_query)
13351336
struct php_sqlite_db *db;
13361337
struct php_sqlite_result *rres;
13371338
char *sql;
1338-
long sql_len;
1339+
int sql_len;
13391340
long mode = PHPSQLITE_BOTH;
13401341
char *errtext = NULL;
13411342
zend_bool decode_binary = 1;
@@ -1440,7 +1441,7 @@ PHP_FUNCTION(sqlite_single_query)
14401441
struct php_sqlite_db *db;
14411442
struct php_sqlite_result *rres;
14421443
char *sql;
1443-
long sql_len;
1444+
int sql_len;
14441445
char *errtext = NULL;
14451446
zend_bool decode_binary = 1;
14461447
zend_bool srow = 1;
@@ -1779,7 +1780,7 @@ PHP_FUNCTION(sqlite_next)
17791780
PHP_FUNCTION(sqlite_escape_string)
17801781
{
17811782
char *string = NULL;
1782-
long stringlen;
1783+
int stringlen;
17831784
char *ret;
17841785

17851786
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &stringlen)) {
@@ -1912,7 +1913,7 @@ static enum callback_prep_t prep_callback_struct(struct php_sqlite_db *db, int i
19121913
PHP_FUNCTION(sqlite_create_aggregate)
19131914
{
19141915
char *funcname = NULL;
1915-
long funcname_len;
1916+
int funcname_len;
19161917
zval *zstep, *zfinal, *zdb;
19171918
struct php_sqlite_db *db;
19181919
struct php_sqlite_agg_functions *funcs;
@@ -1953,7 +1954,7 @@ PHP_FUNCTION(sqlite_create_aggregate)
19531954
PHP_FUNCTION(sqlite_create_function)
19541955
{
19551956
char *funcname = NULL;
1956-
long funcname_len;
1957+
int funcname_len;
19571958
zval *zcall, *zdb;
19581959
struct php_sqlite_db *db;
19591960
struct php_sqlite_agg_functions *funcs;
@@ -1983,7 +1984,7 @@ PHP_FUNCTION(sqlite_create_function)
19831984
PHP_FUNCTION(sqlite_udf_encode_binary)
19841985
{
19851986
char *data = NULL;
1986-
long datalen;
1987+
int datalen;
19871988

19881989
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", &data, &datalen)) {
19891990
return;
@@ -2012,7 +2013,7 @@ PHP_FUNCTION(sqlite_udf_encode_binary)
20122013
PHP_FUNCTION(sqlite_udf_decode_binary)
20132014
{
20142015
char *data = NULL;
2015-
long datalen;
2016+
int datalen;
20162017

20172018
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", &data, &datalen)) {
20182019
return;

0 commit comments

Comments
 (0)