Diff for /libaitio/inc/aitio.h between versions 1.15.2.2 and 1.15.2.3

version 1.15.2.2, 2012/03/27 21:37:56 version 1.15.2.3, 2012/03/27 22:31:37
Line 140  typedef struct { Line 140  typedef struct {
 #define AIT_GET_F32(_vl)                (assert((_vl)), assert(AIT_TYPE((_vl)) == f32), (_vl)->val.f32)  #define AIT_GET_F32(_vl)                (assert((_vl)), assert(AIT_TYPE((_vl)) == f32), (_vl)->val.f32)
 #define AIT_GET_F64(_vl)                (assert((_vl)), assert(AIT_TYPE((_vl)) == f64), (_vl)->val.f64)  #define AIT_GET_F64(_vl)                (assert((_vl)), assert(AIT_TYPE((_vl)) == f64), (_vl)->val.f64)
   
#define AIT_SET_DATA(_vl, _p, _len)     do { ait_val_t *__val = (_vl); assert(__val); \#define AIT_SET_DATA(_vl, _p, _len)     do { ait_val_t *__val = (_vl); \
                                                 __val = realloc(__val, sizeof(ait_val_t) + _len); \                                                  __val = realloc(__val, sizeof(ait_val_t) + _len); \
                                                 if (__val) { \                                                  if (__val) { \
                                                         __val->val_type = data; AIT_LEN(__val) = _len; \                                                          __val->val_type = data; AIT_LEN(__val) = _len; \
Line 213  typedef struct { Line 213  typedef struct {
   
                                         /* if attribute zeroCopy is set not execute free() */                                          /* if attribute zeroCopy is set not execute free() */
 #define AIT_FREE_VAL(_vl)               do { ait_val_t *__val = (_vl); assert(__val); \  #define AIT_FREE_VAL(_vl)               do { ait_val_t *__val = (_vl); assert(__val); \
                                                   if (AIT_TYPE(__val) == data) { \
                                                           free(__val); \
                                                           break; \
                                                   } \
                                                 switch (AIT_TYPE(__val)) { \                                                  switch (AIT_TYPE(__val)) { \
                                                         case buffer: \                                                          case buffer: \
                                                                 if (__val->val.buffer) { \                                                                  if (__val->val.buffer) { \
Line 226  typedef struct { Line 230  typedef struct {
                                                                         __val->val.string = NULL; \                                                                          __val->val.string = NULL; \
                                                                 } \                                                                  } \
                                                                 break; \                                                                  break; \
                                                         case data: \  
                                                                 __val = realloc(__val, sizeof(ait_val_t)); \  
                                                                 break; \  
                                                         default: \                                                          default: \
                                                                 break; \                                                                  break; \
                                                 } \                                                  } \
                                                if (__val) { \                                                __val->val_type = empty; \
                                                        __val->val_type = empty; \                                                AIT_LEN(__val) = 0; \
                                                        AIT_LEN(__val) = 0; \ 
                                                } \ 
                                         } while (0)                                          } while (0)
   
 struct io_ether_addr {  struct io_ether_addr {

Removed from v.1.15.2.2  
changed lines
  Added in v.1.15.2.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>