X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=wrappergen%2Fwrite_jna.c;h=1739481ba1f8b6e1cd2df8e9ca53951a2b468529;hb=2d80323e46c8417fd471853ac2894fbeeb9728e5;hp=e99761b981ba98f9853c5cfbdbc2a4c0c96f2834;hpb=2ef7b77e92bd93fa2e3d487b91a24f55d299cdd7;p=cparser diff --git a/wrappergen/write_jna.c b/wrappergen/write_jna.c index e99761b..1739481 100644 --- a/wrappergen/write_jna.c +++ b/wrappergen/write_jna.c @@ -44,8 +44,6 @@ static pset_new_t avoid_symbols; static output_limit *output_limits; static const char *libname; -static void write_type(type_t *type); - static bool is_system_header(const char *fname) { if (strncmp(fname, "/usr/include", 12) == 0) @@ -225,12 +223,10 @@ static void write_type(type_t *type) write_enum_type(&type->enumt); return; case TYPE_ERROR: - case TYPE_INVALID: case TYPE_TYPEOF: case TYPE_TYPEDEF: panic("invalid type found"); case TYPE_ARRAY: - case TYPE_BITFIELD: case TYPE_REFERENCE: case TYPE_FUNCTION: case TYPE_COMPLEX: @@ -274,7 +270,7 @@ static void write_unary_expression(const unary_expression_t *expression) case EXPR_UNARY_NOT: fputc('!', out); break; - case EXPR_UNARY_CAST_IMPLICIT: + case EXPR_UNARY_CAST: write_expression(expression->value); return; default: @@ -538,6 +534,8 @@ void write_jna_decls(FILE *output, const translation_unit_t *unit) const char *input_name = entity->base.source_position.input_name; if (is_system_header(input_name)) continue; + if (entity->function.elf_visibility != ELF_VISIBILITY_DEFAULT) + continue; if (output_limits != NULL) { bool in_limits = false; for (output_limit *limit = output_limits; limit != NULL;