[PECL-CVS] [pecl-processing-rrd] master: Fix incompatible pointer types (32-bit) + fix for PHP 8.5 (#4)

[email protected] (Remi Collet via GitHub)
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Remi Collet (remicollet)
Committer: GitHub (web-flow)
Pusher: MirKml
Date: 2026-08-16T21:58:44+02:00

Commit: https://github.com/php/pecl-processing-rrd/commit/451613d89a00b33d6feedf2bc351627fd8a0f5bd
Raw diff: https://github.com/php/pecl-processing-rrd/commit/451613d89a00b33d6feedf2bc351627fd8a0f5bd.diff

Fix incompatible pointer types (32-bit) + fix for PHP 8.5 (#4)

* Fix incompatible pointer types
* use Zend/zend_smart_string.h

Changed paths:
  M  rrd.c
  M  rrd_graph.c
  M  rrd_update.c


Diff:

diff --git a/rrd.c b/rrd.c
index 526f094..ff51776 100644
--- a/rrd.c
+++ b/rrd.c
@@ -12,7 +12,11 @@
 #endif
 
 #include "php.h"
+#if PHP_VERSION_ID < 70200
 #include "ext/standard/php_smart_string.h"
+#else
+#include "Zend/zend_smart_string.h"
+#endif
 #include "ext/standard/php_array.h"
 #include "ext/standard/info.h"
 
@@ -55,7 +59,7 @@ PHP_FUNCTION(rrd_fetch)
 	rrd_args *argv;
 	/* returned values if rrd_fetch doesn't fail */
 	time_t start, end;
-	zend_ulong step,
+	unsigned long step,
 	ds_cnt; /* count of data sources */
 	char **ds_namv; /* list of data source names */
 	rrd_value_t *ds_data; /* all data from all sources */
@@ -396,7 +400,7 @@ PHP_FUNCTION(rrd_xport)
 	/* return values from rrd_xport */
 	int xxsize;
 	time_t start, end, time_index;
-	zend_ulong step, outvar_count;
+	unsigned long step, outvar_count;
 	char **legend_v;
 	rrd_value_t *data, *data_ptr;
 	zval zv_data;
diff --git a/rrd_graph.c b/rrd_graph.c
index 96a47f4..0e43550 100644
--- a/rrd_graph.c
+++ b/rrd_graph.c
@@ -14,7 +14,11 @@
 
 #include "php.h"
 #include "zend_exceptions.h"
+#if PHP_VERSION_ID < 70200
 #include "ext/standard/php_smart_string.h"
+#else
+#include "Zend/zend_smart_string.h"
+#endif
 
 #include <rrd.h>
 
diff --git a/rrd_update.c b/rrd_update.c
index 1fc4573..e21c778 100644
--- a/rrd_update.c
+++ b/rrd_update.c
@@ -14,7 +14,11 @@
 
 #include "php.h"
 #include "zend_exceptions.h"
+#if PHP_VERSION_ID < 70200
 #include "ext/standard/php_smart_string.h"
+#else
+#include "Zend/zend_smart_string.h"
+#endif
 
 #include <rrd.h>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.