Use ZEND_API in zend_hrtime (#13288)

This allows actually calling zend_hrtime() from extensions on Windows.

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
This commit is contained in:
Bob Weinand 2024-03-17 03:09:08 +01:00 committed by GitHub
parent 7d1637a48c
commit 6c4e3c0f52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -31,13 +31,13 @@
# define WIN32_LEAN_AND_MEAN
double zend_hrtime_timer_scale = .0;
ZEND_API double zend_hrtime_timer_scale = .0;
#elif ZEND_HRTIME_PLATFORM_APPLE
# include <mach/mach_time.h>
# include <string.h>
mach_timebase_info_data_t zend_hrtime_timerlib_info = {
ZEND_API mach_timebase_info_data_t zend_hrtime_timerlib_info = {
.numer = 0,
.denom = 1,
};

View File

@ -60,13 +60,13 @@ BEGIN_EXTERN_C()
#if ZEND_HRTIME_PLATFORM_WINDOWS
extern double zend_hrtime_timer_scale;
ZEND_API extern double zend_hrtime_timer_scale;
#elif ZEND_HRTIME_PLATFORM_APPLE
# include <mach/mach_time.h>
# include <string.h>
extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
ZEND_API extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
#endif