Skip to content

ext/tidy: simplify tidy_instantiate #18647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ext/tidy/tidy.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static zend_string *php_tidy_file_to_mem(const char *, bool);
static void tidy_object_free_storage(zend_object *);
static zend_object *tidy_object_new_node(zend_class_entry *);
static zend_object *tidy_object_new_doc(zend_class_entry *);
static zval *tidy_instantiate(zend_class_entry *, zval *);
static void tidy_instantiate(zend_class_entry *, zval *);
static zend_result tidy_doc_cast_handler(zend_object *, zval *, int);
static zend_result tidy_node_cast_handler(zend_object *, zval *, int);
static void tidy_doc_update_properties(PHPTidyObj *);
Expand Down Expand Up @@ -469,10 +469,9 @@ static zend_object *tidy_object_new_doc(zend_class_entry *class_type)
return tidy_object_new(class_type, &tidy_object_handlers_doc, is_doc);
}

static zval *tidy_instantiate(zend_class_entry *pce, zval *object)
static void tidy_instantiate(zend_class_entry *pce, zval *object)
{
object_init_ex(object, pce);
return object;
}

static zend_result tidy_doc_cast_handler(zend_object *in, zval *out, int type)
Expand Down