X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pq_misc.h;h=1285d8ecd30625513e3a6518388f07213dd0b630;hp=7ccda3e302b25a34bae39f5bbafd21ef00a2d208;hb=HEAD;hpb=320bae0144fab755d678317f7ec14f9cb3ae1869 diff --git a/src/php_pq_misc.h b/src/php_pq_misc.h index 7ccda3e..dab24ec 100644 --- a/src/php_pq_misc.h +++ b/src/php_pq_misc.h @@ -33,6 +33,8 @@ extern PGresult *php_pq_exec_params(PGconn *conn, const char *command, int nPara extern PGresult *php_pq_prepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes); extern PGresult *php_pq_exec_prepared(PGconn *conn, const char *stmtName, int nParams, const char *const * paramValues, const int *paramLengths, const int *paramFormats, int resultFormat); +/* convert version to string */ +extern void php_pq_version_to_string(int version, char *buffer, int len); /* trim LF from EOL */ extern char *php_pq_rtrim(char *e); @@ -75,7 +77,7 @@ extern int php_pq_compare_index(Bucket *lptr, Bucket *rptr); extern int php_pq_compare_index(const void *lptr, const void *rptr); -# define zend_ze_countable spl_ce_Countable +# define zend_ce_countable spl_ce_Countable # define php_pq_call_method(objval_ptr, method_name, num_args, ...) \ zend_call_method_with_ ## num_args ## _params( \ @@ -92,8 +94,16 @@ extern int php_pq_compare_index(const void *lptr, const void *rptr); SUCCESS == Z_OBJ_HT_P(objval_ptr)->cast_object(objval_ptr, (retval_ptr), (cast_type))) #endif +#if PHP_VERSION_ID < 80100 +# define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ + ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args) +# define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ + ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args) +#endif - +#ifndef ZEND_ACC_READONLY +#define ZEND_ACC_READONLY 0 +#endif extern PHP_MINIT_FUNCTION(pq_misc);