Conversation
Notices
-
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Thursday, 16-Nov-2023 00:10:47 JST Haelwenn /элвэн/ :triskell: Was wondering what the FILE type in C actually looks like, quick grep leads to a struct with only a shadowed char, interestingly not a pointer so only an 8bit identifier in most (all current?) architectures?
Could be different on other systems though.- Pleroma-tan likes this.
-
Embed this notice
Erin 💽 (erincandescent@queer.af)'s status on Thursday, 16-Nov-2023 00:32:44 JST Erin 💽 @lanodan it's opaque, generally a struct, implementation varies heavily
The most cursed implementation I know of is that glibc is saddled with an implementation which is a vtable for a C++ class according to the GCC 2.x ABI because the early C++ stdlib and glibc got a bit too close together
Haelwenn /элвэн/ :triskell: likes this. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Thursday, 16-Nov-2023 00:33:33 JST Haelwenn /элвэн/ :triskell: @erincandescent Yeah, I wouldn't depend on it working the same way across systems, it's just me wondering how it's implemented out of curiosity.