Last active
December 18, 2015 16:59
-
-
Save kabbi/5815732 to your computer and use it in GitHub Desktop.
Inferno's native 'array of array of someAdt' example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ar = H2D(Array*, heaparray(&Tptr, nimports)); | |
ai = (Array**)ar->data; | |
for(i2 = m->ldt; *i2 != nil; i2++){ | |
nimports = 0; | |
for(i1 = *i2; i1->name != nil; i1++) | |
nimports++; | |
*ai = H2D(Array*, heaparray(Timport, nimports)); | |
li = (Loader_Import*)(*ai)->data; | |
for(i1 = *i2; i1->name != nil; i1++){ | |
li->name = c2string(i1->name, strlen(i1->name)); | |
li->sig = i1->sig; | |
li++; | |
} | |
ai++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment