Skip to content

Commit

Permalink
Remove proto comments from C files
Browse files Browse the repository at this point in the history
Closes GH-5758
  • Loading branch information
MaxSem authored and kocsismate committed Jul 6, 2020
1 parent 4757998 commit 2b5de6f
Show file tree
Hide file tree
Showing 234 changed files with 3,892 additions and 8,084 deletions.
161 changes: 54 additions & 107 deletions Zend/zend_builtin_functions.c

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions Zend/zend_closures.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ static zend_bool zend_valid_closure_binding(
}
/* }}} */

/* {{{ proto mixed Closure::call(object to [, mixed parameter] [, mixed ...] )
Call closure, binding to a given object with its class as the scope */
/* {{{ Call closure, binding to a given object with its class as the scope */
ZEND_METHOD(Closure, call)
{
zval *newthis, closure_result;
Expand Down Expand Up @@ -187,8 +186,7 @@ ZEND_METHOD(Closure, call)
}
/* }}} */

/* {{{ proto Closure Closure::bind(callable old, object to [, mixed scope])
Create a closure from another one and bind to another object and scope */
/* {{{ Create a closure from another one and bind to another object and scope */
ZEND_METHOD(Closure, bind)
{
zval *newthis, *zclosure, *scope_arg = NULL;
Expand Down Expand Up @@ -323,8 +321,7 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
}
/* }}} */

/* {{{ proto Closure Closure::fromCallable(callable callable)
Create a closure from a callable using the current scope. */
/* {{{ Create a closure from a callable using the current scope. */
ZEND_METHOD(Closure, fromCallable)
{
zval *callable;
Expand Down Expand Up @@ -591,8 +588,7 @@ static HashTable *zend_closure_get_gc(zend_object *obj, zval **table, int *n) /*
}
/* }}} */

/* {{{ proto Closure::__construct()
Private constructor preventing instantiation */
/* {{{ Private constructor preventing instantiation */
ZEND_COLD ZEND_METHOD(Closure, __construct)
{
zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed");
Expand Down
39 changes: 13 additions & 26 deletions Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,15 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{
}
/* }}} */

/* {{{ proto Exception|Error Exception|Error::__clone()
Clone the exception object */
/* {{{ Clone the exception object */
ZEND_COLD ZEND_METHOD(Exception, __clone)
{
/* Should never be executable */
zend_throw_exception(NULL, "Cannot clone object using __clone()", 0);
}
/* }}} */

/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous])
Exception constructor */
/* {{{ Exception constructor */
ZEND_METHOD(Exception, __construct)
{
zend_string *message = NULL;
Expand Down Expand Up @@ -308,8 +306,7 @@ ZEND_METHOD(Exception, __construct)
}
/* }}} */

/* {{{ proto Exception::__wakeup()
Exception unserialize checks */
/* {{{ Exception unserialize checks */
#define CHECK_EXC_TYPE(id, type) \
pvalue = zend_read_property_ex(i_get_exception_base(object), (object), ZSTR_KNOWN(id), 1, &value); \
if (Z_TYPE_P(pvalue) != IS_NULL && Z_TYPE_P(pvalue) != type) { \
Expand All @@ -329,8 +326,7 @@ ZEND_METHOD(Exception, __wakeup)
}
/* }}} */

/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Throwable previous]]])
ErrorException constructor */
/* {{{ ErrorException constructor */
ZEND_METHOD(ErrorException, __construct)
{
zend_string *message = NULL, *filename = NULL;
Expand Down Expand Up @@ -380,8 +376,7 @@ ZEND_METHOD(ErrorException, __construct)
#define GET_PROPERTY_SILENT(object, id) \
zend_read_property_ex(i_get_exception_base(object), (object), ZSTR_KNOWN(id), 1, &rv)

/* {{{ proto string Exception|Error::getFile()
Get the file in which the exception occurred */
/* {{{ Get the file in which the exception occurred */
ZEND_METHOD(Exception, getFile)
{
zval *prop, rv;
Expand All @@ -393,8 +388,7 @@ ZEND_METHOD(Exception, getFile)
}
/* }}} */

/* {{{ proto int Exception|Error::getLine()
Get the line in which the exception occurred */
/* {{{ Get the line in which the exception occurred */
ZEND_METHOD(Exception, getLine)
{
zval *prop, rv;
Expand All @@ -406,8 +400,7 @@ ZEND_METHOD(Exception, getLine)
}
/* }}} */

/* {{{ proto string Exception|Error::getMessage()
Get the exception message */
/* {{{ Get the exception message */
ZEND_METHOD(Exception, getMessage)
{
zval *prop, rv;
Expand All @@ -419,8 +412,7 @@ ZEND_METHOD(Exception, getMessage)
}
/* }}} */

/* {{{ proto int Exception|Error::getCode()
Get the exception code */
/* {{{ Get the exception code */
ZEND_METHOD(Exception, getCode)
{
zval *prop, rv;
Expand All @@ -433,8 +425,7 @@ ZEND_METHOD(Exception, getCode)
}
/* }}} */

/* {{{ proto array Exception|Error::getTrace()
Get the stack trace for the location in which the exception occurred */
/* {{{ Get the stack trace for the location in which the exception occurred */
ZEND_METHOD(Exception, getTrace)
{
zval *prop, rv;
Expand All @@ -447,8 +438,7 @@ ZEND_METHOD(Exception, getTrace)
}
/* }}} */

/* {{{ proto int ErrorException::getSeverity()
Get the exception severity */
/* {{{ Get the exception severity */
ZEND_METHOD(ErrorException, getSeverity)
{
zval *prop, rv;
Expand Down Expand Up @@ -590,8 +580,7 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /*
}
/* }}} */

/* {{{ proto string Exception|Error::getTraceAsString()
Obtain the backtrace for the exception as a string (instead of an array) */
/* {{{ Obtain the backtrace for the exception as a string (instead of an array) */
ZEND_METHOD(Exception, getTraceAsString)
{
zval *trace, *frame, rv;
Expand Down Expand Up @@ -631,8 +620,7 @@ ZEND_METHOD(Exception, getTraceAsString)
}
/* }}} */

/* {{{ proto Throwable Exception|Error::getPrevious()
Return previous Throwable or NULL. */
/* {{{ Return previous Throwable or NULL. */
ZEND_METHOD(Exception, getPrevious)
{
zval rv;
Expand All @@ -642,8 +630,7 @@ ZEND_METHOD(Exception, getPrevious)
ZVAL_COPY(return_value, GET_PROPERTY_SILENT(ZEND_THIS, ZEND_STR_PREVIOUS));
} /* }}} */

/* {{{ proto string Exception|Error::__toString()
Obtain the string representation of the Exception object */
/* {{{ Obtain the string representation of the Exception object */
ZEND_METHOD(Exception, __toString)
{
zval trace, *exception;
Expand Down
24 changes: 8 additions & 16 deletions Zend/zend_generators.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,7 @@ static inline void zend_generator_rewind(zend_generator *generator) /* {{{ */
}
/* }}} */

/* {{{ proto void Generator::rewind()
* Rewind the generator */
/* {{{ Rewind the generator */
ZEND_METHOD(Generator, rewind)
{
zend_generator *generator;
Expand All @@ -842,8 +841,7 @@ ZEND_METHOD(Generator, rewind)
}
/* }}} */

/* {{{ proto bool Generator::valid()
* Check whether the generator is valid */
/* {{{ Check whether the generator is valid */
ZEND_METHOD(Generator, valid)
{
zend_generator *generator;
Expand All @@ -860,8 +858,7 @@ ZEND_METHOD(Generator, valid)
}
/* }}} */

/* {{{ proto mixed Generator::current()
* Get the current value */
/* {{{ Get the current value */
ZEND_METHOD(Generator, current)
{
zend_generator *generator, *root;
Expand All @@ -881,8 +878,7 @@ ZEND_METHOD(Generator, current)
}
/* }}} */

/* {{{ proto mixed Generator::key()
* Get the current key */
/* {{{ Get the current key */
ZEND_METHOD(Generator, key)
{
zend_generator *generator, *root;
Expand All @@ -902,8 +898,7 @@ ZEND_METHOD(Generator, key)
}
/* }}} */

/* {{{ proto void Generator::next()
* Advances the generator */
/* {{{ Advances the generator */
ZEND_METHOD(Generator, next)
{
zend_generator *generator;
Expand All @@ -918,8 +913,7 @@ ZEND_METHOD(Generator, next)
}
/* }}} */

/* {{{ proto mixed Generator::send(mixed value)
* Sends a value to the generator */
/* {{{ Sends a value to the generator */
ZEND_METHOD(Generator, send)
{
zval *value;
Expand Down Expand Up @@ -955,8 +949,7 @@ ZEND_METHOD(Generator, send)
}
/* }}} */

/* {{{ proto mixed Generator::throw(Exception exception)
* Throws an exception into the generator */
/* {{{ Throws an exception into the generator */
ZEND_METHOD(Generator, throw)
{
zval *exception;
Expand Down Expand Up @@ -993,8 +986,7 @@ ZEND_METHOD(Generator, throw)
}
/* }}} */

/* {{{ proto mixed Generator::getReturn()
* Retrieves the return value of the generator */
/* {{{ Retrieves the return value of the generator */
ZEND_METHOD(Generator, getReturn)
{
zend_generator *generator;
Expand Down
27 changes: 9 additions & 18 deletions Zend/zend_ini_parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ static int get_int_val(zval *op) {
}
}

/* {{{ zend_ini_do_op()
*/
/* {{{ zend_ini_do_op() */
static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
{
int i_result;
Expand Down Expand Up @@ -98,8 +97,7 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
}
/* }}} */

/* {{{ zend_ini_init_string()
*/
/* {{{ zend_ini_init_string() */
static void zend_ini_init_string(zval *result)
{
if (ZEND_SYSTEM_INI) {
Expand All @@ -110,8 +108,7 @@ static void zend_ini_init_string(zval *result)
}
/* }}} */

/* {{{ zend_ini_add_string()
*/
/* {{{ zend_ini_add_string() */
static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
{
int length, op1_len;
Expand Down Expand Up @@ -139,8 +136,7 @@ static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
}
/* }}} */

/* {{{ zend_ini_get_constant()
*/
/* {{{ zend_ini_get_constant() */
static void zend_ini_get_constant(zval *result, zval *name)
{
zval *c, tmp;
Expand All @@ -167,8 +163,7 @@ static void zend_ini_get_constant(zval *result, zval *name)
}
/* }}} */

/* {{{ zend_ini_get_var()
*/
/* {{{ zend_ini_get_var() */
static void zend_ini_get_var(zval *result, zval *name)
{
zval *curval;
Expand All @@ -187,8 +182,7 @@ static void zend_ini_get_var(zval *result, zval *name)
}
/* }}} */

/* {{{ ini_error()
*/
/* {{{ ini_error() */
static ZEND_COLD void ini_error(const char *msg)
{
char *error_buf;
Expand Down Expand Up @@ -217,8 +211,7 @@ static ZEND_COLD void ini_error(const char *msg)
}
/* }}} */

/* {{{ zend_parse_ini_file()
*/
/* {{{ zend_parse_ini_file() */
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg)
{
int retval;
Expand Down Expand Up @@ -246,8 +239,7 @@ ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_erro
}
/* }}} */

/* {{{ zend_parse_ini_string()
*/
/* {{{ zend_parse_ini_string() */
ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg)
{
int retval;
Expand All @@ -274,8 +266,7 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
}
/* }}} */

/* {{{ zval_ini_dtor()
*/
/* {{{ zval_ini_dtor() */
static void zval_ini_dtor(zval *zv)
{
if (Z_TYPE_P(zv) == IS_STRING) {
Expand Down

0 comments on commit 2b5de6f

Please sign in to comment.