mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFH: fix int<->long mess causing lots of segfaults on x86_64
This commit is contained in:
parent
f8f406208b
commit
617ab865a0
2 changed files with 10 additions and 7 deletions
|
@ -70,7 +70,8 @@ PHP_METHOD(sqlite3, open)
|
|||
php_sqlite3_db_object *db_obj;
|
||||
zval *object = getThis();
|
||||
char *filename, *encryption_key, *fullpath;
|
||||
int filename_len, encryption_key_len, flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
|
||||
int filename_len, encryption_key_len;
|
||||
long flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
|
||||
db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) {
|
||||
|
@ -518,7 +519,8 @@ PHP_METHOD(sqlite3, querySingle)
|
|||
php_sqlite3_db_object *db_obj;
|
||||
zval *object = getThis();
|
||||
char *sql, *errtext = NULL;
|
||||
int sql_len, return_code, entire_row = 0;
|
||||
int sql_len, return_code;
|
||||
zend_bool entire_row = 0;
|
||||
sqlite3_stmt *stmt;
|
||||
db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
|
@ -1117,7 +1119,7 @@ PHP_METHOD(sqlite3stmt, execute)
|
|||
break;
|
||||
|
||||
default:
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown parameter type: %d for parameter %ld", param->type, param->param_number);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown parameter type: %ld for parameter %ld", param->type, param->param_number);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
zend_hash_move_forward(stmt_obj->bound_params);
|
||||
|
@ -1188,7 +1190,7 @@ PHP_METHOD(sqlite3result, columnName)
|
|||
{
|
||||
php_sqlite3_result *result_obj;
|
||||
zval *object = getThis();
|
||||
int column = 0;
|
||||
long column = 0;
|
||||
result_obj = (php_sqlite3_result *)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(result_obj->stmt_obj->initialised, SQLite3Result)
|
||||
|
@ -1207,7 +1209,7 @@ PHP_METHOD(sqlite3result, columnType)
|
|||
{
|
||||
php_sqlite3_result *result_obj;
|
||||
zval *object = getThis();
|
||||
int column = 0;
|
||||
long column = 0;
|
||||
result_obj = (php_sqlite3_result *)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(result_obj->stmt_obj->initialised, SQLite3Result)
|
||||
|
@ -1226,7 +1228,8 @@ PHP_METHOD(sqlite3result, fetchArray)
|
|||
{
|
||||
php_sqlite3_result *result_obj;
|
||||
zval *object = getThis();
|
||||
int i, ret, mode = PHP_SQLITE3_BOTH;
|
||||
int i, ret;
|
||||
long mode = PHP_SQLITE3_BOTH;
|
||||
result_obj = (php_sqlite3_result *)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
SQLITE3_CHECK_INITIALIZED(result_obj->stmt_obj->initialised, SQLite3Result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue