google / google/flatbuffers

Scalar Aliases?

Open
#5,597 20 comments 0 reactions 0 assignees View on GitHub
not-stale
Dominant language
C++
Stars
26.5k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to wrap an existing legacy C API in Flatbuffers to decouple logic.

Maybe I missed this, but is there anyway that I apply an alias (or typedef) to a internally-defined scalar to keep the naming of the objects consistent with the specification?

i.e. My existing C header files have a number of typedef's which define a contextually-named type e.g. "slotId" to a native size construct "unsigned long". I can't find a way to do that in FB without wrapping it in a struct, but now I have this pesky internal field I need to deal with.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.