Skip to content

Commit 6c4e3c0

Browse files
authored
Use ZEND_API in zend_hrtime (php#13288)
This allows actually calling zend_hrtime() from extensions on Windows. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
1 parent 7d1637a commit 6c4e3c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Zend/zend_hrtime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131

3232
# define WIN32_LEAN_AND_MEAN
3333

34-
double zend_hrtime_timer_scale = .0;
34+
ZEND_API double zend_hrtime_timer_scale = .0;
3535

3636
#elif ZEND_HRTIME_PLATFORM_APPLE
3737

3838
# include <mach/mach_time.h>
3939
# include <string.h>
40-
mach_timebase_info_data_t zend_hrtime_timerlib_info = {
40+
ZEND_API mach_timebase_info_data_t zend_hrtime_timerlib_info = {
4141
.numer = 0,
4242
.denom = 1,
4343
};

Zend/zend_hrtime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ BEGIN_EXTERN_C()
6060

6161
#if ZEND_HRTIME_PLATFORM_WINDOWS
6262

63-
extern double zend_hrtime_timer_scale;
63+
ZEND_API extern double zend_hrtime_timer_scale;
6464

6565
#elif ZEND_HRTIME_PLATFORM_APPLE
6666

6767
# include <mach/mach_time.h>
6868
# include <string.h>
69-
extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
69+
ZEND_API extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
7070

7171
#endif
7272

0 commit comments

Comments
 (0)