(defn, preprocess=True, predefined_types=None, arch=None)
Parse a single function prototype and return its type
Parse a single function prototype and return its type
Parse a single function prototype and return its type
def parse_signature(defn, preprocess=True, predefined_types=None, arch=None):
    """
    Parse a single function prototype and return its type
    """
    try:
        parsed = parse_file(
            defn.strip(' \n\t;') + ';',
            preprocess=preprocess,
            predefined_types=predefined_types,
            arch=arch
        )
        return next(iter(parsed[0].values()))
    except StopIteration as e:
        raise ValueError("No declarations found") from e
def parse_signature ( defn , preprocess = True , predefined_types = None , arch = None ) : try : parsed = parse_file ( defn . strip ( ' \n\t;' ) + ';' , preprocess = preprocess , predefined_types = predefined_types , arch = arch ) return next ( iter ( parsed [ 0 ] . values ( ) ) ) except StopIteration as e : raise ValueError ( "No declarations found" ) from e