• Home
  • Raw
  • Download

Lines Matching refs:ops

42 struct nl_object *nl_object_alloc(struct nl_object_ops *ops)  in nl_object_alloc()  argument
46 if (ops->oo_size < sizeof(*new)) in nl_object_alloc()
49 new = calloc(1, ops->oo_size); in nl_object_alloc()
56 new->ce_ops = ops; in nl_object_alloc()
57 if (ops->oo_constructor) in nl_object_alloc()
58 ops->oo_constructor(new); in nl_object_alloc()
72 struct nl_cache_ops *ops; in nl_object_alloc_name() local
74 ops = nl_cache_ops_lookup(kind); in nl_object_alloc_name()
75 if (!ops) in nl_object_alloc_name()
78 if (!(*result = nl_object_alloc(ops->co_obj_ops))) in nl_object_alloc_name()
97 struct nl_object_ops *ops = obj_ops(obj); in nl_object_clone() local
101 new = nl_object_alloc(ops); in nl_object_clone()
105 size = ops->oo_size - doff; in nl_object_clone()
116 if (ops->oo_clone) { in nl_object_clone()
117 if (ops->oo_clone(new, obj) < 0) { in nl_object_clone()
121 } else if (size && ops->oo_free_data) in nl_object_clone()
135 struct nl_object_ops *ops = obj_ops(obj); in nl_object_free() local
143 if (ops->oo_free_data) in nl_object_free()
144 ops->oo_free_data(obj); in nl_object_free()
260 struct nl_object_ops *ops = obj_ops(a); in nl_object_identical() local
264 if (ops != obj_ops(b)) in nl_object_identical()
267 req_attrs = ops->oo_id_attrs; in nl_object_identical()
278 if (ops->oo_compare == NULL) in nl_object_identical()
281 return !(ops->oo_compare(a, b, req_attrs, 0)); in nl_object_identical()
298 struct nl_object_ops *ops = obj_ops(a); in nl_object_diff() local
300 if (ops != obj_ops(b) || ops->oo_compare == NULL) in nl_object_diff()
303 return ops->oo_compare(a, b, ~0, 0); in nl_object_diff()
317 struct nl_object_ops *ops = obj_ops(obj); in nl_object_match_filter() local
319 if (ops != obj_ops(filter) || ops->oo_compare == NULL) in nl_object_match_filter()
322 return !(ops->oo_compare(obj, filter, filter->ce_mask, in nl_object_match_filter()
341 struct nl_object_ops *ops = obj_ops(obj); in nl_object_attrs2str() local
343 if (ops->oo_attrs2str != NULL) in nl_object_attrs2str()
344 return ops->oo_attrs2str(attrs, buf, len); in nl_object_attrs2str()