cgen: cleanup vinit_string_literals, _vcleanup and reload_so declarations

pull/12288/head
Delyan Angelov 2021-10-24 15:29:36 +03:00
parent 242b99340d
commit c340906280
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 3 additions and 5 deletions

View File

@ -595,7 +595,7 @@ pub fn (mut g Gen) init() {
g.stringliterals.writeln('') g.stringliterals.writeln('')
g.stringliterals.writeln('// >> string literal consts') g.stringliterals.writeln('// >> string literal consts')
if g.pref.build_mode != .build_module { if g.pref.build_mode != .build_module {
g.stringliterals.writeln('void vinit_string_literals(){') g.stringliterals.writeln('void vinit_string_literals(void){')
} }
} }
if g.pref.compile_defines_all.len > 0 { if g.pref.compile_defines_all.len > 0 {
@ -6152,7 +6152,7 @@ fn (mut g Gen) write_init_function() {
} }
// //
fn_vcleanup_start_pos := g.out.len fn_vcleanup_start_pos := g.out.len
g.writeln('void _vcleanup() {') g.writeln('void _vcleanup(void) {')
if g.is_autofree { if g.is_autofree {
// g.writeln('puts("cleaning up...");') // g.writeln('puts("cleaning up...");')
reversed_table_modules := g.table.modules.reverse() reversed_table_modules := g.table.modules.reverse()

View File

@ -386,9 +386,8 @@ typedef int (*qsort_callback_func)(const void*, const void*);
//================================== GLOBALS =================================*/ //================================== GLOBALS =================================*/
int load_so(byteptr); int load_so(byteptr);
void reload_so();
void _vinit(int ___argc, voidptr ___argv); void _vinit(int ___argc, voidptr ___argv);
void _vcleanup(); void _vcleanup(void);
#define sigaction_size sizeof(sigaction); #define sigaction_size sizeof(sigaction);
#define _ARR_LEN(a) ( (sizeof(a)) / (sizeof(a[0])) ) #define _ARR_LEN(a) ( (sizeof(a)) / (sizeof(a[0])) )
@ -569,7 +568,6 @@ typedef __builtin_va_list va_list;
//================================== GLOBALS =================================*/ //================================== GLOBALS =================================*/
int load_so(byteptr); int load_so(byteptr);
void reload_so();
void _vinit(int ___argc, voidptr ___argv); void _vinit(int ___argc, voidptr ___argv);
void _vcleanup(); void _vcleanup();
#define sigaction_size sizeof(sigaction); #define sigaction_size sizeof(sigaction);