1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os.v: clean up init_os_args()

This commit is contained in:
Alexander Medvednikov
2019-06-25 23:43:04 +02:00
parent 8417fec5dc
commit 2a3cf0bec9
3 changed files with 11 additions and 11 deletions

View File

@@ -345,10 +345,10 @@ fn (p mut Parser) fn_decl() {
p.genln('init_consts();')
if p.table.imports.contains('os') {
if f.name == 'main' {
p.genln('os__init_os_args(argc, argv);')
p.genln('os__args = os__init_os_args(argc, argv);')
}
else if f.name == 'WinMain' {
p.genln('os__parse_windows_cmd_line(pCmdLine);')
p.genln('os__args = os__parse_windows_cmd_line(pCmdLine);')
}
}
// We are in live code reload mode, call the .so loader in bg

View File

@@ -453,6 +453,9 @@ fn (p mut Parser) _check_types(got, expected string, throw bool) bool {
if got.eq('int') && expected.eq('byte') {
return true
}
if got.eq('byteptr') && expected.eq('byte*') {
return true
}
if got.eq('int') && expected.eq('byte*') {
return true
}