'new' : '_new',
'delete': '_delete'}
-_cardinal_types = ['CARD8', 'uint8_t',
- 'CARD16','uint16_t',
- 'CARD32','uint32_t',
- 'INT8', 'int8_t',
- 'INT16', 'int16_t',
- 'INT32', 'int32_t',
- 'BYTE',
- 'BOOL',
- 'char',
- 'void',
- 'float',
- 'double']
_hlines = []
_hlevel = 0
_clines = []
return _c_iterator_get_end(field.type.last_varsized_field, accum)
if field.type.is_list:
# XXX we can always use the first way
- if field.type.c_type in _cardinal_types:
+ if field.type.member.is_simple:
return field.c_end_name + '(' + accum + ')'
else:
return field.type.member.c_end_name + '(' + field.c_iterator_name + '(' + accum + '))'
'''
Declares the accessor functions for a non-list field that follows a variable-length field.
'''
- if field.field_type[0] in _cardinal_types:
+ if field.type.is_simple:
_hc('')
_hc('')
_hc('/*****************************************************************************')
_c(' return %s;', _c_accessor_get_expr(field.type.expr, 'R'))
_c('}')
- if field.field_type[0] in _cardinal_types:
+ if field.type.member.is_simple:
_hc('')
_hc('')
_hc('/*****************************************************************************')