v.gen.c: remove unused g_str_buf

pull/10552/head
Delyan Angelov 2021-06-23 08:45:51 +03:00
parent 6736817bba
commit a588e50b47
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 0 additions and 11 deletions

View File

@ -5179,12 +5179,6 @@ fn (mut g Gen) write_init_function() {
fn_vinit_start_pos := g.out.len
// ___argv is declared as voidptr here, because that unifies the windows/unix logic
g.writeln('void _vinit(int ___argc, voidptr ___argv) {')
if g.is_autofree {
// Pre-allocate the string buffer
// s_str_buf_size := os.getenv('V_STRBUF_MB')
// mb_size := if s_str_buf_size == '' { 1 } else { s_str_buf_size.int() }
// g.writeln('g_str_buf = malloc( ${mb_size} * 1024 * 1000 );')
}
if g.pref.prealloc {
g.writeln('prealloc_vinit();')
}
@ -5223,7 +5217,6 @@ fn (mut g Gen) write_init_function() {
g.writeln('\t// Cleanups for module $mod_name :')
g.writeln(g.cleanups[mod_name].str())
}
// g.writeln('\tfree(g_str_buf);')
g.writeln('\tarray_free(&as_cast_type_indexes);')
}
g.writeln('}')

View File

@ -264,8 +264,6 @@ typedef int (*qsort_callback_func)(const void*, const void*);
#include <stdarg.h> // for va_list
//================================== GLOBALS =================================*/
//byte g_str_buf[1024];
byte* g_str_buf;
int load_so(byteptr);
void reload_so();
void _vinit(int ___argc, voidptr ___argv);
@ -464,8 +462,6 @@ typedef __builtin_va_list va_list;
#define va_copy(a, b) __builtin_va_copy(a, b)
//================================== GLOBALS =================================*/
//byte g_str_buf[1024];
byte* g_str_buf;
int load_so(byteptr);
void reload_so();
void _vinit(int ___argc, voidptr ___argv);