Skip to content

Commit

Permalink
Added function prototype information
Browse files Browse the repository at this point in the history
  • Loading branch information
pp3345 committed Feb 13, 2013
1 parent 8466004 commit 3bb57c9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 17 deletions.
6 changes: 4 additions & 2 deletions DeepTrace_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion DeepTrace_constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions DeepTrace_exit_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 9 additions & 3 deletions DeepTrace_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 8 additions & 4 deletions DeepTrace_methods.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
15 changes: 10 additions & 5 deletions DeepTrace_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3bb57c9

Please sign in to comment.