Diff for /libelwix/inc/elwix/avar.h between versions 1.7 and 1.11

version 1.7, 2014/01/29 14:16:53 version 1.11, 2019/09/24 15:49:52
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004 - 2014Copyright 2004 - 2019
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 57  typedef enum { Line 57  typedef enum {
         i8, i16, i32, i64,              /* integers ... */          i8, i16, i32, i64,              /* integers ... */
 } ait_type_t;  } ait_type_t;
   
typedef struct {typedef struct __packed {
         uint8_t         val_type;          uint8_t         val_type;
         union {          union {
                 struct {                  struct {
Line 93  typedef struct { Line 93  typedef struct {
                 int64_t         i64;                  int64_t         i64;
         } val;          } val;
         uint8_t         val_data[0];          uint8_t         val_data[0];
} __packed ait_val_t;      /* sizeof 16 bytes */} /*__packed*/ ait_val_t;     /* sizeof 16 bytes */
   
 #define AIT_TYPE(_vl)                   ((ait_type_t) (_vl)->val_type)  #define AIT_TYPE(_vl)                   ((ait_type_t) (_vl)->val_type)
 #define AIT_LEN(_vl)                    (_vl)->val_len  #define AIT_LEN(_vl)                    (_vl)->val_len
Line 308  typedef struct { Line 308  typedef struct {
                                                                 break; \                                                                  break; \
                                                 } \                                                  } \
                                         } while (0)                                          } while (0)
   /* Additional helper macro, which can help about copy data variables */
 #define AIT_COPY_DATA(_vl, _v)          do { AIT_COPY_VAL((_vl), (_v)); \  #define AIT_COPY_DATA(_vl, _v)          do { AIT_COPY_VAL((_vl), (_v)); \
                                                 if (AIT_TYPE((_vl)) == data) \                                                  if (AIT_TYPE((_vl)) == data) \
                                                         AIT_SET_DATA((_vl), AIT_GET_DATA((_v)), \                                                          AIT_SET_DATA((_vl), AIT_GET_DATA((_v)), \
Line 318  typedef struct { Line 319  typedef struct {
                                                 .val_key = 0, .val_len = 0, \                                                  .val_key = 0, .val_len = 0, \
                                                 .val.net = 0LL \                                                  .val.net = 0LL \
                                         }                                          }
   #define AIT_VAL_INIT                    AIT_VAL_INITIALIZER()
 #define AIT_INIT_VAL(_vl)               (memset((_vl), 0, sizeof(ait_val_t)))  #define AIT_INIT_VAL(_vl)               (memset((_vl), 0, sizeof(ait_val_t)))
 #define AIT_INIT_VAL2(_vl, _t)          do { \  #define AIT_INIT_VAL2(_vl, _t)          do { \
                                                 AIT_INIT_VAL((_vl)); \                                                  AIT_INIT_VAL((_vl)); \

Removed from v.1.7  
changed lines
  Added in v.1.11


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