You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I think cstructs are initialised like structs, with a reinterpret cast. Not sure atm. It is certainly the case if the fields are listed out out of order, the result corrupts memory. Memberwise initialisation should be used to ensure the correct members are initialised.
i think part of the reason is C89 provides no way to initialise a struct in an expression, which Felix has to do. However I think C++ now does and I think C99 designated initialisers could also be used possibly wrapped inside a C++ lambda, although exactly how a copy can be avoided I'm not sure.
Binding is complicated because it is split up in multiple places.
The text was updated successfully, but these errors were encountered:
Currently I think cstructs are initialised like structs, with a reinterpret cast. Not sure atm. It is certainly the case if the fields are listed out out of order, the result corrupts memory. Memberwise initialisation should be used to ensure the correct members are initialised.
i think part of the reason is C89 provides no way to initialise a struct in an expression, which Felix has to do. However I think C++ now does and I think C99 designated initialisers could also be used possibly wrapped inside a C++ lambda, although exactly how a copy can be avoided I'm not sure.
Binding is complicated because it is split up in multiple places.
The text was updated successfully, but these errors were encountered: