@@ -55,8 +55,8 @@ PHP_MSHUTDOWN_FUNCTION(dba);
55
55
PHP_MINFO_FUNCTION (dba );
56
56
57
57
ZEND_BEGIN_MODULE_GLOBALS (dba )
58
- char * default_handler ;
59
- dba_handler * default_hptr ;
58
+ const char * default_handler ;
59
+ const dba_handler * default_hptr ;
60
60
ZEND_END_MODULE_GLOBALS (dba )
61
61
62
62
ZEND_DECLARE_MODULE_GLOBALS (dba )
@@ -159,7 +159,7 @@ static zend_string* php_dba_make_key(HashTable *key)
159
159
160
160
/* {{{ globals */
161
161
162
- static dba_handler handler [] = {
162
+ static const dba_handler handler [] = {
163
163
#ifdef DBA_GDBM
164
164
DBA_HND (gdbm , DBA_LOCK_EXT ) /* Locking done in library if set */
165
165
#endif
@@ -249,7 +249,7 @@ PHPAPI void dba_fetch_resource(dba_info **pinfo, zval **id)
249
249
/* {{{ dba_get_handler
250
250
PHPAPI dba_handler *dba_get_handler(const char* handler_name)
251
251
{
252
- dba_handler *hptr;
252
+ const dba_handler *hptr;
253
253
for (hptr = handler; hptr->name && strcasecmp(hptr->name, handler_name); hptr++);
254
254
return hptr;
255
255
}
@@ -320,7 +320,7 @@ static void dba_close_pe_rsrc(zend_resource *rsrc)
320
320
/* {{{ PHP_INI */
321
321
ZEND_INI_MH (OnUpdateDefaultHandler )
322
322
{
323
- dba_handler * hptr ;
323
+ const dba_handler * hptr ;
324
324
325
325
if (!ZSTR_LEN (new_value )) {
326
326
DBA_G (default_hptr ) = NULL ;
@@ -377,7 +377,7 @@ PHP_MSHUTDOWN_FUNCTION(dba)
377
377
/* {{{ PHP_MINFO_FUNCTION */
378
378
PHP_MINFO_FUNCTION (dba )
379
379
{
380
- dba_handler * hptr ;
380
+ const dba_handler * hptr ;
381
381
smart_str handlers = {0 };
382
382
383
383
for (hptr = handler ; hptr -> name ; hptr ++ ) {
@@ -461,7 +461,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent)
461
461
{
462
462
dba_mode_t modenr ;
463
463
dba_info * info , * other ;
464
- dba_handler * hptr ;
464
+ const dba_handler * hptr ;
465
465
char * error = NULL ;
466
466
int lock_mode , lock_flag = 0 ;
467
467
char * file_mode ;
@@ -1165,7 +1165,7 @@ PHP_FUNCTION(dba_sync)
1165
1165
/* {{{ List configured database handlers */
1166
1166
PHP_FUNCTION (dba_handlers )
1167
1167
{
1168
- dba_handler * hptr ;
1168
+ const dba_handler * hptr ;
1169
1169
bool full_info = 0 ;
1170
1170
1171
1171
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & full_info ) == FAILURE ) {
0 commit comments