Skip to content

Minor sqlite3 cleanups #13141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions ext/sqlite3/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1427,9 +1427,7 @@ PHP_METHOD(SQLite3Stmt, close)

SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);

if(stmt_obj->db_obj) {
zend_llist_del_element(&(stmt_obj->db_obj->free_list), object, (int (*)(void *, void *)) php_sqlite3_compare_stmt_zval_free);
}
zend_llist_del_element(&(stmt_obj->db_obj->free_list), object, (int (*)(void *, void *)) php_sqlite3_compare_stmt_zval_free);

RETURN_TRUE;
}
Expand Down Expand Up @@ -1682,9 +1680,7 @@ static int register_bound_parameter_to_sqlite(struct php_sqlite3_bound_param *pa
return 0;
}

if (param->param_number >= 1) {
zend_hash_index_del(hash, param->param_number);
}
zend_hash_index_del(hash, param->param_number);

if (param->name) {
zend_hash_update_mem(hash, param->name, param, sizeof(struct php_sqlite3_bound_param));
Expand Down