obj_new function <BLOC/object.h>

The obj_new function creates a new instance of a specified object type. All objects must be created using this call.

Syntax

void *
obj_new(
	struct ObjectType *type
);

Parameters

type

A pointer to the ObjectType structure describing the type of object being instantiated.

Return value

A pointer to the newly created object, initialised to zeros. The object has a single reference obtained, so there is no need to obtain one for the initial assignment.