Skip to content

Commit b5b4cac

Browse files
committed
Rename docref0 to docref and improve related comments
1 parent 4c7cf99 commit b5b4cac

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

main/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ PHPAPI size_t php_printf(const char *format, ...)
962962
/* }}} */
963963

964964
/* {{{ php_verror */
965-
/* php_verror is called from php_error_docref<n> functions.
965+
/* php_verror is called from the php_error_docref function.
966966
* Its purpose is to unify error messages and automatically generate clickable
967967
* html error messages if correcponding ini setting (html_errors) is activated.
968968
* See: CODING_STANDARDS.md for details.
@@ -1163,9 +1163,9 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
11631163
}
11641164
/* }}} */
11651165

1166-
/* {{{ php_error_docref0 */
1167-
/* See: CODING_STANDARDS.md for details. */
1168-
PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...)
1166+
/* {{{ php_error_docref */
1167+
/* Generate an error which links to docref or the php.net documentation if docref is NULL */
1168+
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
11691169
{
11701170
va_list args;
11711171

main/php.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,13 @@ static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
341341
PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0);
342342

343343
/* PHPAPI void php_error(int type, const char *format, ...); */
344-
PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...)
344+
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
345345
PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
346346
#ifdef PHP_WIN32
347347
PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2);
348348
#endif
349349
END_EXTERN_C()
350350

351-
#define php_error_docref php_error_docref0
352-
353351
#define zenderror phperror
354352
#define zendlex phplex
355353

0 commit comments

Comments
 (0)