mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Fix errors in package win32
This commit is contained in:
+1
-2
@@ -53,9 +53,8 @@ compare :: inline proc "contextless" (a, b: []byte) -> int {
|
|||||||
return len(a) <= len(b) ? -1 : +1;
|
return len(a) <= len(b) ? -1 : +1;
|
||||||
} else if len(a) == 0 && len(b) == 0 {
|
} else if len(a) == 0 && len(b) == 0 {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
compare_byte_ptrs :: proc "contextless" (a, b: ^byte, n: int) -> int #no_bounds_check {
|
compare_byte_ptrs :: proc "contextless" (a, b: ^byte, n: int) -> int #no_bounds_check {
|
||||||
|
|||||||
@@ -214,17 +214,17 @@ consume_comment_group :: proc(p: ^Parser, n: int) -> (comments: ^ast.Comment_Gro
|
|||||||
for p.curr_tok.kind == .Comment &&
|
for p.curr_tok.kind == .Comment &&
|
||||||
p.curr_tok.pos.line <= end_line+n {
|
p.curr_tok.pos.line <= end_line+n {
|
||||||
comment: tokenizer.Token;
|
comment: tokenizer.Token;
|
||||||
comment, end_line = consume_comment(p);
|
comment, end_line = consume_comment(p);
|
||||||
append(&list, comment);
|
append(&list, comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(list) > 0 {
|
if len(list) > 0 {
|
||||||
comments = new(ast.Comment_Group);
|
comments = new(ast.Comment_Group);
|
||||||
comments.list = list[:];
|
comments.list = list[:];
|
||||||
append(&p.file.comments, comments);
|
append(&p.file.comments, comments);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
consume_comment_groups :: proc(p: ^Parser, prev: tokenizer.Token) {
|
consume_comment_groups :: proc(p: ^Parser, prev: tokenizer.Token) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ HKL :: distinct Handle;
|
|||||||
Wparam :: distinct Uint_Ptr;
|
Wparam :: distinct Uint_Ptr;
|
||||||
Lparam :: distinct Long_Ptr;
|
Lparam :: distinct Long_Ptr;
|
||||||
Lresult :: distinct Long_Ptr;
|
Lresult :: distinct Long_Ptr;
|
||||||
Wnd_Proc :: distinct #type proc "c" (Hwnd, u32, Wparam, Lparam) -> Lresult;
|
Wnd_Proc :: distinct #type proc "std" (Hwnd, u32, Wparam, Lparam) -> Lresult;
|
||||||
Monitor_Enum_Proc :: distinct #type proc "std" (Hmonitor, Hdc, ^Rect, Lparam) -> bool;
|
Monitor_Enum_Proc :: distinct #type proc "std" (Hmonitor, Hdc, ^Rect, Lparam) -> bool;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -136,8 +136,10 @@ foreign user32 {
|
|||||||
@(link_name="PeekMessageW") peek_message_w :: proc(msg: ^Msg, hwnd: Hwnd, msg_filter_min, msg_filter_max, remove_msg: u32) -> Bool ---;
|
@(link_name="PeekMessageW") peek_message_w :: proc(msg: ^Msg, hwnd: Hwnd, msg_filter_min, msg_filter_max, remove_msg: u32) -> Bool ---;
|
||||||
|
|
||||||
|
|
||||||
@(link_name="PostMessageA") post_message_a :: proc(hwnd: Hwnd, msg, wparam, lparam: u32) -> Bool ---;
|
@(link_name="PostMessageA") post_message_a :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Bool ---;
|
||||||
@(link_name="PostMessageW") post_message_w :: proc(hwnd: Hwnd, msg, wparam, lparam: u32) -> Bool ---;
|
@(link_name="PostMessageW") post_message_w :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Bool ---;
|
||||||
|
@(link_name="SendMessageA") send_message_a :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Bool ---;
|
||||||
|
@(link_name="SendMessageW") send_message_w :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Bool ---;
|
||||||
|
|
||||||
@(link_name="DefWindowProcA") def_window_proc_a :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Lresult ---;
|
@(link_name="DefWindowProcA") def_window_proc_a :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Lresult ---;
|
||||||
@(link_name="DefWindowProcW") def_window_proc_w :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Lresult ---;
|
@(link_name="DefWindowProcW") def_window_proc_w :: proc(hwnd: Hwnd, msg: u32, wparam: Wparam, lparam: Lparam) -> Lresult ---;
|
||||||
|
|||||||
Reference in New Issue
Block a user