Skip to content

Commit c80949e

Browse files
committed
Rename internal_construct()
1 parent 63e1e32 commit c80949e

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

ext/pdo/pdo_dbh.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static bool create_driver_specific_pdo_object(pdo_driver_t *driver, zend_class_e
268268

269269
if (ce_based_on_driver_name) {
270270
if (called_scope != pdo_dbh_ce) {
271-
/* A driver-specific implementation is instantiated of a wrong driver class */
271+
/* A driver-specific implementation is instantiated with a wrong driver class */
272272
zend_throw_exception_ex(pdo_exception_ce, 0,
273273
"%s::%s() cannot be called when connecting to the \"%s\" driver, "
274274
"either call %s::%s() or PDO::%s() instead",
@@ -282,7 +282,6 @@ static bool create_driver_specific_pdo_object(pdo_driver_t *driver, zend_class_e
282282
return false;
283283
}
284284

285-
/* A driver-specific implementation was instantiated via PDO::__construct() */
286285
if (new_object) {
287286
object_init_ex(new_object, ce_based_on_driver_name);
288287
}
@@ -294,7 +293,7 @@ static bool create_driver_specific_pdo_object(pdo_driver_t *driver, zend_class_e
294293
return true;
295294
}
296295

297-
PDO_API void internal_construct(INTERNAL_FUNCTION_PARAMETERS, zend_object *object, zend_class_entry *current_scope, zval *new_zval_object)
296+
PDO_API void php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAMETERS, zend_object *object, zend_class_entry *current_scope, zval *new_zval_object)
298297
{
299298
pdo_dbh_t *dbh = NULL;
300299
bool is_persistent = 0;
@@ -517,14 +516,14 @@ PDO_API void internal_construct(INTERNAL_FUNCTION_PARAMETERS, zend_object *objec
517516
/* {{{ */
518517
PHP_METHOD(PDO, __construct)
519518
{
520-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
519+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
521520
}
522521
/* }}} */
523522

524523
/* {{{ */
525524
PHP_METHOD(PDO, connect)
526525
{
527-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), EX(This).value.ce, return_value);
526+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), EX(This).value.ce, return_value);
528527
}
529528
/* }}} */
530529

ext/pdo/php_pdo_driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ PDO_API void php_pdo_dbh_delref(pdo_dbh_t *dbh);
694694
PDO_API void php_pdo_free_statement(pdo_stmt_t *stmt);
695695
PDO_API void php_pdo_stmt_set_column_count(pdo_stmt_t *stmt, int new_count);
696696

697-
PDO_API void internal_construct(INTERNAL_FUNCTION_PARAMETERS, zend_object *object, zend_class_entry *current_scope, zval *new_zval_object);
697+
PDO_API void php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAMETERS, zend_object *object, zend_class_entry *current_scope, zval *new_zval_object);
698698

699699
/* Normalization for fetching long param for driver attributes */
700700
PDO_API bool pdo_get_long_param(zend_long *lval, zval *value);

ext/pdo_dblib/pdo_dblib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,5 +245,5 @@ PHP_MINFO_FUNCTION(pdo_dblib)
245245

246246
PHP_METHOD(Pdo_Dblib, __construct)
247247
{
248-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
248+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
249249
}

ext/pdo_firebird/pdo_firebird.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
104104

105105
PHP_METHOD(Pdo_Firebird, __construct)
106106
{
107-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
107+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
108108
}
109109

110110
PHP_METHOD(Pdo_Firebird, getApiVersion)

ext/pdo_mysql/pdo_mysql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static const MYSQLND_REVERSE_API pdo_mysql_reverse_api = {
8787

8888
PHP_METHOD(Pdo_Mysql, __construct)
8989
{
90-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
90+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
9191
}
9292

9393
/* Returns the number of SQL warnings during the execution of the last statement */

ext/pdo_odbc/pdo_odbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ zend_ulong pdo_odbc_pool_mode = SQL_CP_ONE_PER_HENV;
6464

6565
PHP_METHOD(Pdo_Odbc, __construct)
6666
{
67-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
67+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
6868
}
6969

7070
/* {{{ PHP_MINIT_FUNCTION */

ext/pdo_pgsql/pdo_pgsql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ZEND_GET_MODULE(pdo_pgsql)
6060

6161
PHP_METHOD(Pdo_Pgsql, __construct)
6262
{
63-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
63+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
6464
}
6565

6666
/* Escape an identifier for insertion into a text field */

ext/pdo_sqlite/pdo_sqlite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static int php_sqlite_collation_callback(void *context, int string1_len, const v
371371

372372
PHP_METHOD(Pdo_Sqlite, __construct)
373373
{
374-
internal_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
374+
php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAM_PASSTHRU, Z_OBJ(EX(This)), execute_data->func->common.scope, NULL);
375375
}
376376

377377
PHP_METHOD(Pdo_Sqlite, createAggregate)

0 commit comments

Comments
 (0)