Skip to content

Commit 8a26cbe

Browse files
committed
Remove unnecessary PDORow get_method / get_class_name handlers
These implement the default behavior, but badly.
1 parent a5ad9ee commit 8a26cbe

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

ext/pdo/pdo_stmt.c

-26
Original file line numberDiff line numberDiff line change
@@ -2443,36 +2443,12 @@ static HashTable *row_get_properties_for(zend_object *object, zend_prop_purpose
24432443
return props;
24442444
}
24452445

2446-
static zend_function *row_method_get(
2447-
zend_object **object_pp,
2448-
zend_string *method_name, const zval *key)
2449-
{
2450-
zend_function *fbc;
2451-
zend_string *lc_method_name;
2452-
2453-
lc_method_name = zend_string_tolower(method_name);
2454-
2455-
if ((fbc = zend_hash_find_ptr(&pdo_row_ce->function_table, lc_method_name)) == NULL) {
2456-
zend_string_release_ex(lc_method_name, 0);
2457-
return NULL;
2458-
}
2459-
2460-
zend_string_release_ex(lc_method_name, 0);
2461-
2462-
return fbc;
2463-
}
2464-
24652446
static zend_function *row_get_ctor(zend_object *object)
24662447
{
24672448
zend_throw_exception_ex(php_pdo_get_exception(), 0, "You may not create a PDORow manually");
24682449
return NULL;
24692450
}
24702451

2471-
static zend_string *row_get_classname(const zend_object *object)
2472-
{
2473-
return zend_string_init("PDORow", sizeof("PDORow") - 1, 0);
2474-
}
2475-
24762452
void pdo_row_free_storage(zend_object *std)
24772453
{
24782454
pdo_row_t *row = (pdo_row_t *)std;
@@ -2522,8 +2498,6 @@ void pdo_stmt_init(void)
25222498
pdo_row_object_handlers.has_dimension = row_dim_exists;
25232499
pdo_row_object_handlers.unset_dimension = row_dim_delete;
25242500
pdo_row_object_handlers.get_properties_for = row_get_properties_for;
2525-
pdo_row_object_handlers.get_method = row_method_get;
25262501
pdo_row_object_handlers.get_constructor = row_get_ctor;
2527-
pdo_row_object_handlers.get_class_name = row_get_classname;
25282502
pdo_row_object_handlers.compare = zend_objects_not_comparable;
25292503
}

0 commit comments

Comments
 (0)