summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pdo/pdo_dbh.c7
-rw-r--r--ext/pdo/pdo_stmt.c14
2 files changed, 3 insertions, 18 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 3ef312cbe0..316c9e3f97 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -1267,11 +1267,6 @@ out:
return fbc;
}
-static int dbh_compare(zval *object1, zval *object2)
-{
- return ZEND_UNCOMPARABLE;
-}
-
static HashTable *dbh_get_gc(zend_object *object, zval **gc_data, int *gc_count)
{
pdo_dbh_t *dbh = php_pdo_dbh_fetch_inner(object);
@@ -1300,7 +1295,7 @@ void pdo_dbh_init(void)
pdo_dbh_object_handlers.free_obj = pdo_dbh_free_storage;
pdo_dbh_object_handlers.clone_obj = NULL;
pdo_dbh_object_handlers.get_method = dbh_method_get;
- pdo_dbh_object_handlers.compare = dbh_compare;
+ pdo_dbh_object_handlers.compare = zend_objects_not_comparable;
pdo_dbh_object_handlers.get_gc = dbh_get_gc;
REGISTER_PDO_CLASS_CONST_LONG("PARAM_BOOL", (zend_long)PDO_PARAM_BOOL);
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 1cb7bfd65c..d630c31aef 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2072,11 +2072,6 @@ out:
return fbc;
}
-static int dbstmt_compare(zval *object1, zval *object2)
-{
- return ZEND_UNCOMPARABLE;
-}
-
zend_object_handlers pdo_dbstmt_object_handlers;
zend_object_handlers pdo_row_object_handlers;
@@ -2474,11 +2469,6 @@ static zend_string *row_get_classname(const zend_object *object)
return zend_string_init("PDORow", sizeof("PDORow") - 1, 0);
}
-static int row_compare(zval *object1, zval *object2)
-{
- return ZEND_UNCOMPARABLE;
-}
-
void pdo_row_free_storage(zend_object *std)
{
pdo_row_t *row = (pdo_row_t *)std;
@@ -2512,7 +2502,7 @@ void pdo_stmt_init(void)
pdo_dbstmt_object_handlers.write_property = dbstmt_prop_write;
pdo_dbstmt_object_handlers.unset_property = dbstmt_prop_delete;
pdo_dbstmt_object_handlers.get_method = dbstmt_method_get;
- pdo_dbstmt_object_handlers.compare = dbstmt_compare;
+ pdo_dbstmt_object_handlers.compare = zend_objects_not_comparable;
pdo_dbstmt_object_handlers.clone_obj = NULL;
pdo_row_ce = register_class_PDORow();
@@ -2536,5 +2526,5 @@ void pdo_stmt_init(void)
pdo_row_object_handlers.get_method = row_method_get;
pdo_row_object_handlers.get_constructor = row_get_ctor;
pdo_row_object_handlers.get_class_name = row_get_classname;
- pdo_row_object_handlers.compare = row_compare;
+ pdo_row_object_handlers.compare = zend_objects_not_comparable;
}