Skip to content

Commit

Permalink
Added arginfo to the functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mtorromeo committed Jan 28, 2021
1 parent 48d6fe0 commit 05e7c3e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions proctitle.c
Expand Up @@ -65,7 +65,11 @@ PHP_MINIT_FUNCTION(proctitle)
}
#endif

/* {{{ proto void setproctitle(string title)
ZEND_BEGIN_ARG_INFO_EX(arginfo_title, 0, 0, 1)
ZEND_ARG_INFO(0, title)
ZEND_END_ARG_INFO()

/*
* Changes the current process' title in system's list of processes
*/
PHP_FUNCTION(setproctitle)
Expand Down Expand Up @@ -113,10 +117,10 @@ PHP_FUNCTION(setthreadtitle)
*
* Every user visible function must have an entry in proctitle_functions[].
*/
static zend_function_entry proctitle_functions[] = {
PHP_FE(setproctitle, NULL)
static const zend_function_entry proctitle_functions[] = {
PHP_FE(setproctitle, arginfo_title)
#if HAVE_PRCTL
PHP_FE(setthreadtitle, NULL)
PHP_FE(setthreadtitle, arginfo_title)
#endif
{NULL, NULL, NULL} /* Must be the last line in proctitle_functions[] */
};
Expand Down

0 comments on commit 05e7c3e

Please sign in to comment.