Fix incompatible pointer types
authorRemi Collet <remi@remirepo.net>
Mon, 29 Jan 2024 15:47:49 +0000 (16:47 +0100)
committerRemi Collet <remi@php.net>
Mon, 29 Jan 2024 15:47:49 +0000 (16:47 +0100)
src/php_pqlob.c
src/php_pqres.c

index 0cb44a896875669ca4b4f5e42359117252b9a7a8..a419390119d1f7aa23b0e63f38f305b517b54da6 100644 (file)
@@ -169,7 +169,7 @@ static int php_pqlob_stream_flush(php_stream *stream)
        return SUCCESS;
 }
 
-static ZEND_RESULT_CODE php_pqlob_stream_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset)
+static ZEND_RESULT_CODE php_pqlob_stream_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset)
 {
        ZEND_RESULT_CODE rv = FAILURE;
        php_pqlob_object_t *obj = stream->abstract;
index e9de4631dc46ccf8d7c65aea2e38d9b90f5f25a8..c8262ac7e428b1b1dbb350572bd733e1e07942c7 100644 (file)
@@ -398,24 +398,24 @@ static zend_object_iterator_funcs php_pqres_iterator_funcs = {
 #endif
 };
 
-static inline ZEND_RESULT_CODE php_pqres_count_elements_ex(zend_object *object, long *count)
+static inline ZEND_RESULT_CODE php_pqres_count_elements_ex(zend_object *object, zend_long *count)
 {
        php_pqres_object_t *obj = PHP_PQ_OBJ(NULL, object);
 
        if (!obj->intern) {
                return FAILURE;
        } else {
-               *count = (long) PQntuples(obj->intern->res);
+               *count = (zend_long) PQntuples(obj->intern->res);
                return SUCCESS;
        }
 }
 #if PHP_VERSION_ID >= 80000
-static ZEND_RESULT_CODE php_pqres_count_elements(zend_object *object, long *count)
+static ZEND_RESULT_CODE php_pqres_count_elements(zend_object *object, zend_long *count)
 {
        return php_pqres_count_elements_ex(object, count);
 }
 #else
-static ZEND_RESULT_CODE php_pqres_count_elements(zval *object, long *count)
+static ZEND_RESULT_CODE php_pqres_count_elements(zval *object, zend_long *count)
 {
        return php_pqres_count_elements_ex(Z_OBJ_P(object), count);
 }