ftypes: Add FT_UINT_STRING to IS_FT_STRING() macro
This commit is contained in:
parent
e42a4de47c
commit
cbd3c44776
|
@ -629,8 +629,7 @@ fvalue_set_time(fvalue_t *fv, const nstime_t *value)
|
|||
void
|
||||
fvalue_set_string(fvalue_t *fv, const gchar *value)
|
||||
{
|
||||
ws_assert(IS_FT_STRING(fv->ftype->ftype) ||
|
||||
fv->ftype->ftype == FT_UINT_STRING);
|
||||
ws_assert(IS_FT_STRING(fv->ftype->ftype));
|
||||
ws_assert(fv->ftype->set_value.set_value_string);
|
||||
fv->ftype->set_value.set_value_string(fv, value);
|
||||
}
|
||||
|
@ -740,8 +739,7 @@ fvalue_get_time(fvalue_t *fv)
|
|||
const char *
|
||||
fvalue_get_string(fvalue_t *fv)
|
||||
{
|
||||
ws_assert(IS_FT_STRING(fv->ftype->ftype) ||
|
||||
fv->ftype->ftype == FT_UINT_STRING);
|
||||
ws_assert(IS_FT_STRING(fv->ftype->ftype));
|
||||
ws_assert(fv->ftype->get_value.get_value_string);
|
||||
return fv->ftype->get_value.get_value_string(fv);
|
||||
}
|
||||
|
|
|
@ -77,12 +77,15 @@ enum ftenum {
|
|||
(ft) == FT_INT16 || \
|
||||
(ft) == FT_INT24 || \
|
||||
(ft) == FT_INT32)
|
||||
|
||||
#define IS_FT_INT64(ft) \
|
||||
((ft) == FT_INT40 || \
|
||||
(ft) == FT_INT48 || \
|
||||
(ft) == FT_INT56 || \
|
||||
(ft) == FT_INT64)
|
||||
|
||||
#define IS_FT_INT(ft) (IS_FT_INT32(ft) || IS_FT_INT64(ft))
|
||||
|
||||
#define IS_FT_UINT32(ft) \
|
||||
((ft) == FT_CHAR || \
|
||||
(ft) == FT_UINT8 || \
|
||||
|
@ -90,17 +93,21 @@ enum ftenum {
|
|||
(ft) == FT_UINT24 || \
|
||||
(ft) == FT_UINT32 || \
|
||||
(ft) == FT_FRAMENUM)
|
||||
|
||||
#define IS_FT_UINT64(ft) \
|
||||
((ft) == FT_UINT40 || \
|
||||
(ft) == FT_UINT48 || \
|
||||
(ft) == FT_UINT56 || \
|
||||
(ft) == FT_UINT64)
|
||||
|
||||
#define IS_FT_UINT(ft) (IS_FT_UINT32(ft) || IS_FT_UINT64(ft))
|
||||
|
||||
#define IS_FT_TIME(ft) \
|
||||
((ft) == FT_ABSOLUTE_TIME || (ft) == FT_RELATIVE_TIME)
|
||||
|
||||
#define IS_FT_STRING(ft) \
|
||||
((ft) == FT_STRING || (ft) == FT_STRINGZ || (ft) == FT_STRINGZPAD || \
|
||||
(ft) == FT_STRINGZTRUNC)
|
||||
(ft) == FT_STRINGZTRUNC || (ft) == FT_UINT_STRING)
|
||||
|
||||
/* field types lengths */
|
||||
#define FT_ETHER_LEN 6
|
||||
|
|
Loading…
Reference in New Issue