CE-Programming / toolchain

Toolchain and libraries for C/C++ programming on the TI-84+ CE calculator series
https://ce-programming.github.io/toolchain/index.html
GNU Lesser General Public License v3.0
527 stars 53 forks source link

includes: add names to some structs. #428

Closed adriweb closed 1 year ago

adriweb commented 1 year ago

Became "necessary" for the lua binding thing that didn't like anonymous structs.

I'm not sure which naming convention we should use, though, and maybe _ as prefix isn't great, but it's been used in some places before already so I used that too. We could also just use the_type_name for the struct name, and the typedef would still be the_type_name_t?

mateoconlechuga commented 1 year ago

I think the underscore is fine - it helps avoid conflict with user structs

adriweb commented 1 year ago

Alright.

I don't know what's up with the CI though, it builds fine for me and I'm not sure it's related since it's fasmg complaining. Can someone else check just in case?

runer112 commented 1 year ago

I'm most familiar with the convention typedef struct foo foo_t. If we didn't want that, I'd probably alternatively propose typedef struct foo_t foo_t.

adriweb commented 1 year ago

Oh I forgot that it was even possible to have both the struct name and the typedef be the same. Seems like it would be even better then?