mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
Revert "Support for the printf optimisation for windows and wide strings"
This reverts commit acd28fa495
.
This commit is contained in:
parent
3e458a8801
commit
79be98d2fb
4 changed files with 7 additions and 27 deletions
|
@ -400,9 +400,7 @@ fn (p mut Parser) fn_decl() {
|
|||
p.genln('pthread_mutex_lock(&live_fn_mutex);')
|
||||
}
|
||||
if f.name == 'main' || f.name == 'WinMain' {
|
||||
p.genln('')
|
||||
p.genln('init_consts();')
|
||||
p.genln('#ifdef _WIN32\n fflush(stdout); _setmode(_fileno(stdout), _O_U8TEXT); \n#endif\n')
|
||||
if p.table.imports.contains('os') {
|
||||
if f.name == 'main' {
|
||||
p.genln('os__args = os__init_os_args(argc, argv);')
|
||||
|
@ -812,13 +810,7 @@ fn (p mut Parser) fn_call_args(f mut Fn) *Fn {
|
|||
T := p.table.find_type(typ)
|
||||
fmt := p.typ_to_fmt(typ, 0)
|
||||
if fmt != '' {
|
||||
// Fix for win32 unicode support
|
||||
if p.os == .windows || p.os == .msvc {
|
||||
//p.cgen.resetln(p.cgen.cur_line.replace('println (', '/*opt*/printf ("' + fmt + '\\n", '))
|
||||
p.cgen.resetln(p.cgen.cur_line.replace('println (', '/*opt*/wprintf (L"' + fmt.replace('%.*s', '%.*S') + '\\n", '))
|
||||
} else {
|
||||
p.cgen.resetln(p.cgen.cur_line.replace('println (', '/*opt*/printf ("' + fmt + '\\n", '))
|
||||
}
|
||||
p.cgen.resetln(p.cgen.cur_line.replace('println (', '/*opt*/printf ("' + fmt + '\\n", '))
|
||||
continue
|
||||
}
|
||||
if typ.ends_with('*') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue