本文整理汇总了C++中reseatable函数的典型用法代码示例。如果您正苦于以下问题:C++ reseatable函数的具体用法?C++ reseatable怎么用?C++ reseatable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了reseatable函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: innerArr
ArrayData*
ProxyArray::LvalInt(ArrayData* ad, int64_t k, Variant*& ret, bool copy) {
if (copy) {
return innerArr(ad)->lval(k, ret, true);
} else {
auto r = innerArr(ad)->lval(k, ret, innerArr(ad)->hasMultipleRefs());
reseatable(ad, r);
return ad;
}
}
示例2: innerArr
ArrayData*
ProxyArray::RemoveInt(ArrayData* ad, int64_t k, bool copy) {
if (copy) {
return innerArr(ad)->remove(k, true);
} else {
auto r = innerArr(ad)->remove(k, innerArr(ad)->cowCheck());
reseatable(ad, r);
return ad;
}
}
示例3: FatalErrorException
void ProxyArray::proxyInit(uint32_t nSize,
DtorFunc pDestructor, bool persistent) {
if (persistent) {
throw FatalErrorException("zend_hash_init: \"persistent\" is \
unimplemented");
}
if (nSize) {
reseatable(this, MixedArray::MakeReserve(nSize));
}
m_destructor = pDestructor;
}
示例4: innerArr
ArrayData*
ProxyArray::RemoveStr(ArrayData* ad, const StringData* k,
bool copy) {
if (copy) {
return innerArr(ad)->remove(k, true);
} else {
auto r = innerArr(ad)->remove(k, innerArr(ad)->hasMultipleRefs());
reseatable(ad, r);
return ad;
}
}
示例5: raise_fatal_error
void ProxyArray::proxyInit(uint32_t nSize,
DtorFunc pDestructor, bool persistent) {
if (persistent) {
raise_fatal_error("zend_hash_init: \"persistent\" is \
unimplemented");
}
if (nSize) {
reseatable(this, PackedArray::MakeReserve(nSize));
}
m_destructor = pDestructor;
}
示例6: innerArr
ArrayData* ProxyArray::SetRefStr(ArrayData* ad,
StringData* k,
Variant& v,
bool copy) {
if (copy) {
return innerArr(ad)->setRef(k, v, true);
}
auto const r = innerArr(ad)->setRef(k, v, innerArr(ad)->cowCheck());
reseatable(ad, r);
return ad;
}
示例7: innerArr
ArrayData* ProxyArray::SetRefInt(ArrayData* ad,
int64_t k,
Variant& v,
bool copy) {
if (copy) {
return innerArr(ad)->setRef(k, v, true);
} else {
auto r = innerArr(ad)->setRef(k, v, innerArr(ad)->cowCheck());
reseatable(ad, r);
return ad;
}
}
示例8: assert
void ProxyArray::proxyAppend(void* data, uint32_t data_size, void** dest) {
ArrayData * r;
if (hasZvalValues()) {
assert(data_size == sizeof(void*));
int64_t k = 0;
r = innerArr(this)->zAppend(*(RefData**)data, &k);
if (dest) {
*dest = (void*)(&r->nvGet(k)->m_data.pref);
}
} else {
auto v = Variant(makeElementResource(data, data_size, dest));
r = innerArr(this)->append(*v.asTypedValue(), false);
}
reseatable(this, r);
}
示例9: assert
void ProxyArray::proxyAppend(void* data, uint32_t data_size, void** dest) {
ArrayData * r;
if (hasZvalValues()) {
assert(data_size == sizeof(void*));
int64_t k = 0;
r = m_ad->zAppend(*(RefData**)data, &k);
if (dest) {
*dest = (void*)(&m_ad->nvGet(k)->m_data.pref);
}
} else {
ResourceData * elt = makeElementResource(data, data_size, dest);
r = m_ad->append(elt, false);
}
reseatable(this, r);
}
示例10: getSortFunction
void ProxyArray::Asort(ArrayData* ad, int sort_flags, bool ascending) {
auto const sf = getSortFunction(SORTFUNC_ASORT, ascending);
reseatable(ad, innerArr(ad)->escalateForSort(sf));
return innerArr(ad)->asort(sort_flags, ascending);
}
示例11: reseatable
bool ProxyArray::Uasort(ArrayData* ad, const Variant& cmp_function) {
reseatable(ad, innerArr(ad)->escalateForSort(SORTFUNC_UASORT));
return innerArr(ad)->uasort(cmp_function);
}
示例12: reseatable
bool ProxyArray::Usort(ArrayData* ad, const Variant& cmp_function) {
ad = reseatable(ad, innerArr(ad)->escalateForSort());
return innerArr(ad)->usort(cmp_function);
}