MCPcopy Create free account
hub / github.com/acl-dev/acl / push_back

Method push_back

lib_acl_cpp/src/stdlib/dbuf_pool.cpp:226–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226int dbuf_guard::push_back(dbuf_obj* obj)
227{
228 if (obj->nrefer_ < 1) {
229 if (obj->guard_ == NULL) {
230 obj->guard_ = this;
231 } else if (obj->guard_ != this) {
232 logger_fatal("obj->guard_(%p) != me(%p), nrefer: %d",
233 obj->guard_, this, obj->nrefer_);
234 }
235
236 if (curr_->size >= curr_->capacity) {
237 extend_objs();
238 }
239
240 curr_->objs[curr_->size] = obj;
241 obj->nrefer_++;
242 obj->pos_ = (int) size_++;
243 curr_->size++;
244 } else if (obj->guard_ != this) {
245 logger_fatal("obj->guard_(%p) != me(%p), nrefer: %d",
246 obj->guard_, this, obj->nrefer_);
247 }
248
249 return obj->pos_;
250}
251
252dbuf_obj* dbuf_guard::operator[](size_t pos) const
253{

Callers 15

get_attrsMethod · 0.45
get_attrsMethod · 0.45
first_attrMethod · 0.45
next_attrMethod · 0.45
first_childMethod · 0.45
next_childMethod · 0.45
acl_foreachFunction · 0.45
acl_foreachMethod · 0.45
lookupMethod · 0.45
diff_changesMethod · 0.45
acl_foreachFunction · 0.45
acl_foreachFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected