Convert a few tvFoo functions to take parameters by reference

Since TypedValue::operator= is dangerous, something like
tvTeleport is usually what you want to use, but it doesn't work with
temporary TypedValues (e.g. return values of things like make_tv or
cellAdd), because it took the arguments by pointer.  This also means
we can change it to take parameters by value later without updating
callsites.  This diff does the tvDup family and changes tvTeleport to
tvCopy.  I'll gradually get the other ones done, but I just need these
for now to work with temporaries for changing SetOp to not use Variant
arithmetic.
Esse commit está contido em:
Jordan DeLong
2013-06-28 13:41:13 -07:00
commit de Sara Golemon
commit 8220a18060
18 arquivos alterados com 166 adições e 139 exclusões
+1 -1
Ver Arquivo
@@ -838,7 +838,7 @@ void HphpArray::compact(bool renumber /* = false */) {
}
static inline void elemConstruct(const TypedValue* fr, TypedValue* to) {
tvDupCell(tvToCell(fr), to);
cellDup(*tvToCell(fr), *to);
}
bool HphpArray::nextInsert(CVarRef data) {