> +#define ZVAL_ADDREF(pz) ++(pz)->refcount;
> +#define ZVAL_ADDREF_M(pz, count) (pz)->refcount += (count);
>
> "_M"? Doesn't seem to be self-descriptive..
It was supposed to stand for "multiple', but you're right that it's not very
clear.
> +#define ZVAL_ADDREF_NP(pz)
+#define ZVAL_ADDREF(pz)++(pz)->refcount;
+#define ZVAL_ADDREF_M(pz, count) (pz)->refcount += (count);
"_M"? Doesn't seem to be self-descriptive..
+#define ZVAL_ADDREF_NP(pz) ++(pz).refcount;
"_NP" ? "not pointer" ?
Most of the macros in the en
Hi,
Thanks for getting back to me quickly.
> > Was there some particular reason to remove those ()'s around the
> macros?
> > (usually they're there for a reason :)
The reason for doing this is that in GC code "++(pz)->refcount;" becomes
"++(pz)->refcount; (pz)->color__gc = GC_BLACK;". Those are
Was there some particular reason to remove those ()'s around the macros?
(usually they're there for a reason :)
Also, extra ; is not needed and doesn't conform to the style of other
PHP code. Macros usually don't need ; at the end.
Also, these:
+#define ZVAL_ADDREF(pz)
David Wang kirjoitti:
This patch is a simple, albeit widespread change that converts access
to zval.refcount, zval.is_ref, _object_store.refcount to macros. There
is no functional change to the code, but this will make it easier to
implement a garbage collector in the future.
Was there some par
This patch is a simple, albeit widespread change that converts access
to zval.refcount, zval.is_ref, _object_store.refcount to macros. There
is no functional change to the code, but this will make it easier to
implement a garbage collector in the future.
This patch was too large to attach to the