|
|
ba7b08 |
diff -up rrdtool-1.4.4/php4/rrdtool.c.php54 rrdtool-1.4.4/php4/rrdtool.c
|
|
|
ba7b08 |
--- rrdtool-1.4.4/php4/rrdtool.c.php54 2011-12-29 08:57:00.790784347 +0100
|
|
|
ba7b08 |
+++ rrdtool-1.4.4/php4/rrdtool.c 2011-12-29 09:00:55.960794927 +0100
|
|
|
ba7b08 |
@@ -39,7 +39,7 @@
|
|
|
ba7b08 |
ZEND_DECLARE_MODULE_GLOBALS(rrdtool)
|
|
|
ba7b08 |
*/
|
|
|
ba7b08 |
|
|
|
ba7b08 |
-function_entry rrdtool_functions[] = {
|
|
|
ba7b08 |
+zend_function_entry rrdtool_functions[] = {
|
|
|
ba7b08 |
PHP_FE(rrd_graph, NULL)
|
|
|
ba7b08 |
PHP_FE(rrd_fetch, NULL)
|
|
|
ba7b08 |
PHP_FE(rrd_error, NULL)
|
|
|
ba7b08 |
@@ -119,8 +119,8 @@ PHP_MINFO_FUNCTION(rrdtool)
|
|
|
ba7b08 |
Creates a graph based on options passed via an array */
|
|
|
ba7b08 |
PHP_FUNCTION(rrd_graph)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval *file, *args, *p_argc;
|
|
|
ba7b08 |
- pval *entry;
|
|
|
ba7b08 |
+ zval *file, *args, *p_argc;
|
|
|
ba7b08 |
+ zval *entry;
|
|
|
ba7b08 |
zval *p_calcpr;
|
|
|
ba7b08 |
HashTable *args_arr;
|
|
|
ba7b08 |
int i, xsize, ysize, argc;
|
|
|
ba7b08 |
@@ -155,7 +155,7 @@ PHP_FUNCTION(rrd_graph)
|
|
|
ba7b08 |
|
|
|
ba7b08 |
for (i = 3; i < argc; i++)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval **dataptr;
|
|
|
ba7b08 |
+ zval **dataptr;
|
|
|
ba7b08 |
|
|
|
ba7b08 |
if ( zend_hash_get_current_data(args_arr, (void *) &dataptr) == FAILURE )
|
|
|
ba7b08 |
continue;
|
|
|
ba7b08 |
@@ -216,9 +216,8 @@ PHP_FUNCTION(rrd_graph)
|
|
|
ba7b08 |
Fetch info from an RRD file */
|
|
|
ba7b08 |
PHP_FUNCTION(rrd_fetch)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval *file, *args, *p_argc;
|
|
|
ba7b08 |
- pval *entry;
|
|
|
ba7b08 |
- pval *p_start, *p_end, *p_step, *p_ds_cnt;
|
|
|
ba7b08 |
+ zval *file, *args, *p_argc;
|
|
|
ba7b08 |
+ zval *entry;
|
|
|
ba7b08 |
HashTable *args_arr;
|
|
|
ba7b08 |
zval *p_ds_namv, *p_data;
|
|
|
ba7b08 |
int i, j, argc;
|
|
|
ba7b08 |
@@ -254,7 +253,7 @@ PHP_FUNCTION(rrd_fetch)
|
|
|
ba7b08 |
|
|
|
ba7b08 |
for (i = 3; i < argc; i++)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval **dataptr;
|
|
|
ba7b08 |
+ zval **dataptr;
|
|
|
ba7b08 |
|
|
|
ba7b08 |
if ( zend_hash_get_current_data(args_arr, (void *) &dataptr) == FAILURE )
|
|
|
ba7b08 |
continue;
|
|
|
ba7b08 |
@@ -361,7 +360,7 @@ PHP_FUNCTION(rrd_clear_error)
|
|
|
ba7b08 |
Update an RRD file with values specified */
|
|
|
ba7b08 |
PHP_FUNCTION(rrd_update)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval *file, *opt;
|
|
|
ba7b08 |
+ zval *file, *opt;
|
|
|
ba7b08 |
char **argv;
|
|
|
ba7b08 |
|
|
|
ba7b08 |
if ( rrd_test_error() )
|
|
|
ba7b08 |
@@ -404,7 +403,7 @@ PHP_FUNCTION(rrd_update)
|
|
|
ba7b08 |
Gets last update time of an RRD file */
|
|
|
ba7b08 |
PHP_FUNCTION(rrd_last)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval *file;
|
|
|
ba7b08 |
+ zval *file;
|
|
|
ba7b08 |
unsigned long retval;
|
|
|
ba7b08 |
|
|
|
ba7b08 |
char **argv = (char **) emalloc(3 * sizeof(char *));
|
|
|
ba7b08 |
@@ -439,8 +438,8 @@ PHP_FUNCTION(rrd_last)
|
|
|
ba7b08 |
Create an RRD file with the options passed (passed via array) */
|
|
|
ba7b08 |
PHP_FUNCTION(rrd_create)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval *file, *args, *p_argc;
|
|
|
ba7b08 |
- pval *entry;
|
|
|
ba7b08 |
+ zval *file, *args, *p_argc;
|
|
|
ba7b08 |
+ zval *entry;
|
|
|
ba7b08 |
char **argv;
|
|
|
ba7b08 |
HashTable *args_arr;
|
|
|
ba7b08 |
int argc, i;
|
|
|
ba7b08 |
@@ -449,7 +448,7 @@ PHP_FUNCTION(rrd_create)
|
|
|
ba7b08 |
rrd_clear_error();
|
|
|
ba7b08 |
|
|
|
ba7b08 |
if ( ZEND_NUM_ARGS() == 3 &&
|
|
|
ba7b08 |
- getParameters(ht, 3, &file, &args, &p_argc) == SUCCESS )
|
|
|
ba7b08 |
+ zend_get_parameters(ht, 3, &file, &args, &p_argc) == SUCCESS )
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
if ( args->type != IS_ARRAY )
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
@@ -473,7 +472,7 @@ PHP_FUNCTION(rrd_create)
|
|
|
ba7b08 |
|
|
|
ba7b08 |
for (i = 3; i < argc; i++)
|
|
|
ba7b08 |
{
|
|
|
ba7b08 |
- pval **dataptr;
|
|
|
ba7b08 |
+ zval **dataptr;
|
|
|
ba7b08 |
|
|
|
ba7b08 |
if ( zend_hash_get_current_data(args_arr, (void *) &dataptr) == FAILURE )
|
|
|
ba7b08 |
continue;
|