void AutoDiscoveryClientImpl::update() { updateRef(client); for(std::list<DNSServiceRef>::iterator i = resolveRefs.begin(); i != resolveRefs.end(); ++i) { updateRef(*i); } for(std::list<DNSServiceRef>::iterator i = resolveRefsToDelete.begin(); i != resolveRefsToDelete.end(); ++i) { resolveRefs.remove(*i); } resolveRefsToDelete.clear(); }
ArrayData* PackedArray::SetRefStr(ArrayData* adIn, StringData* k, Variant& v, bool copy) { auto const mixed = copy ? ToMixedCopy(adIn) : ToMixed(adIn); // todo t2606310: key can't exist. use add/findForNewInsert return mixed->updateRef(k, v); }
ArrayData *ZendArray::setRef(CStrRef k, CVarRef v, bool copy) { if (UNLIKELY(copy)) { ZendArray *a = copyImpl(); a->updateRef(k.get(), v); return a; } updateRef(k.get(), v); return NULL; }
ArrayData *ZendArray::setRef(CVarRef k, CVarRef v, bool copy) { TypedValueAccessor tva = k.getTypedAccessor(); if (isIntKey(tva)) { if (UNLIKELY(copy)) { ZendArray *a = copyImpl(); a->updateRef(getIntKey(tva), v); return a; } updateRef(getIntKey(tva), v); return NULL; } else { ASSERT(k.isString()); StringData *sd = getStringKey(tva); if (UNLIKELY(copy)) { ZendArray *a = copyImpl(); a->updateRef(sd, v); return a; } updateRef(sd, v); return NULL; } }
ArrayData* PackedArray::SetRefInt(ArrayData* adIn, int64_t k, Variant& v, bool copy) { assert(checkInvariants(adIn)); if (size_t(k) == adIn->m_size) return AppendRef(adIn, v, copy); if (size_t(k) < adIn->m_size) { auto const ad = copy ? Copy(adIn) : adIn; tvBind(v.asRef(), &packedData(ad)[k]); return ad; } // todo t2606310: key can't exist. use add/findForNewInsert auto const mixed = copy ? ToMixedCopy(adIn) : ToMixed(adIn); mixed->updateRef(k, v); return mixed; }