Fix trunk due to merge messup
I apparently merged badly and then committed diffs in a bad order and broke trunk.
Esse commit está contido em:
@@ -164,6 +164,19 @@ void cellCastToInt64InPlace(Cell* cell) {
|
||||
tvDecRefStr(cell);
|
||||
break;
|
||||
}
|
||||
case KindOfArray:
|
||||
i = cell->m_data.parr->empty() ? 0 : 1;
|
||||
tvDecRefArr(cell);
|
||||
break;
|
||||
case KindOfObject:
|
||||
i = cell->m_data.pobj->o_toInt64();
|
||||
tvDecRefObj(cell);
|
||||
break;
|
||||
default:
|
||||
not_reached();
|
||||
}
|
||||
cell->m_data.num = i;
|
||||
cell->m_type = KindOfInt64;
|
||||
}
|
||||
|
||||
void tvCastToInt64InPlace(TypedValue* tv) {
|
||||
|
||||
@@ -159,7 +159,7 @@ int64_t convStrToIntHelper(const StringData* s) {
|
||||
|
||||
int64_t convCellToIntHelper(TypedValue tv) {
|
||||
// TODO call cellToInt directly from the TC.
|
||||
return cellToInt(tv);
|
||||
return cellToInt(&tv);
|
||||
}
|
||||
|
||||
ObjectData* convCellToObjHelper(TypedValue tv) {
|
||||
|
||||
@@ -643,7 +643,7 @@ template<KeyType keyType>
|
||||
inline int64_t castKeyToInt(TypedValue* key) {
|
||||
TypedValue scratch;
|
||||
initScratchKey<keyType>(scratch, key);
|
||||
return cellToInt(*tvToCell(key));
|
||||
return cellToInt(tvToCell(key));
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário