- or download this
typedef struct
{
int count;
char *str[];
} Edje_Message_String_Set;
- or download this
malloc( sizeof(Edje_Message_String_Set) + (count-1)*sizeof(char *) );
- or download this
Newx(message,1,EdjeMessageStringSet);
Renewc(message,count+2, char*,EdjeMessageStringSet);
if (message == NULL)
croak("Failed to allocate memory in _new function\n");
- or download this
void Newx(void* ptr, int nitems, type)
void* safemalloc(size_t size)
...
if (message == NULL)
croak("Failed to allocate memory in _new function\n");
// Of course should have checked this after the Newx().
- or download this
EdjeMessageStringSet* m = (EdjeMessageStringSet*) safemalloc( sizeof(E
+dje_Message_String_Set) + (count-1)*sizeof(char *) );
if (m == NULL)
croak("Failed to allocate memory in _new function\n");