Skip to content

Commit

Permalink
Fix #1340
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Oct 8, 2013
1 parent 44d5c5b commit 2c7c1f8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions ext/kernel/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,12 @@ extern void PHALCON_FASTCALL phalcon_copy_ctor(zval *destiny, zval *origin);
}

#define PHALCON_SEPARATE_PARAM(z) \
{\
do { \
zval *orig_ptr = z;\
if (Z_REFCOUNT_P(orig_ptr) > 1) {\
phalcon_memory_observe(&z TSRMLS_CC);\
ALLOC_ZVAL(z);\
*z = *orig_ptr;\
zval_copy_ctor(z);\
Z_SET_REFCOUNT_P(z, 1);\
Z_UNSET_ISREF_P(z);\
}\
}
phalcon_memory_observe(&z TSRMLS_CC);\
ALLOC_ZVAL(z);\
*z = *orig_ptr;\
zval_copy_ctor(z);\
Z_SET_REFCOUNT_P(z, 1);\
Z_UNSET_ISREF_P(z);\
} while (0)

0 comments on commit 2c7c1f8

Please sign in to comment.