Skip to content

Commit

Permalink
Rename constant in C soruce code
Browse files Browse the repository at this point in the history
  • Loading branch information
hnw committed Dec 23, 2016
1 parent d267e4c commit bad5ffa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion php_timecop.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ PHP_METHOD(TimecopDateTime, setTimestamp);
#endif

typedef enum timecop_mode_t {
TIMECOP_MODE_NORMAL,
TIMECOP_MODE_REALTIME,
TIMECOP_MODE_FREEZE,
TIMECOP_MODE_TRAVEL
} timecop_mode_t;
Expand Down
8 changes: 4 additions & 4 deletions timecop_php5.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void timecop_globals_ctor(zend_timecop_globals *globals TSRMLS_DC) {
globals->func_override = 1;
globals->sync_request_time = 1;
globals->orig_request_time = NULL;
globals->timecop_mode = TIMECOP_MODE_NORMAL;
globals->timecop_mode = TIMECOP_MODE_REALTIME;
globals->freezed_timestamp = 0;
globals->travel_offset = 0;
globals->ce_DateTime = NULL;
Expand Down Expand Up @@ -366,7 +366,7 @@ PHP_RSHUTDOWN_FUNCTION(timecop)
restore_request_time(TSRMLS_C);
}

TIMECOP_G(timecop_mode) = TIMECOP_MODE_NORMAL;
TIMECOP_G(timecop_mode) = TIMECOP_MODE_REALTIME;

return SUCCESS;
}
Expand Down Expand Up @@ -684,7 +684,7 @@ static int fix_datetime_timestamp(zval **datetime_obj, zval *time, zval *timezon
zval now;
zval *orig_zonename;

if (TIMECOP_G(timecop_mode) == TIMECOP_MODE_NORMAL) {
if (TIMECOP_G(timecop_mode) == TIMECOP_MODE_REALTIME) {
return 0;
}

Expand Down Expand Up @@ -885,7 +885,7 @@ PHP_FUNCTION(timecop_travel)
Return to Time travel to specified timestamp */
PHP_FUNCTION(timecop_return)
{
TIMECOP_G(timecop_mode) = TIMECOP_MODE_NORMAL;
TIMECOP_G(timecop_mode) = TIMECOP_MODE_REALTIME;

if (TIMECOP_G(sync_request_time)){
restore_request_time(TSRMLS_C);
Expand Down
8 changes: 4 additions & 4 deletions timecop_php7.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void timecop_globals_ctor(zend_timecop_globals *globals) {
globals->func_override = 1;
globals->sync_request_time = 1;
ZVAL_NULL(&globals->orig_request_time);
globals->timecop_mode = TIMECOP_MODE_NORMAL;
globals->timecop_mode = TIMECOP_MODE_REALTIME;
globals->freezed_timestamp = 0;
globals->travel_offset = 0;
globals->ce_DateTime = NULL;
Expand Down Expand Up @@ -329,7 +329,7 @@ PHP_RSHUTDOWN_FUNCTION(timecop)
restore_request_time();
}

TIMECOP_G(timecop_mode) = TIMECOP_MODE_NORMAL;
TIMECOP_G(timecop_mode) = TIMECOP_MODE_REALTIME;

return SUCCESS;
}
Expand Down Expand Up @@ -646,7 +646,7 @@ static int fix_datetime_timestamp(zval *datetime_obj, zval *time, zval *timezone
zval now;
zval orig_zonename;

if (TIMECOP_G(timecop_mode) == TIMECOP_MODE_NORMAL) {
if (TIMECOP_G(timecop_mode) == TIMECOP_MODE_REALTIME) {
return 0;
}

Expand Down Expand Up @@ -833,7 +833,7 @@ PHP_FUNCTION(timecop_travel)
Return to Time travel to specified timestamp */
PHP_FUNCTION(timecop_return)
{
TIMECOP_G(timecop_mode) = TIMECOP_MODE_NORMAL;
TIMECOP_G(timecop_mode) = TIMECOP_MODE_REALTIME;

if (TIMECOP_G(sync_request_time)){
restore_request_time();
Expand Down

0 comments on commit bad5ffa

Please sign in to comment.