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:
@@ -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
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user