Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

generates empty identifier when a member function name ends with _ #202

Description

@e0328eric

Let us consider following simple header file, call it foo.h.

#ifndef FOO_H_
#define FOO_H_

typedef struct {
    int a;
} Foo;

void foo_bar(Foo* foo);
void foo_baz_(Foo* foo);

#endif // FOO_H_

If we use translate-c this, it generates an empty identifier.

In the practical example, in the lua header lauxlib.h, it contains the following code (line 46, lua-5.4.8):

LUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver, size_t sz);

and translate-c generates an empty identifier.

I tested this on x86_64 windows with zig version 0.16.0-dev.747+493ad58ff

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions