/* Allocate a new object of kind specified by the name  */
int nl_object_alloc_name(const char *kind, struct nl_object **result)
/* Allocate a new object of kind specified by the name  */
int nl_object_alloc_name(const char *kind, struct nl_object **result)
{
	struct nl_cache_ops *ops;
	ops = nl_cache_ops_lookup(kind);
	if (!ops)
		return -NLE_OPNOTSUPP;
	if (!(*result = nl_object_alloc(ops->co_obj_ops)))
		return -NLE_NOMEM;
	return 0;
}