Make lots of string pointers const (#10646)

This allows using string literals without implicitly casting away the
`const`.
This commit is contained in:
Max Kellermann 2023-02-21 15:01:37 +01:00 committed by GitHub
parent 373809c51b
commit 263b22f374
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 39 additions and 40 deletions

View file

@ -1234,7 +1234,7 @@ PHP_METHOD(SQLite3, openBlob)
{
php_sqlite3_db_object *db_obj;
zval *object = ZEND_THIS;
char *table, *column, *dbname = "main", *mode = "rb";
const char *table, *column, *dbname = "main", *mode = "rb";
size_t table_len, column_len, dbname_len;
zend_long rowid, flags = SQLITE_OPEN_READONLY, sqlite_flags = 0;
sqlite3_blob *blob = NULL;
@ -1338,7 +1338,7 @@ PHP_METHOD(SQLite3, backup)
{
php_sqlite3_db_object *source_obj;
php_sqlite3_db_object *destination_obj;
char *source_dbname = "main", *destination_dbname = "main";
const char *source_dbname = "main", *destination_dbname = "main";
size_t source_dbname_length, destination_dbname_length;
zval *source_zval = ZEND_THIS;
zval *destination_zval;