apnadkarni / tcl-cffi

A Foreign Function Interface extension for Tcl
BSD 2-Clause "Simplified" License
15 stars 2 forks source link

Only do automatic conversion of bitmask enums from member name to integer, not the other way #199

Closed apnadkarni closed 9 months ago

apnadkarni commented 9 months ago

Currently, bitmask enums returned from functions or struct fields are mapped to their symbolic names. This is not necessarily convenient for usage (and possibly unnecessarily inefficient). Might be better to accept them on input params and field store but not map them in the reverse direction.

For consistency, perhaps non-bitmask enums should behave the same way.