parent
b133ddcd09
commit
11e1e19799
|
@ -136,21 +136,20 @@ extern "C" {
|
|||
#define ECORE_IPC_DEC_EVAS_LIST_PROTO(x) static Evas_List *x(void *d, int s)
|
||||
#define ECORE_IPC_ENC_EVAS_LIST_PROTO(x) static void *x(Evas_List *lp, int *s)
|
||||
|
||||
|
||||
/* decoder setup - saves typing. requires data packet of exact size, or fail */
|
||||
#define ECORE_IPC_DEC_STRUCT_HEAD_EXACT(typ, x) \
|
||||
typ *p; \
|
||||
unsigned char *ptr; \
|
||||
p = (typ *)pp; \
|
||||
if (!d) return 0; \
|
||||
if (s != (x)) return 0; \
|
||||
if (!d) return 0; if (s != (x)) return 0; \
|
||||
ptr = d;
|
||||
/* decoder setup - saves typing. requires data packet of a minimum size */
|
||||
#define ECORE_IPC_DEC_STRUCT_HEAD_MIN(typ, x) \
|
||||
typ *p; \
|
||||
unsigned char *ptr; \
|
||||
p = (typ *)pp; \
|
||||
if (!d) return 0; \
|
||||
if (s < (x)) return 0; \
|
||||
if (!d) return 0; if (s < (x)) return 0; \
|
||||
ptr = d;
|
||||
/* footer for the hell of it */
|
||||
#define ECORE_IPC_DEC_STRUCT_FOOT() return 1
|
||||
|
@ -159,8 +158,9 @@ extern "C" {
|
|||
typ *p; \
|
||||
unsigned char *d, *ptr; \
|
||||
int len; \
|
||||
p = (typ *)pp; \
|
||||
*s = 0; \
|
||||
if(!pp) return NULL; \
|
||||
p = (typ *)pp; \
|
||||
len = sz; \
|
||||
d = malloc(len); \
|
||||
if (!d) return NULL; \
|
||||
|
|
Loading…
Reference in New Issue