Skip to content
Snippets Groups Projects
Commit 2411f42c authored by Paul Sokolovsky's avatar Paul Sokolovsky Committed by Damien George
Browse files

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)
parent 454cca60
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment