@@ -36,11 +36,11 @@ SOFTWARE.
3636#include "ext/standard/info.h"
3737
3838#ifdef PHP_WIN32
39- # define PHP_TIMECOP_API __declspec(dllexport)
39+ # define PHP_TIMECOP_API __declspec(dllexport)
4040#elif defined(__GNUC__ ) && __GNUC__ >= 4
41- # define PHP_TIMECOP_API __attribute__ ((visibility("default")))
41+ # define PHP_TIMECOP_API __attribute__ ((visibility("default")))
4242#else
43- # define PHP_TIMECOP_API
43+ # define PHP_TIMECOP_API
4444#endif
4545
4646#ifdef ZTS
@@ -109,30 +109,30 @@ PHP_METHOD(Timecop, freeze);
109109PHP_METHOD (Timecop , travel );
110110
111111typedef enum timecop_mode_t {
112- TIMECOP_MODE_REALTIME ,
113- TIMECOP_MODE_FREEZE ,
114- TIMECOP_MODE_TRAVEL
112+ TIMECOP_MODE_REALTIME ,
113+ TIMECOP_MODE_FREEZE ,
114+ TIMECOP_MODE_TRAVEL
115115} timecop_mode_t ;
116116
117117ZEND_BEGIN_MODULE_GLOBALS (timecop )
118- long func_override ;
119- long sync_request_time ;
118+ long func_override ;
119+ long sync_request_time ;
120120#if PHP_MAJOR_VERSION >= 7
121- zval orig_request_time ;
121+ zval orig_request_time ;
122122#else
123- zval * orig_request_time ;
123+ zval * orig_request_time ;
124124#endif
125- timecop_mode_t timecop_mode ;
126- tc_timeval freezed_time ;
127- tc_timeval travel_origin ;
128- tc_timeval travel_offset ;
129- zend_long scaling_factor ;
130- zend_class_entry * ce_DateTimeZone ;
131- zend_class_entry * ce_DateTimeInterface ;
132- zend_class_entry * ce_DateTime ;
133- zend_class_entry * ce_TimecopDateTime ;
134- zend_class_entry * ce_DateTimeImmutable ;
135- zend_class_entry * ce_TimecopDateTimeImmutable ;
125+ timecop_mode_t timecop_mode ;
126+ tc_timeval freezed_time ;
127+ tc_timeval travel_origin ;
128+ tc_timeval travel_offset ;
129+ zend_long scaling_factor ;
130+ zend_class_entry * ce_DateTimeZone ;
131+ zend_class_entry * ce_DateTimeInterface ;
132+ zend_class_entry * ce_DateTime ;
133+ zend_class_entry * ce_TimecopDateTime ;
134+ zend_class_entry * ce_DateTimeImmutable ;
135+ zend_class_entry * ce_TimecopDateTimeImmutable ;
136136ZEND_END_MODULE_GLOBALS (timecop )
137137
138138#if ZEND_DEBUG
@@ -147,23 +147,23 @@ ZEND_END_MODULE_GLOBALS(timecop)
147147#define OVRD_CLASS_PREFIX "timecop"
148148
149149#define ORIG_FUNC_NAME (fname ) \
150- (TIMECOP_G(func_override) ? (SAVE_FUNC_PREFIX fname) : fname)
150+ (TIMECOP_G(func_override) ? (SAVE_FUNC_PREFIX fname) : fname)
151151
152152#define TIMECOP_OFE (fname ) {fname, OVRD_FUNC_PREFIX fname, SAVE_FUNC_PREFIX fname}
153153#define TIMECOP_OCE (cname , mname ) \
154- {cname, mname, OVRD_CLASS_PREFIX cname, SAVE_FUNC_PREFIX mname}
154+ {cname, mname, OVRD_CLASS_PREFIX cname, SAVE_FUNC_PREFIX mname}
155155
156156struct timecop_override_func_entry {
157- char * orig_func ;
158- char * ovrd_func ;
159- char * save_func ;
157+ char * orig_func ;
158+ char * ovrd_func ;
159+ char * save_func ;
160160};
161161
162162struct timecop_override_class_entry {
163- char * orig_class ;
164- char * orig_method ;
165- char * ovrd_class ;
166- char * save_method ;
163+ char * orig_class ;
164+ char * orig_method ;
165+ char * ovrd_class ;
166+ char * save_method ;
167167};
168168
169169static void timecop_globals_ctor (zend_timecop_globals * globals TSRMLS_DC );
@@ -226,35 +226,35 @@ static inline void _call_php_function_with_params(const char *function_name, zva
226226
227227#if PHP_MAJOR_VERSION >= 7
228228#define register_internal_class_ex (class_entry , parent_ce ) \
229- zend_register_internal_class_ex(class_entry, parent_ce)
229+ zend_register_internal_class_ex(class_entry, parent_ce)
230230#else
231231#define register_internal_class_ex (class_entry , parent_ce ) \
232- zend_register_internal_class_ex(class_entry, parent_ce, NULL TSRMLS_CC)
232+ zend_register_internal_class_ex(class_entry, parent_ce, NULL TSRMLS_CC)
233233#endif
234234
235235#define call_php_method_with_0_params (obj , ce , method_name , retval ) \
236- _call_php_method_with_0_params(obj, ce, method_name, retval TSRMLS_CC)
236+ _call_php_method_with_0_params(obj, ce, method_name, retval TSRMLS_CC)
237237
238- #define call_php_method_with_1_params (obj , ce , method_name , retval , arg1 ) \
239- _call_php_method_with_1_params(obj, ce, method_name, retval, arg1 TSRMLS_CC)
238+ #define call_php_method_with_1_params (obj , ce , method_name , retval , arg1 ) \
239+ _call_php_method_with_1_params(obj, ce, method_name, retval, arg1 TSRMLS_CC)
240240
241241#define call_php_method_with_2_params (obj , ce , method_name , retval , arg1 , arg2 ) \
242- _call_php_method_with_2_params(obj, ce, method_name, retval, arg1, arg2 TSRMLS_CC)
242+ _call_php_method_with_2_params(obj, ce, method_name, retval, arg1, arg2 TSRMLS_CC)
243243
244244#define call_php_function_with_0_params (function_name , retval ) \
245- _call_php_function_with_0_params(function_name, retval TSRMLS_CC)
245+ _call_php_function_with_0_params(function_name, retval TSRMLS_CC)
246246
247247#define call_php_function_with_1_params (function_name , retval , arg1 ) \
248- _call_php_function_with_1_params(function_name, retval, arg1 TSRMLS_CC)
248+ _call_php_function_with_1_params(function_name, retval, arg1 TSRMLS_CC)
249249
250250#define call_php_function_with_2_params (function_name , retval , arg1 , arg2 ) \
251- _call_php_function_with_2_params(function_name, retval, arg1, arg2 TSRMLS_CC)
251+ _call_php_function_with_2_params(function_name, retval, arg1, arg2 TSRMLS_CC)
252252
253253#define call_php_function_with_3_params (function_name , retval , arg1 , arg2 , arg3 ) \
254- _call_php_function_with_3_params(function_name, retval, arg1, arg2, arg3 TSRMLS_CC)
254+ _call_php_function_with_3_params(function_name, retval, arg1, arg2, arg3 TSRMLS_CC)
255255
256256#define call_php_function_with_params (function_name , retval , param_count , params ) \
257- _call_php_function_with_params(function_name, retval, param_count, params TSRMLS_CC)
257+ _call_php_function_with_params(function_name, retval, param_count, params TSRMLS_CC)
258258
259259/* In every utility function you add that needs to use variables
260260 in php_timecop_globals, call TSRMLS_FETCH(); after declaring other
@@ -279,7 +279,7 @@ static inline void _call_php_function_with_params(const char *function_name, zva
279279# endif
280280#endif
281281
282- #endif /* PHP_TIMECOP_H */
282+ #endif /* PHP_TIMECOP_H */
283283
284284/*
285285 * Local variables:
0 commit comments