-
- Downloads
extmod/moductypes: Make sizeof() accept "layout" parameter.
sizeof() can work in two ways: a) calculate size of already instantiated structure ("sizeof variable") - in this case we already no layout; b) size of structure decsription ("sizeof type"). In the latter case, LAYOUT_NATIVE was assumed, but there should possibility to calculate size for other layouts too. So, with this patch, there're now 2 forms: uctypes.sizeof(struct) uctypes.sizeof(struct_desc, layout)
Loading
Please register or sign in to comment