From 38ebb55c7c16486c2603f4df906444ee9d651ad4 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 17 Mar 2021 09:55:20 +0300 Subject: Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument) --- ext/zend_test/test.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ext/zend_test/test.c') diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index bd33e7c331..4e7f55d1b1 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -665,3 +665,17 @@ void bug79177(void) { bug79177_cb(); } + +typedef struct bug80847_01 { + uint64_t b; + double c; +} bug80847_01; +typedef struct bug80847_02 { + bug80847_01 a; +} bug80847_02; + +PHP_ZEND_TEST_API bug80847_02 ffi_bug80847(bug80847_02 s) { + s.a.b += 10; + s.a.c -= 10.0; + return s; +} -- cgit v1.2.1