Re: svn: /pecl/rrd/trunk/ rrd.c
| From: | Johannes Schlüter | Date: | Sun, 08 Aug 2010 19:23:03 +0000 |
| Subject: | Re: svn: /pecl/rrd/trunk/ rrd.c | ||
| References: | 1 | Groups: | php.pecl.cvs |
| Request: | Send a blank email to pecl-cvs+get-14559@lists.php.net to get a copy of this message | ||
Hi,
short suggestion:
On Sun, 2010-08-08 at 14:46 +0000, Miroslav Kubelik wrote:
> Modified: pecl/rrd/trunk/rrd.c
> ===================================================================
> --- pecl/rrd/trunk/rrd.c 2010-08-08 14:10:55 UTC (rev 301987)
> +++ pecl/rrd/trunk/rrd.c 2010-08-08 14:46:16 UTC (rev 301988)
> @@ -27,11 +27,25 @@
> #include "rrd_create.h"
> #include "rrd_update.h"
>
> +/* {{{ proto string rrd_error()
> +Get the error message set by the last rrd tool function call, this function
> +clear error buffer also.
> +*/
> +PHP_FUNCTION(rrd_error)
> +{
I'd add a
if (zend_parse_parameters_none() == FAILURE) {
return;
}
here to avoid user mistakes. zend_parse_parameters_none() is a shortcut
macro added in 5.3, equal to zend_parse_parameters(ZEND_NUM_ARGS()
TSRMLS_CC, "")
> + if (rrd_test_error()) {
> + RETVAL_STRING(rrd_get_error(), 1);
> + rrd_clear_error();
> + }
> +}
johannes