class SkipError(Exception):
pass
+class VaListSkipError(SkipError):
+ pass
class Names(object):
names = property(lambda self: self._names)
source_type = symbol.base_type
if (source_type.type == CTYPE_POINTER and
symbol.base_type.base_type.type == CTYPE_FUNCTION):
- node = self._create_callback(symbol)
+ try:
+ node = self._create_callback(symbol)
+ except VaListSkipError:
+ #this handles va_list members, and converts them
+ #to unwritable, unreadable void*
+ ftype = Type("any", "void*")
+ ftype = self.resolve_param_type(ftype)
+ node = Field(symbol.ident, ftype, ftype.name,
+ readable=False, writable=False, bits=symbol.const_int)
+
+
elif source_type.type == CTYPE_STRUCT and source_type.name is None:
node = self._create_struct(symbol, anonymous=True)
elif source_type.type == CTYPE_UNION and source_type.name is None:
def _create_type(self, source_type, is_param, is_retval):
ctype = self._create_source_type(source_type)
if ctype.startswith('va_list'):
- raise SkipError()
+ raise VaListSkipError()
# FIXME: FILE* should not be skipped, it should be handled
# properly instead
elif ctype == 'FILE*':