Skip to content

Commit ab80392

Browse files
authored
Cleanup DOM exception throwing parameters (#14330)
1 parent 1b78121 commit ab80392

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ext/dom/domexception.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Since:
3131
*/
3232

33-
void php_dom_throw_error_with_message(int error_code, char *error_message, bool strict_error) /* {{{ */
33+
void php_dom_throw_error_with_message(dom_exception_code error_code, const char *error_message, bool strict_error) /* {{{ */
3434
{
3535
if (strict_error) {
3636
zend_throw_exception(dom_domexception_class_entry, error_message, error_code);
@@ -41,9 +41,9 @@ void php_dom_throw_error_with_message(int error_code, char *error_message, bool
4141
/* }}} */
4242

4343
/* {{{ php_dom_throw_error */
44-
void php_dom_throw_error(int error_code, bool strict_error)
44+
void php_dom_throw_error(dom_exception_code error_code, bool strict_error)
4545
{
46-
char *error_message;
46+
const char *error_message;
4747

4848
switch (error_code)
4949
{

ext/dom/php_dom.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ zend_object *dom_nnodemap_objects_new(zend_class_entry *class_type);
130130
zend_object *dom_xpath_objects_new(zend_class_entry *class_type);
131131
#endif
132132
bool dom_get_strict_error(php_libxml_ref_obj *document);
133-
void php_dom_throw_error(int error_code, bool strict_error);
134-
void php_dom_throw_error_with_message(int error_code, char *error_message, bool strict_error);
133+
void php_dom_throw_error(dom_exception_code error_code, bool strict_error);
134+
void php_dom_throw_error_with_message(dom_exception_code error_code, const char *error_message, bool strict_error);
135135
void node_list_unlink(xmlNodePtr node);
136136
int dom_check_qname(char *qname, char **localname, char **prefix, int uri_len, int name_len);
137137
xmlNsPtr dom_get_ns(xmlNodePtr node, char *uri, int *errorcode, char *prefix);

0 commit comments

Comments
 (0)