Skip to content

Commit

Permalink
add comment about static usage
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Jan 9, 2016
1 parent 0eb644f commit e95e330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php_apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static zend_bool php_inc_updater(apc_cache_t* cache, apc_cache_entry_t* entry, v
struct php_inc_updater_args *args = (struct php_inc_updater_args*) data;

if (Z_TYPE(entry->val) == IS_LONG) {
static zval inc;
static zval inc; /* static to prevent optimization to register variable */

ZVAL_LONG(&inc, args->step);
fast_long_add_function(&entry->val, &entry->val, &inc);
Expand All @@ -549,7 +549,7 @@ static zend_bool php_dec_updater(apc_cache_t* cache, apc_cache_entry_t* entry, v
struct php_inc_updater_args *args = (struct php_inc_updater_args*) data;

if (Z_TYPE(entry->val) == IS_LONG) {
static zval inc;
static zval inc; /* static to prevent optimization to register variable */

ZVAL_LONG(&inc, args->step);
fast_long_sub_function(&entry->val, &entry->val, &inc);
Expand Down

0 comments on commit e95e330

Please sign in to comment.