@@ -17,13 +17,13 @@ void web49_free_module(web49_module_t mod) {
1717 web49_section_t section = mod .sections [i ];
1818 switch (section .header .id ) {
1919 case WEB49_SECTION_ID_CUSTOM : {
20- web49_section_custom_t cur = section .custom_section ;
20+ web49_section_custom_t cur = section .section . custom ;
2121 web49_free (cur .name );
2222 web49_free (cur .payload );
2323 break ;
2424 }
2525 case WEB49_SECTION_ID_TYPE : {
26- web49_section_type_t cur = section .type_section ;
26+ web49_section_type_t cur = section .section . type ;
2727 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
2828 web49_section_type_entry_t ent = cur .entries [j ];
2929 web49_free (ent .params );
@@ -33,7 +33,7 @@ void web49_free_module(web49_module_t mod) {
3333 break ;
3434 }
3535 case WEB49_SECTION_ID_IMPORT : {
36- web49_section_import_t cur = section .import_section ;
36+ web49_section_import_t cur = section .section . import ;
3737 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
3838 web49_section_import_entry_t ent = cur .entries [j ];
3939 web49_free (ent .module_str );
@@ -43,22 +43,22 @@ void web49_free_module(web49_module_t mod) {
4343 break ;
4444 }
4545 case WEB49_SECTION_ID_FUNCTION : {
46- web49_section_function_t cur = section .function_section ;
46+ web49_section_function_t cur = section .section . function ;
4747 web49_free (cur .entries );
4848 break ;
4949 }
5050 case WEB49_SECTION_ID_TABLE : {
51- web49_section_table_t cur = section .table_section ;
51+ web49_section_table_t cur = section .section . table ;
5252 web49_free (cur .entries );
5353 break ;
5454 }
5555 case WEB49_SECTION_ID_MEMORY : {
56- web49_section_memory_t cur = section .memory_section ;
56+ web49_section_memory_t cur = section .section . memory ;
5757 web49_free (cur .entries );
5858 break ;
5959 }
6060 case WEB49_SECTION_ID_GLOBAL : {
61- web49_section_global_t cur = section .global_section ;
61+ web49_section_global_t cur = section .section . global ;
6262 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
6363 web49_section_global_entry_t ent = cur .entries [j ];
6464 web49_free_instr (ent .init_expr );
@@ -67,7 +67,7 @@ void web49_free_module(web49_module_t mod) {
6767 break ;
6868 }
6969 case WEB49_SECTION_ID_EXPORT : {
70- web49_section_export_t cur = section .export_section ;
70+ web49_section_export_t cur = section .section . export ;
7171 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
7272 web49_section_export_entry_t ent = cur .entries [j ];
7373 web49_free (ent .field_str );
@@ -79,7 +79,7 @@ void web49_free_module(web49_module_t mod) {
7979 break ;
8080 }
8181 case WEB49_SECTION_ID_ELEMENT : {
82- web49_section_element_t cur = section .element_section ;
82+ web49_section_element_t cur = section .section . element ;
8383 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
8484 web49_section_element_entry_t ent = cur .entries [j ];
8585 web49_free (ent .elems );
@@ -88,7 +88,7 @@ void web49_free_module(web49_module_t mod) {
8888 break ;
8989 }
9090 case WEB49_SECTION_ID_CODE : {
91- web49_section_code_t cur = section .code_section ;
91+ web49_section_code_t cur = section .section . code ;
9292 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
9393 web49_section_code_entry_t ent = cur .entries [j ];
9494 for (size_t k = 0 ; k < ent .num_instrs ; k ++ ) {
@@ -101,7 +101,7 @@ void web49_free_module(web49_module_t mod) {
101101 break ;
102102 }
103103 case WEB49_SECTION_ID_DATA : {
104- web49_section_data_t cur = section .data_section ;
104+ web49_section_data_t cur = section .section . data ;
105105 for (size_t j = 0 ; j < cur .num_entries ; j ++ ) {
106106 web49_free (cur .entries [j ].data );
107107 }
@@ -204,7 +204,7 @@ web49_section_t web49_module_get_section(web49_module_t mod, web49_section_id_t
204204uint32_t web49_module_num_func_imports (web49_module_t mod ) {
205205 for (size_t i = 0 ; i < mod .num_sections ; i ++ ) {
206206 if (mod .sections [i ].header .id == WEB49_SECTION_ID_IMPORT ) {
207- web49_section_import_t * pimport = & mod .sections [i ].import_section ;
207+ web49_section_import_t * pimport = & mod .sections [i ].section . import ;
208208 if (pimport -> num_func_imports == 0 ) {
209209 pimport -> num_func_imports = 1 ;
210210 for (size_t j = 0 ; j < pimport -> num_entries ; j ++ ) {
0 commit comments