Logo Search packages:      
Sourcecode: m17n-lib version File versions  Download package

#define MTABLE_ALLOCA ( p,
size,
err   ) 

Value:

do {                                \
    int bytes = sizeof (*(p)) * (size);         \
    if (! ((p) = (void *) alloca (bytes)))      \
      MEMORY_FULL (err);                  \
    memset ((p), 0, bytes);               \
  } while (0)
The macro MTABLE_ALLOCA () allocates memory (by alloca) for an array of SIZE objects. The size of each object is determined by the type of P. Then, it sets P to the allocated memory. ERR must be one of enum MErrorCode. If the allocation fails, the macro MEMORY_FULL () is called with argument ERR.

Definition at line 127 of file internal.h.


Generated by  Doxygen 1.6.0   Back to index