cgen: minor fixes

pull/4081/head
Alexander Medvednikov 2020-03-20 17:20:53 +01:00
parent 6b571155f4
commit 5a7f683f61
3 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,8 @@ pub fn parse_pref(args []string, callback fn(string, &Instance, &pref.Preference
args: args
current_pos: 0
}
tmp := p.parse_impl(args, voidptr(obj), void_cb(callback)) or {
//tmp := p.parse_impl(args, voidptr(obj), void_cb(callback)) or {
tmp := p.parse_impl(args, obj, void_cb(callback)) or {
return error(err)
}
return tmp
@ -40,7 +41,7 @@ pub fn parse_main_cmd(args []string, callback fn(string, &Instance, &MainCmdPref
args: args
current_pos: 0
}
tmp := p.parse_impl(args, voidptr(obj), void_cb(callback)) or {
tmp := p.parse_impl(args, obj, void_cb(callback)) or {
return error(err)
}
return tmp

View File

@ -26,7 +26,7 @@ const (
fn main() {
prefs := flag.MainCmdPreferences{}
values := flag.parse_main_cmd(os.args, parse_flags, &prefs) or {
values := flag.parse_main_cmd(os.args, parse_flags, prefs) or {
println('V Error: An error has occurred while parsing flags: ')
println(err)
exit(1)

View File

@ -346,7 +346,7 @@ fn (p mut Parser) fn_decl() {
if p.tok == .lt {
// instance (dispatch)
if p.generic_dispatch.inst.size > 0 {
rename_generic_fn_instance(mut f, &p.generic_dispatch)
rename_generic_fn_instance(mut f, p.generic_dispatch)
}
else {
f.is_generic = true