From 3bb57c9411b8ee2ac625006f6dab0928678d205b Mon Sep 17 00:00:00 2001 From: Yussuf Khalil Date: Wed, 13 Feb 2013 19:49:32 +0100 Subject: [PATCH] Added function prototype information --- DeepTrace_class.c | 6 ++++-- DeepTrace_constants.c | 3 ++- DeepTrace_exit_handler.c | 6 ++++-- DeepTrace_functions.c | 12 +++++++++--- DeepTrace_methods.c | 12 ++++++++---- DeepTrace_misc.c | 15 ++++++++++----- 6 files changed, 37 insertions(+), 17 deletions(-) diff --git a/DeepTrace_class.c b/DeepTrace_class.c index c0fccba..f26af36 100644 --- a/DeepTrace_class.c +++ b/DeepTrace_class.c @@ -21,7 +21,8 @@ #include "php_DeepTrace.h" -/* {{{ PHP_FUNCTION(dt_remove_class) */ +/* {{{ proto bool dt_remove_class(string className) + Deletes a PHP class */ PHP_FUNCTION(dt_remove_class) { DEEPTRACE_DECL_STRING_PARAM(className); @@ -46,7 +47,8 @@ PHP_FUNCTION(dt_remove_class) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_destroy_class_data) */ +/* {{{ proto bool dt_destroy_class_data(string className) + Destroys the data of a PHP class. */ PHP_FUNCTION(dt_destroy_class_data) { DEEPTRACE_DECL_STRING_PARAM(className); diff --git a/DeepTrace_constants.c b/DeepTrace_constants.c index df28e84..1191816 100644 --- a/DeepTrace_constants.c +++ b/DeepTrace_constants.c @@ -21,7 +21,8 @@ #include "php_DeepTrace.h" -/* {{{ PHP_FUNCTION(dt_remove_constant) */ +/* {{{ proto bool dt_remove_constant(string constantName) + Deletes a PHP constant */ PHP_FUNCTION(dt_remove_constant) { DEEPTRACE_DECL_STRING_PARAM(constantName); diff --git a/DeepTrace_exit_handler.c b/DeepTrace_exit_handler.c index 549f4be..1ff90a5 100644 --- a/DeepTrace_exit_handler.c +++ b/DeepTrace_exit_handler.c @@ -187,7 +187,8 @@ static int DeepTrace_exit_set_handler(user_opcode_handler_t handler, deeptrace_o } /* }}} */ -/* {{{ PHP_FUNCTION(dt_exit_mode) */ +/* {{{ proto bool dt_exit_mode(int exitMode [, callable handlerFunction[, string exceptionName]]) + Sets or resets the exit handling mode */ PHP_FUNCTION(dt_exit_mode) { long exitMode; DEEPTRACE_DECL_HANDLER_PARAM(handlerFunction); @@ -255,7 +256,8 @@ PHP_FUNCTION(dt_exit_mode) { } /* }}} */ -/* {{{ PHP_FUNCTION(dt_exit_fetch_exception) */ +/* {{{ proto dt_exit_fetch_exception() + Makes an exit exception an instance of the Exception class. */ PHP_FUNCTION(dt_exit_fetch_exception) { if(DEEPTRACE_G(exitMode) != DEEPTRACE_EXIT_EXCEPTION) return; if(!DEEPTRACE_G(exitException) || !DEEPTRACE_G(exitException)->parent) return; diff --git a/DeepTrace_functions.c b/DeepTrace_functions.c index ea41d33..eae6f31 100644 --- a/DeepTrace_functions.c +++ b/DeepTrace_functions.c @@ -182,7 +182,8 @@ void DeepTrace_clear_all_functions_runtime_cache(TSRMLS_D) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_rename_function) */ +/* {{{ proto bool dt_rename_function(string oldName, string newName) + Renames a function */ PHP_FUNCTION(dt_rename_function) { DEEPTRACE_DECL_STRING_PARAM(oldFuncName); @@ -253,7 +254,8 @@ PHP_FUNCTION(dt_rename_function) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_remove_function) */ +/* {{{ proto bool dt_remove_function(string functionName) + Removes a function */ PHP_FUNCTION(dt_remove_function) { DEEPTRACE_DECL_STRING_PARAM(functionName); @@ -294,6 +296,8 @@ PHP_FUNCTION(dt_remove_function) } /* }}} */ +/* {{{ proto bool dt_set_static_function_variable(string functionName, string variableName, mixed value) + Sets the value of a static variable inside a function */ PHP_FUNCTION(dt_set_static_function_variable) { DEEPTRACE_DECL_STRING_PARAM(functionName); @@ -343,8 +347,10 @@ PHP_FUNCTION(dt_set_static_function_variable) efree(functionName); RETURN_TRUE; } +/* }}} */ -/* {{{ PHP_FUNCTION(dt_destroy_function_data) */ +/* {{{ proto bool dt_destroy_function_data(string functionName) + Destroys the data of a function */ PHP_FUNCTION(dt_destroy_function_data) { DEEPTRACE_DECL_STRING_PARAM(functionName); diff --git a/DeepTrace_methods.c b/DeepTrace_methods.c index 01edbba..67aabde 100644 --- a/DeepTrace_methods.c +++ b/DeepTrace_methods.c @@ -394,7 +394,8 @@ void DeepTrace_methods_cleanup(TSRMLS_D) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_add_method) */ +/* {{{ proto bool dt_add_method(string className, string methodName, string argumentString, string phpCode [, int flags]) + Adds a method to a class */ PHP_FUNCTION(dt_add_method) { DEEPTRACE_DECL_STRING_PARAM(className); @@ -511,7 +512,8 @@ PHP_FUNCTION(dt_add_method) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_rename_method) */ +/* {{{ proto bool dt_rename_method(string className, string oldMethodName, string newMethodName) + Renames a method */ PHP_FUNCTION(dt_rename_method) { DEEPTRACE_DECL_STRING_PARAM(className); @@ -617,7 +619,8 @@ PHP_FUNCTION(dt_rename_method) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_remove_method) */ +/* {{{ proto bool dt_remove_method(string className, string methodName) + Removes a method from a class */ PHP_FUNCTION(dt_remove_method) { DEEPTRACE_DECL_STRING_PARAM(className); @@ -644,7 +647,8 @@ PHP_FUNCTION(dt_remove_method) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_set_static_method_variable) */ +/* {{{ proto bool dt_set_static_method_variable(string className, string methodName, string variableName, mixed value) + Sets the value of a static variable inside a method */ PHP_FUNCTION(dt_set_static_method_variable) { DEEPTRACE_DECL_STRING_PARAM(className); diff --git a/DeepTrace_misc.c b/DeepTrace_misc.c index 465e8f4..c7181e4 100644 --- a/DeepTrace_misc.c +++ b/DeepTrace_misc.c @@ -48,7 +48,8 @@ static zend_bool setproctitle(char *title, int title_len TSRMLS_DC) #endif /* }}} */ -/* {{{ PHP_FUNCTION(dt_set_proctitle) */ +/* {{{ proto bool dt_set_proctitle(string title) + Sets the title of the current process */ PHP_FUNCTION(dt_set_proctitle) { DEEPTRACE_DECL_STRING_PARAM(title); @@ -69,7 +70,8 @@ PHP_FUNCTION(dt_set_proctitle) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_phpinfo_mode) */ +/* {{{ proto bool dt_phpinfo_mode(bool phpInfoAsText) + Switches between text-only and HTML phpinfo() mode */ PHP_FUNCTION(dt_phpinfo_mode) { zend_bool phpinfoMode; @@ -83,7 +85,8 @@ PHP_FUNCTION(dt_phpinfo_mode) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_remove_include) */ +/* {{{ proto bool dt_remove_include(string includeName) + Removes a file from the list of included files */ PHP_FUNCTION(dt_remove_include) { DEEPTRACE_DECL_STRING_PARAM(includeName); @@ -110,7 +113,8 @@ PHP_FUNCTION(dt_remove_include) } /* }}} */ -/* {{{ PHP_FUNCTION(dt_inspect_zval) */ +/* {{{ proto dt_inspect_zval(mixed value) + Dumps refcount, type and memory address of a zval */ PHP_FUNCTION(dt_inspect_zval) { zval *val; @@ -164,7 +168,8 @@ static int DeepTrace_object_property_dump(zval **zv TSRMLS_DC, int num_args, va_ } /* }}} */ -/* {{{ PHP_FUNCTION(dt_debug_objects_store) */ +/* {{{ proto dt_debug_objects_store([int dumpObjects = 0]) + Lists all entries in the PHP objects store. Available only when PHP was compiled with --enable-debug */ PHP_FUNCTION(dt_debug_objects_store) { zend_objects_store store = EG(objects_store);