• Home
  • Raw
  • Download

Lines Matching refs:ops

55 struct nl_object *nl_object_alloc(struct nl_object_ops *ops)  in nl_object_alloc()  argument
59 if (ops->oo_size < sizeof(*new)) in nl_object_alloc()
62 new = calloc(1, ops->oo_size); in nl_object_alloc()
69 new->ce_ops = ops; in nl_object_alloc()
70 if (ops->oo_constructor) in nl_object_alloc()
71 ops->oo_constructor(new); in nl_object_alloc()
87 struct nl_cache_ops *ops; in nl_object_alloc_name() local
89 ops = nl_cache_ops_lookup_safe(kind); in nl_object_alloc_name()
90 if (!ops) in nl_object_alloc_name()
93 *result = nl_object_alloc(ops->co_obj_ops); in nl_object_alloc_name()
94 nl_cache_ops_put(ops); in nl_object_alloc_name()
114 struct nl_object_ops *ops; in nl_object_clone() local
121 ops = obj_ops(obj); in nl_object_clone()
122 new = nl_object_alloc(ops); in nl_object_clone()
126 size = ops->oo_size - doff; in nl_object_clone()
137 if (ops->oo_clone) { in nl_object_clone()
138 if (ops->oo_clone(new, obj) < 0) { in nl_object_clone()
142 } else if (size && ops->oo_free_data) in nl_object_clone()
157 struct nl_object_ops *ops = obj_ops(dst); in nl_object_update() local
159 if (ops->oo_update) in nl_object_update()
160 return ops->oo_update(dst, src); in nl_object_update()
173 struct nl_object_ops *ops; in nl_object_free() local
178 ops = obj_ops(obj); in nl_object_free()
186 if (ops->oo_free_data) in nl_object_free()
187 ops->oo_free_data(obj); in nl_object_free()
316 struct nl_object_ops *ops = obj_ops(a); in nl_object_identical() local
320 if (ops != obj_ops(b)) in nl_object_identical()
323 if (ops->oo_id_attrs_get) { in nl_object_identical()
324 int req_attrs_a = ops->oo_id_attrs_get(a); in nl_object_identical()
325 int req_attrs_b = ops->oo_id_attrs_get(b); in nl_object_identical()
329 } else if (ops->oo_id_attrs) { in nl_object_identical()
330 req_attrs = ops->oo_id_attrs; in nl_object_identical()
344 if (ops->oo_compare == NULL) in nl_object_identical()
347 return !(ops->oo_compare(a, b, req_attrs, ID_COMPARISON)); in nl_object_identical()
364 struct nl_object_ops *ops = obj_ops(a); in nl_object_diff64() local
366 if (ops != obj_ops(b) || ops->oo_compare == NULL) in nl_object_diff64()
369 return ops->oo_compare(a, b, ~0, 0); in nl_object_diff64()
408 struct nl_object_ops *ops = obj_ops(obj); in nl_object_match_filter() local
410 if (ops != obj_ops(filter) || ops->oo_compare == NULL) in nl_object_match_filter()
413 return !(ops->oo_compare(obj, filter, filter->ce_mask, in nl_object_match_filter()
432 struct nl_object_ops *ops = obj_ops(obj); in nl_object_attrs2str() local
434 if (ops->oo_attrs2str != NULL) in nl_object_attrs2str()
435 return ops->oo_attrs2str(attrs, buf, len); in nl_object_attrs2str()
466 struct nl_object_ops *ops = obj_ops(obj); in nl_object_keygen() local
468 if (ops->oo_keygen) in nl_object_keygen()
469 ops->oo_keygen(obj, hashkey, hashtbl_sz); in nl_object_keygen()
554 struct nl_object_ops *ops = obj_ops(obj); in nl_object_get_id_attrs() local
557 if (!ops) in nl_object_get_id_attrs()
560 if (ops->oo_id_attrs_get) in nl_object_get_id_attrs()
561 id_attrs = ops->oo_id_attrs_get(obj); in nl_object_get_id_attrs()
563 id_attrs = ops->oo_id_attrs; in nl_object_get_id_attrs()