svn: /pecl/rrd/trunk/ rrd.c

From: Date: Sun, 08 Aug 2010 14:46:16 +0000
Subject: svn: /pecl/rrd/trunk/ rrd.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-14553@lists.php.net to get a copy of this message
koubel Sun, 08 Aug 2010 14:46:16 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=301988 Log: rrd_error implemented Changed paths: U pecl/rrd/trunk/rrd.c 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) +{ + if (rrd_test_error()) { + RETVAL_STRING(rrd_get_error(), 1); + rrd_clear_error(); + } +} +/* }}} */ + /* {{{ */ static function_entry rrd_functions[] = { PHP_FE(rrd_update, arginfo_rrd_update) PHP_FE(rrd_create, arginfo_rrd_create) PHP_FE(rrd_graph, arginfo_rrd_graph) + PHP_FE(rrd_error, NULL) {NULL, NULL, NULL} }; /* }}} */

« previous php.pecl.cvs (#14553) next »