Allocate an element of type
T as given by the first argument and initialize it with the remaining arguments, if any.
This supposes that the argument list is of the form
and that a function or macro named
T_init exists where
T_init is just the concatenation of the type name
T and `_init'. Thus
T must be a typename that consists of just one token: `signed' would work but `signed long' would not.
T_init function must have a signature that is compatible to one of
- it must accept a pointer to
T as a first argument
- it must be robust to the fact of receiving a null pointer through that first argument (indicating an error condition)
- it should return the same pointer
- it may accept additional arguments which may then be passed through from the call to P99_NEW
- value is a pointer to a newly allocated and initialized object of type
(T*)0 if the allocation failed.
- See also:
- P99_CALL_DEFARG if you want to provide default arguments to the
Definition at line 231 of file p99_new.h.
Referenced by at_quick_exit().