mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- Fix prototype and memory leak
This commit is contained in:
parent
5d435cb831
commit
ff54d20b58
2 changed files with 6 additions and 2 deletions
|
@ -70,7 +70,7 @@ int phpdbg_is_class_method(const char *str, size_t len, char **class, char **met
|
||||||
return 1;
|
return 1;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
int phpdbg_print(int type TSRMLS_DC, const char *format, ...) /* {{{ */
|
void phpdbg_print(int type TSRMLS_DC, const char *format, ...) /* {{{ */
|
||||||
{
|
{
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -94,4 +94,8 @@ int phpdbg_print(int type TSRMLS_DC, const char *format, ...) /* {{{ */
|
||||||
PHPDBG_END_LINE(TSRMLS_D));
|
PHPDBG_END_LINE(TSRMLS_D));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buffer) {
|
||||||
|
efree(buffer);
|
||||||
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
|
@ -38,7 +38,7 @@ enum {
|
||||||
NOTICE
|
NOTICE
|
||||||
};
|
};
|
||||||
|
|
||||||
int phpdbg_print(int TSRMLS_DC, const char*, ...);
|
void phpdbg_print(int TSRMLS_DC, const char*, ...);
|
||||||
|
|
||||||
#define phpdbg_error(fmt, ...) phpdbg_print(ERROR TSRMLS_CC, fmt, ##__VA_ARGS__)
|
#define phpdbg_error(fmt, ...) phpdbg_print(ERROR TSRMLS_CC, fmt, ##__VA_ARGS__)
|
||||||
#define phpdbg_notice(fmt, ...) phpdbg_print(NOTICE TSRMLS_CC, fmt, ##__VA_ARGS__)
|
#define phpdbg_notice(fmt, ...) phpdbg_print(NOTICE TSRMLS_CC, fmt, ##__VA_ARGS__)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue