#undef PHP_PQ_TYPE
#include "php_pq_type.h"
+/* convert version to string */
+extern void php_pq_version_to_string(int version, char *buffer, int len) {
+ if (version < 100000) {
+ slprintf(buffer, len, "%d.%d.%d", version/10000, version/100%100, version%100);
+ } else { /* since version 10 */
+ slprintf(buffer, len, "%d.%d", version/10000, version%100);
+ }
+}
/* clear result object associated with a result handle */
void php_pqres_clear(PGresult *r) {
#define ai_pqdt_jsonserialize ai_pqdt_to_string
#endif
+#if PHP_VERSION_ID >= 80200
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_pqdt_to_string, 0, 0, IS_STRING, 0)
+#else
ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_to_string, 0, 0, 0)
+#endif
ZEND_END_ARG_INFO();
static PHP_METHOD(pqdt, __toString)
{