commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
7abd4cc03fce526366dd5fbe59012a6842adf24f
Kenny Kerr
2022-02-02T05:14:49
windows-implement refactor (#1489)
diff --git a/crates/libs/implement/src/implement.rs b/crates/libs/implement/src/implement.rs deleted file mode 100644 index 03424f5cc..000000000 --- a/crates/libs/implement/src/implement.rs +++ /dev/null @@ -1,380 +0,0 @@ -use std::collections::*; -use syn::parse::*; -use syn::Ident; -use syn::*; -use tokens::*; - -// ...
2
371
386
2c54231f912728390d6259941a2a9ec5a40211a1
Kenny Kerr
2022-01-31T22:17:43
Reliably handle Unicode string literals (#1480)
diff --git a/crates/libs/bindgen/src/helpers.rs b/crates/libs/bindgen/src/helpers.rs index de218f15e..1b894f169 100644 --- a/crates/libs/bindgen/src/helpers.rs +++ b/crates/libs/bindgen/src/helpers.rs @@ -201,6 +201,17 @@ pub fn gen_vtbl(def: &TypeDef, cfg: &Cfg, gen: &Gen) -> TokenStream { } } +fn gen_string_l...
1
16
2
a08019eecbf2ce237a924785ebaf26383d5e7c33
Kenny Kerr
2022-01-27T20:29:45
Remove comment
diff --git a/crates/libs/bindgen/src/implements.rs b/crates/libs/bindgen/src/implements.rs index 084764ba9..32b68f924 100644 --- a/crates/libs/bindgen/src/implements.rs +++ b/crates/libs/bindgen/src/implements.rs @@ -102,7 +102,6 @@ pub fn gen(def: &TypeDef, gen: &Gen) -> TokenStream { for method in def.methods(...
1
0
1
44f78049c8831897cd0955d54bc13a387d638d44
Kenny Kerr
2022-01-27T00:05:35
Remove dead code (#1467)
diff --git a/crates/libs/bindgen/src/functions.rs b/crates/libs/bindgen/src/functions.rs index 553161a43..affa12f02 100644 --- a/crates/libs/bindgen/src/functions.rs +++ b/crates/libs/bindgen/src/functions.rs @@ -38,10 +38,10 @@ pub fn gen_function(def: &MethodDef, gen: &Gen) -> TokenStream { } } -fn gen_functi...
19
27
143
130e3bf6ffa1d56ff7e41e52e8b41060d3df735d
Kenny Kerr
2022-01-26T00:27:56
Simpler error interop (#1462)
diff --git a/crates/libs/bindgen/src/extensions/win32_error.rs b/crates/libs/bindgen/src/extensions/win32_error.rs index be388f9d0..7f0121b76 100644 --- a/crates/libs/bindgen/src/extensions/win32_error.rs +++ b/crates/libs/bindgen/src/extensions/win32_error.rs @@ -4,7 +4,7 @@ pub fn gen() -> TokenStream { quote! {...
7
12
17
e0c7ed34c3ae7846a8ec623b52476447ca8153c5
Kenny Kerr
2022-01-14T13:56:10
Use correct lib for internal bindings (#1432)
diff --git a/crates/libs/windows/src/core/bindings.rs b/crates/libs/windows/src/core/bindings.rs index 4bd61737d..a37658769 100644 --- a/crates/libs/windows/src/core/bindings.rs +++ b/crates/libs/windows/src/core/bindings.rs @@ -1329,7 +1329,7 @@ pub const CLASS_E_CLASSNOTAVAILABLE: ::windows::core::HRESULT = ::windows...
2
21
21
4832678c6430602ae7c67db7a3302c7f46d0cccc
ComplexSpaces
2022-01-04T21:00:36
Add repository URLs to all library Cargo manifests (#1418)
diff --git a/crates/libs/bindgen/Cargo.toml b/crates/libs/bindgen/Cargo.toml index 9e28d94d5..db37fd9cf 100644 --- a/crates/libs/bindgen/Cargo.toml +++ b/crates/libs/bindgen/Cargo.toml @@ -5,6 +5,7 @@ authors = ["Microsoft"] edition = "2018" license = "MIT OR Apache-2.0" description = "Code gen support for the windo...
5
5
0
6f04b5a50bcc60b062849e94398df8f22ecec7b4
包布丁
2022-01-04T16:41:15
Add uwp targets (#1416) * add uwp targets * fix gen toml
diff --git a/crates/libs/sys/Cargo.toml b/crates/libs/sys/Cargo.toml index 7793e0b25..a1e1a7ebd 100644 --- a/crates/libs/sys/Cargo.toml +++ b/crates/libs/sys/Cargo.toml @@ -16,18 +16,33 @@ all-features = true [target.i686-pc-windows-msvc.dependencies] windows_i686_msvc = { path = "../../targets/i686_msvc", version = ...
9
70
5
7865fa15edd1d5fce0a6c01606e3cd4aed1755e8
Gary Guo
2021-12-17T17:42:08
Add missing `::` to `core` reference in macro (#1384)
diff --git a/crates/libs/macros/src/implement.rs b/crates/libs/macros/src/implement.rs index b89ba6927..5ddc4171e 100644 --- a/crates/libs/macros/src/implement.rs +++ b/crates/libs/macros/src/implement.rs @@ -168,7 +168,7 @@ pub fn gen(attribute: proc_macro::TokenStream, original_type: proc_macro::TokenS ...
1
3
3
23ff38bbbf46fb52460a9078b6292e250fb18157
Kenny Kerr
2021-11-19T23:48:28
Remove `windows-sys` dependency (#1350)
diff --git a/Cargo.toml b/Cargo.toml index 1690ac335..1dfea4bda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,8 +29,22 @@ exclude = ["crates/tests/component"] default-target = "x86_64-pc-windows-msvc" targets = [] +[target.i686-pc-windows-msvc.dependencies] +windows_i686_msvc = { path = "crates/targets/i686_msvc"...
2
30
2
3866b6d477a7d75836fd612a90a0f5eb78be0ab0
Kenny Kerr
2021-11-17T23:37:29
The `build` macro redirects to pre-packaged Windows APIs (#1338)
diff --git a/crates/deps/gen/src/build.rs b/crates/deps/gen/src/build.rs index a3b7873f3..d77154103 100644 --- a/crates/deps/gen/src/build.rs +++ b/crates/deps/gen/src/build.rs @@ -1,7 +1,15 @@ use super::*; pub fn gen_build() -> TokenStream { - let tokens = RawString(gen_source_tree().into_string()); + gen_b...
42
137
53
372556fb05cc4bc7b5cdfb5ea7a9832b92ab8aba
Kenny Kerr
2021-11-11T18:53:10
`std` and `alloc` improvements (#1309)
diff --git a/Cargo.toml b/Cargo.toml index 3c0fe493b..13f44f935 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,7 @@ windows_x86_64_gnu = { path = "crates/targets/x86_64_gnu", version = "0.26.0" } [features] default = [] std = [] +alloc = [] deprecated = [] build = ["windows_gen", "windows_macros", "windows_...
18
150
172
6a43a8f026a75dcd3caaa1afc859cb639c787e61
mbartlett21
2021-11-11T14:43:07
Fix comparing `&HSTRING` and `&str` (#1300)
diff --git a/crates/tests/runtime/tests/hstrings.rs b/crates/tests/runtime/tests/hstrings.rs index d5456de85..189c73317 100644 --- a/crates/tests/runtime/tests/hstrings.rs +++ b/crates/tests/runtime/tests/hstrings.rs @@ -77,3 +77,30 @@ fn hstring_to_string_lossy() { let s = h.to_string_lossy(); assert_eq!(s, ...
2
87
7
d841d50db136e3f92cad51681039312361fd57f3
Rafael Rivera
2021-11-10T16:19:26
Improve gen for dep crates, feature docs (#1278)
diff --git a/crates/deps/gen/src/gen.rs b/crates/deps/gen/src/gen.rs index e70d8d87b..f359983c1 100644 --- a/crates/deps/gen/src/gen.rs +++ b/crates/deps/gen/src/gen.rs @@ -3,15 +3,16 @@ use super::*; pub struct Gen { pub relative: &'static str, pub root: &'static str, + pub ignore_windows_features: bool,...
3
58
7
931b916a9466882e74c0f2482d9e4bfcea5d46aa
Kenny Kerr
2021-11-10T15:32:02
Add new tests to workspace (#1303)
diff --git a/Cargo.toml b/Cargo.toml index 811e2d825..df8f90ee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,8 @@ members = [ "crates/tests/legacy/*", "crates/tests/metadata/*", "crates/tests/winrt/*", - "crates/tests/win32/*" + "crates/tests/win32/*", + "crates/tests/runtime", ] excl...
6
92
90
58094dcf52d6cfdd16ae69dc2cdb6b1f8d5d051d
Rafael Rivera
2021-11-04T03:28:37
Fix windows_gen handling of external features (#1277)
diff --git a/crates/deps/gen/src/gen.rs b/crates/deps/gen/src/gen.rs index b2c89ef05..cf3cb82e6 100644 --- a/crates/deps/gen/src/gen.rs +++ b/crates/deps/gen/src/gen.rs @@ -124,7 +124,9 @@ impl Gen { continue; } - let feature = &feature[self.root.len() + 1..]; + let...
1
14
1
291ba353d042d0cad870ac117ad7981d9b1632cc
Kenny Kerr
2021-11-03T20:34:58
Minor clippy and cfg fixes (#1275)
diff --git a/crates/deps/gen/src/struct.rs b/crates/deps/gen/src/struct.rs index 596903fff..41b4407b9 100644 --- a/crates/deps/gen/src/struct.rs +++ b/crates/deps/gen/src/struct.rs @@ -116,6 +116,7 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr unsafe impl ::windows::ru...
17
25
2
5e9164701a355300d97548a7a36868560c2b934e
Marijn Suijten
2021-10-29T01:45:06
tools/api: Speed up fmt from 1min to 18s by writing to rustfmt stdin (#1254)
diff --git a/crates/tools/api/src/main.rs b/crates/tools/api/src/main.rs index 57d350445..a0e5eb7c0 100644 --- a/crates/tools/api/src/main.rs +++ b/crates/tools/api/src/main.rs @@ -24,17 +24,6 @@ fn main() { write_toml(&output, root); println!("Elapsed: {} ms", start.elapsed().as_millis()); - let start =...
2
18
13
df9ba969bd486e4bc52d0114838e34015be34d4d
Marijn Suijten
2021-10-28T20:47:38
Use forward- instead of backslashes for non-Windows OS-es (#1251)
diff --git a/Cargo.toml b/Cargo.toml index 1726cc28a..f60eb4f88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,14 @@ exclude = [".github", ".windows", "docs", "tests"] [workspace] members = [ - "crates/deps/*", - "crates/targets/*", - "crates/tools/*", - "crates/tests/legacy/*", - "crates...
5
22
20
427aa8ed7a03c372546405a02a0a7c100bc3786f
Kenny Kerr
2021-10-28T18:18:14
Avoid BSTR warnings and robust is_empty (#1249)
diff --git a/Cargo.toml b/Cargo.toml index b5a4dc3b1..5fec6b932 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ members = [ exclude = ["crates/tests/component"] [package.metadata.docs.rs] -all-features = true default-target = "x86_64-pc-windows-msvc" targets = [] diff --git a/crates/deps/gen/src/bstr...
10
112
94
f687137697350910de5b31f174d9940a16cb93f6
Kenny Kerr
2021-10-26T23:34:42
Version 0.22.1 (#1241)
diff --git a/Cargo.toml b/Cargo.toml index 33b8b58a5..b5a4dc3b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "windows" -version = "0.22.0" +version = "0.22.1" authors = ["Microsoft"] edition = "2018" license = "MIT OR Apache-2.0" @@ -28,19 +28,19 @@ default-target = "x86_64-pc-window...
12
31
31
bdec9d1205b184f3c552929400095053716d8602
Kenny Kerr
2021-10-26T16:47:46
Optimize docs (#1237)
diff --git a/Cargo.toml b/Cargo.toml index ad6cbeebb..33b8b58a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,9 @@ members = [ exclude = ["crates/tests/component"] [package.metadata.docs.rs] +all-features = true default-target = "x86_64-pc-windows-msvc" -targets = ["x86_64-pc-windows-msvc"] +targets = [] ...
3
6
2
dea28ab611696e23c5b7f7b4507edf1261a180ee
Kenny Kerr
2021-10-25T21:58:08
Avoid source generation for docs (#1233)
diff --git a/src/lib.rs b/src/lib.rs index 8cbe10b1f..7f9bfb0e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ where you can call them as if they were just another Rust module. Learn more here: <https://github.com/microsoft/windows-rs> */ +#![doc(html_no_source)] extern crate self as windows; mod Window...
1
1
0
65576e9332d56704af47affd793d6908bde9b81f
Kenny Kerr
2021-10-25T19:19:42
Minor doc cleanup for publishing (#1232)
diff --git a/src/runtime/hresult.rs b/src/runtime/hresult.rs index b21820064..8e1ce2c95 100644 --- a/src/runtime/hresult.rs +++ b/src/runtime/hresult.rs @@ -123,7 +123,7 @@ impl<T> std::convert::From<Result<T>> for HRESULT { } } -pub struct HeapString(*mut u16); +struct HeapString(*mut u16); impl Drop for He...
5
26
5
fd89ed90cfe6178626606f0364cd7e89dbe1a5cd
Kenny Kerr
2021-10-25T16:46:38
Favor structs over constants (#1230)
diff --git a/crates/gen/src/struct.rs b/crates/gen/src/struct.rs index 6d0c46ce2..8011f1ba3 100644 --- a/crates/gen/src/struct.rs +++ b/crates/gen/src/struct.rs @@ -60,14 +60,6 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr }; } - if let Some(guid) = GUID::from_at...
2
299
37
12d0d5376cdd7ff85a90ec15d3d7a5903986f3af
Kenny Kerr
2021-10-18T18:43:08
Pre-packaged API generator (#1216)
diff --git a/Cargo.toml b/Cargo.toml index 5cdfcdc27..c8e7ca454 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,4 +26,3 @@ targets = ["x86_64-pc-windows-msvc"] [features] default = ["macros"] macros = ["windows_gen", "windows_macros", "windows_reader"] -raw_dylib = ["windows_gen/raw_dylib"] # TODO: remove feature on...
24
505
84
884edbd1909297081391f0f84b35e828f5705780
Kenny Kerr
2021-10-11T20:42:25
Support arch-specific structs with nested type definitions (#1211)
diff --git a/crates/gen/src/constant.rs b/crates/gen/src/constant.rs index 2b84146d8..ef6406620 100644 --- a/crates/gen/src/constant.rs +++ b/crates/gen/src/constant.rs @@ -3,7 +3,7 @@ use super::*; pub fn gen_constant(def: &Field, gen: &Gen) -> TokenStream { let name = def.name(); let name = to_ident(name);...
18
147
168
d1f899937e5f3907702bb4043d81ed281c3c2f19
Kenny Kerr
2021-10-08T16:35:42
Multi-architecture support added to type reader (#1206)
diff --git a/crates/gen/src/struct.rs b/crates/gen/src/struct.rs index a66ffb76f..ee88b8533 100644 --- a/crates/gen/src/struct.rs +++ b/crates/gen/src/struct.rs @@ -19,7 +19,9 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr let signature = gen_sig(&signature, gen); ...
10
56
48
c22ab2f2798b84011c8877678d73676f826d6bb0
Kenny Kerr
2021-10-06T19:07:49
Simplify dependency tracking implementation (#1204)
diff --git a/crates/gen/src/bstr.rs b/crates/gen/src/bstr.rs index a706a9c82..857752ab9 100644 --- a/crates/gen/src/bstr.rs +++ b/crates/gen/src/bstr.rs @@ -20,24 +20,34 @@ pub fn gen_bstr() -> TokenStream { /// Returns the length of the string. pub fn len(&self) -> usize { + ...
11
138
205
08dcafe7bdcedd06e9ef5b2b510f783044620cc3
Kenny Kerr
2021-10-05T21:06:36
TokenStream optimization (#1202)
diff --git a/crates/gen/src/com_interface.rs b/crates/gen/src/com_interface.rs index 61605bf9a..377d67923 100644 --- a/crates/gen/src/com_interface.rs +++ b/crates/gen/src/com_interface.rs @@ -32,7 +32,7 @@ pub fn gen_com_interface(def: &TypeDef, gen: &Gen, include: TypeInclude) -> Toke gen_method(base...
10
26
21
ea1cec7803d4ec0f1637d928f80cad181d680bbb
Kenny Kerr
2021-10-05T17:31:30
Faster type reader (#1201)
diff --git a/crates/reader/src/file.rs b/crates/reader/src/file.rs index 895004e4b..41f046ceb 100644 --- a/crates/reader/src/file.rs +++ b/crates/reader/src/file.rs @@ -92,6 +92,10 @@ impl std::fmt::Debug for File { } } +extern "C" { + fn strlen(cs: *const u8) -> usize; +} + impl File { pub fn u32(&sel...
2
8
10
70321965518d1d65e07c81a3589226c4910f0d0f
Kenny Kerr
2021-09-30T23:16:28
Simplify generated code (#1193)
diff --git a/crates/gen/src/winrt.rs b/crates/gen/src/winrt.rs index f69462777..e7816166a 100644 --- a/crates/gen/src/winrt.rs +++ b/crates/gen/src/winrt.rs @@ -218,8 +218,10 @@ pub fn gen_winrt_method( .and_then(|| result__ ) } } else { + let abi_type_name = gen_ab...
2
83
122
d8dd78de7d3b35cf0f9940b78242b0f1590f496e
Kenny Kerr
2021-09-30T00:11:52
Simplify dependencies (#1192)
diff --git a/Cargo.toml b/Cargo.toml index 0e47f4b18..5cdfcdc27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,7 @@ exclude = [".github", ".windows", "docs", "tests"] [dependencies] windows_macros = { path = "crates/macros", version = "0.21.1", optional = true } windows_reader = { path = "crates/reader", ve...
6
465
10
babdd05a00a4fbd0ac18d9653e40d6c5a411f023
Jeff Muizelaar
2021-09-30T00:03:49
Derive Hash for Guid (#1190)
diff --git a/src/runtime/guid.rs b/src/runtime/guid.rs index b2ba7c2da..cb48ba5df 100644 --- a/src/runtime/guid.rs +++ b/src/runtime/guid.rs @@ -6,7 +6,7 @@ use bindings::Windows::Win32::System::Com::CoCreateGuid; /// A globally unique identifier [(GUID)](https://docs.microsoft.com/en-us/windows/win32/api/guiddef/ns-g...
1
1
1
11cfdf6cefb10c096dd8a6a5a087162a84e0cf6f
Kenny Kerr
2021-09-27T17:04:31
Simplify win32 error interop (#1186)
diff --git a/src/result/error.rs b/src/result/error.rs index bb3c45ac8..d35dbbd62 100644 --- a/src/result/error.rs +++ b/src/result/error.rs @@ -90,7 +90,7 @@ impl Error { } /// Returns the win32 error code if the underlying HRESULT's facility is win32 - fn win32_code(&self) -> Option<u32> { + pub fn ...
1
9
3
5b6c0e5150f1308648a15ce35b381ee87eb7d164
Kenny Kerr
2021-09-24T20:19:11
Simplify use of the Windows crate from other library crates (#1180)
diff --git a/Cargo.toml b/Cargo.toml index 1745de787..0d6634948 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ exclude = [".github", ".windows", "docs", "tests"] [dependencies] windows_macros = { path = "crates/macros", version = "0.20.1", optional = true } +windows_reader = { path = "crates/reader", v...
5
17
11
2c6c3542861289113b1f36cb2a4c01e946ad112e
Kenny Kerr
2021-09-22T20:35:19
Remove unnecessary target checks in tests (#1172)
diff --git a/tests/legacy/return_struct/tests/free_function.rs b/tests/legacy/return_struct/tests/free_function.rs index 93c18b4a5..cbf9bc353 100644 --- a/tests/legacy/return_struct/tests/free_function.rs +++ b/tests/legacy/return_struct/tests/free_function.rs @@ -2,7 +2,7 @@ // returning structs where the return valu...
5
1
13
0163b43a2dc32ce712735bf1038f3c3548041714
Kenny Kerr
2021-09-21T17:11:26
Fix invalid indirection in implement macro (#1164)
diff --git a/crates/gen/src/win32.rs b/crates/gen/src/win32.rs index 530e13883..5882e1b7a 100644 --- a/crates/gen/src/win32.rs +++ b/crates/gen/src/win32.rs @@ -27,9 +27,15 @@ pub fn gen_win32_abi(sig: &MethodSignature, gen: &Gen) -> TokenStream { } } -fn gen_win32_invoke_arg(param: &MethodParam) -> TokenStream...
4
26
10
5e2f5bbac8d04b2859bb4372105ac86fabb6b0d2
Kenny Kerr
2021-09-20T20:00:38
Support implementing query-like functions (#1163)
diff --git a/crates/gen/src/win32.rs b/crates/gen/src/win32.rs index fb3e15c79..530e13883 100644 --- a/crates/gen/src/win32.rs +++ b/crates/gen/src/win32.rs @@ -82,9 +82,6 @@ pub fn gen_win32_abi_arg(param: &MethodParam) -> TokenStream { pub fn gen_win32_upcall(sig: &MethodSignature, inner: TokenStream) -> TokenStre...
5
76
4
e8c53dac553c03f9fa65227504113d1032c4a8bc
Kenny Kerr
2021-09-20T17:43:50
Add test for handle constants in constant expressions (#1162)
diff --git a/tests/win32/handles/build.rs b/tests/win32/handles/build.rs index 06cd8f56a..c48e1689a 100644 --- a/tests/win32/handles/build.rs +++ b/tests/win32/handles/build.rs @@ -3,6 +3,7 @@ fn main() { Windows::Win32::Foundation::{BOOLEAN, HANDLE, HWND, PSTR, PWSTR}, Windows::Win32::Graphics::Gdi::...
2
18
0
8ee83b4f235fc128f9aef92e7ff372e9f3d1d2d4
Kenny Kerr
2021-09-20T16:20:06
Implement IntoParam for convertible handles (#1161)
diff --git a/crates/gen/src/struct.rs b/crates/gen/src/struct.rs index 0b9412db6..a66ffb76f 100644 --- a/crates/gen/src/struct.rs +++ b/crates/gen/src/struct.rs @@ -18,6 +18,20 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr let signature = def.fields().next().map(|field| fi...
3
29
15
b56fe82438e2bd8f432de7d7ded1023fd1f84e74
Kenny Kerr
2021-09-20T15:46:57
Add `is_null` to `PSTR` and `PWSTR` for usability (#1160)
diff --git a/crates/gen/src/pstr.rs b/crates/gen/src/pstr.rs index 0c6f75d35..f823787f8 100644 --- a/crates/gen/src/pstr.rs +++ b/crates/gen/src/pstr.rs @@ -5,6 +5,11 @@ pub fn gen_pstr() -> TokenStream { #[derive(::std::clone::Clone, ::std::marker::Copy, ::std::fmt::Debug, ::std::cmp::PartialEq, ::std::cmp::E...
4
26
4
f63da43df653afccdab5ef15f24e401ef997f725
Kenny Kerr
2021-09-17T22:29:36
Fix regression in handles with a pointer field (#1148)
diff --git a/crates/gen/src/struct.rs b/crates/gen/src/struct.rs index a0320f70c..0b9412db6 100644 --- a/crates/gen/src/struct.rs +++ b/crates/gen/src/struct.rs @@ -19,9 +19,14 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr let signature = gen_sig(&signature, gen); ...
9
59
18
402cb8d8f47f97cd4fff25d0fd664f4ccdb5350e
Kenny Kerr
2021-09-17T21:24:49
Simplify handle code gen (#1147)
diff --git a/crates/gen/src/bool32.rs b/crates/gen/src/bool32.rs index 4ffef0c18..6fba3f7f7 100644 --- a/crates/gen/src/bool32.rs +++ b/crates/gen/src/bool32.rs @@ -21,7 +21,7 @@ pub fn gen_bool32() -> TokenStream { if self.as_bool() { Ok(()) } else { - ...
26
115
270
b810f13bd2dfaa95f7b28bb4281d82f2d75614b5
Kenny Kerr
2021-09-17T15:39:05
Implement `Default` trait for all structs (#1146)
diff --git a/crates/gen/src/struct.rs b/crates/gen/src/struct.rs index 38ac7d1db..851ffa9d1 100644 --- a/crates/gen/src/struct.rs +++ b/crates/gen/src/struct.rs @@ -221,28 +221,6 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr } }; - let default = if is_union || ha...
2
11
41
5f3d4978f00d9dbedac988c4a293e6ddcc8bca63
Kenny Kerr
2021-09-15T22:50:47
Correct handle layout (#1142)
diff --git a/crates/gen/src/struct.rs b/crates/gen/src/struct.rs index e884eb072..38ac7d1db 100644 --- a/crates/gen/src/struct.rs +++ b/crates/gen/src/struct.rs @@ -15,15 +15,18 @@ fn gen_struct_with_name(def: &TypeDef, struct_name: &str, gen: &Gen) -> TokenStr let name = to_ident(struct_name); if def.is_ha...
3
19
5
339363d2709717bdbedb8d4caa6584be3f67af96
Kenny Kerr
2021-09-15T15:27:10
Simplify code gen for Win32 handle types (#1139)
diff --git a/crates/gen/src/handle.rs b/crates/gen/src/handle.rs index a9ef25bad..dbdb8e298 100644 --- a/crates/gen/src/handle.rs +++ b/crates/gen/src/handle.rs @@ -2,11 +2,32 @@ use super::*; pub fn gen_handle() -> TokenStream { quote! { + #[derive(::std::clone::Clone, ::std::marker::Copy, ::std::defaul...
11
199
161
4027589b38a9fc15f6be0b2ba5c27417860d679c
Rafael Rivera
2021-09-14T19:35:54
Implement Not trait for enums (#1133)
diff --git a/crates/gen/src/enum.rs b/crates/gen/src/enum.rs index 621dda5f2..5510cf413 100644 --- a/crates/gen/src/enum.rs +++ b/crates/gen/src/enum.rs @@ -36,6 +36,13 @@ pub fn gen_enum(def: &TypeDef, gen: &Gen, include: TypeInclude) -> TokenStream { self.0.bitand_assign(rhs.0) }...
3
34
0
85ef438103e1236e144b955f3e8e254ba7379480
Kenny Kerr
2021-09-13T21:24:51
Limit use of Abi trait (#1127)
diff --git a/crates/gen/src/bstr.rs b/crates/gen/src/bstr.rs index 4604d6c88..a706a9c82 100644 --- a/crates/gen/src/bstr.rs +++ b/crates/gen/src/bstr.rs @@ -143,11 +143,6 @@ pub fn gen_bstr() -> TokenStream { unsafe impl ::windows::Abi for BSTR { type Abi = ::std::mem::ManuallyDrop<Self>; ...
19
94
217
28834c920bc4d211d3fed3234aee2e55cdca0ea8
Kenny Kerr
2021-09-01T17:42:53
Avoid Param abuse (#1109)
diff --git a/src/runtime/param.rs b/src/runtime/param.rs index 90b4b81ee..4b986dc69 100644 --- a/src/runtime/param.rs +++ b/src/runtime/param.rs @@ -11,14 +11,13 @@ pub enum Param<'a, T: Abi> { } impl<'a, T: Abi> Param<'a, T> { - pub fn abi(&mut self) -> T::Abi { + /// # Safety + pub unsafe fn abi(&self) -...
2
18
17
a0997aa0d6190e8588c078943fd6086a8d8fa583
包布丁
2021-09-01T16:46:40
Fix infinite loop while updating weak reference counter (#1098)
diff --git a/src/runtime/weak_ref_count.rs b/src/runtime/weak_ref_count.rs index bb718b76f..2f3740376 100644 --- a/src/runtime/weak_ref_count.rs +++ b/src/runtime/weak_ref_count.rs @@ -26,62 +26,32 @@ impl WeakRefCount { } pub fn add_ref(&self) -> u32 { - let count_or_pointer = self.0.load(Ordering::...
2
104
84
c1cd62ff4a8ba290c33f2476eee65861f0eb3b2f
Kenny Kerr
2021-08-27T22:55:28
Additional test for return structs (#1097)
diff --git a/crates/gen/src/callback.rs b/crates/gen/src/callback.rs index 610ea3c86..afaf6c045 100644 --- a/crates/gen/src/callback.rs +++ b/crates/gen/src/callback.rs @@ -14,12 +14,7 @@ pub fn gen_callback(def: &TypeDef, gen: &Gen) -> TokenStream { quote! { #name: #tokens } }); - let return_sig = i...
7
16
23
2bf00e93ced530df906a288b96608868f5b08622
Kenny Kerr
2021-08-27T20:51:19
Improved signature detection (#1096)
diff --git a/crates/gen/src/async.rs b/crates/gen/src/async.rs index 02b0d720b..74fdaf8bc 100644 --- a/crates/gen/src/async.rs +++ b/crates/gen/src/async.rs @@ -48,7 +48,7 @@ fn gen_async_kind( self_name: &TypeDef, gen: &Gen, ) -> (TokenStream, TokenStream) { - let return_type = match kind { + let retu...
26
398
265
50d929d183788c5c34d082b9cc0d77da533c7f97
Kenny Kerr
2021-08-26T21:33:44
Apply `IntoParam` lifetime correct for non-borrowed values (#1095)
diff --git a/crates/gen/src/class.rs b/crates/gen/src/class.rs index 019828198..a701d4685 100644 --- a/crates/gen/src/class.rs +++ b/crates/gen/src/class.rs @@ -251,7 +251,7 @@ impl Class { ::windows::Param::Owned(::std::convert::Into::<#into>::into(self)) } ...
7
21
23
7d6dc5e54f11b67c10341121968c5bbe36132ef6
Kenny Kerr
2021-08-26T18:10:38
Switch non-blittable structs to use `ManuallyDrop` for their ABI (#1092)
diff --git a/crates/gen/src/bstr.rs b/crates/gen/src/bstr.rs index 3754e9e21..4604d6c88 100644 --- a/crates/gen/src/bstr.rs +++ b/crates/gen/src/bstr.rs @@ -4,7 +4,7 @@ pub fn gen_bstr() -> TokenStream { quote! { #[repr(transparent)] #[derive(::std::cmp::Eq)] - pub struct BSTR(*mut u16); +...
8
104
55
2d8148e48395e646b54fbd4d86fa4ce938da4ca1
Sabby
2021-08-26T17:52:22
`IntoParam<PWSTR>` for OString & OsStr (#1081)
diff --git a/crates/gen/src/pwstr.rs b/crates/gen/src/pwstr.rs index 2ede81ca5..d5bbd99c7 100644 --- a/crates/gen/src/pwstr.rs +++ b/crates/gen/src/pwstr.rs @@ -35,7 +35,7 @@ pub fn gen_pwstr() -> TokenStream { } } } - impl<'a> ::windows::IntoParam<'a, PWSTR> for &'a str { ...
6
87
2
4213730f37c49798e27efa29f99d3a558ebc59f4
Kenny Kerr
2021-08-26T05:17:51
Fix `has_query_interface` regression and add `IDataObject` test (#1089)
diff --git a/crates/gen/src/helpers.rs b/crates/gen/src/helpers.rs index 370c29674..f16974de7 100644 --- a/crates/gen/src/helpers.rs +++ b/crates/gen/src/helpers.rs @@ -16,7 +16,7 @@ pub fn gen_sig(sig: &Signature, gen: &Gen) -> TokenStream { gen_sig_with_const(sig, gen, sig.is_const) } -pub fn gen_sig_with_con...
6
65
1
e53eeeae091f6e55ac93ded162b7fb616816d5b6
Kenny Kerr
2021-08-25T23:10:35
Simpler signature generation (#1088)
diff --git a/crates/gen/src/helpers.rs b/crates/gen/src/helpers.rs index 399eab6a9..370c29674 100644 --- a/crates/gen/src/helpers.rs +++ b/crates/gen/src/helpers.rs @@ -1,22 +1,5 @@ use crate::*; -pub fn gen_phantoms(def: &TypeDef) -> impl Iterator<Item = TokenStream> + '_ { - def.generics.iter().map(move |g| { -...
9
85
134
abd37579328c83fe3fb55d05389748f657c602b7
Kenny Kerr
2021-08-25T17:28:47
Exclude .windows folder from package (#1087)
diff --git a/Cargo.toml b/Cargo.toml index 91999e8ae..b3dfa8e91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ description = "Rust for Windows" repository = "https://github.com/microsoft/windows-rs" documentation = "https://docs.rs/windows" readme = ".github/readme.md" -exclude = [".github", "docs"] +exclu...
1
1
1
8b8869d625d32a9860664ac42e755b9501a7f675
Kenny Kerr
2021-08-20T19:48:23
Fix win32 ABI signature edge cases (#1075)
diff --git a/crates/gen/src/function.rs b/crates/gen/src/function.rs index 6ddaf0764..310a9433f 100644 --- a/crates/gen/src/function.rs +++ b/crates/gen/src/function.rs @@ -65,11 +65,19 @@ pub fn gen_function(def: &MethodDef, gen: &Gen) -> TokenStream { } } } else if signature.has_retval() { ...
5
28
2
cd149769afbcd3cee6d8b386d347c420f8bf5fb8
Guiguiprim
2021-08-20T18:35:29
Use explicit version in cargo.toml (#1071)
diff --git a/Cargo.toml b/Cargo.toml index ecaf12541..d8bef05e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ gen = { package = "windows_gen", path = "crates/gen", version = "0.18.0", optio const-sha1 = "0.2" [dev-dependencies] -gen = { package = "windows_gen", path = "crates/gen" } +gen = { package =...
3
4
4
7564ed9447820eceb63cb0ddee4e889ad7448dde
Kenny Kerr
2021-08-20T16:10:47
Correct ABI signature for Win32 struct parameters (#1074)
diff --git a/crates/gen/src/win32.rs b/crates/gen/src/win32.rs index 96dfdabb6..631919e82 100644 --- a/crates/gen/src/win32.rs +++ b/crates/gen/src/win32.rs @@ -95,7 +95,12 @@ pub fn gen_win32_abi_param(param: &MethodParam, gen: &Gen) -> TokenStream { } } - tokens.combine(&gen_abi_type_name(&param.si...
2
9
1
5eb185b0bd4842bc24cef2332fcb18ff212dc74d
Marijn Suijten
2021-08-20T14:56:22
Simpler workspace path handling (#1069)
diff --git a/crates/reader/src/workspace.rs b/crates/reader/src/workspace.rs index 070e27787..491c89002 100644 --- a/crates/reader/src/workspace.rs +++ b/crates/reader/src/workspace.rs @@ -10,38 +10,31 @@ pub fn workspace_winmds() -> &'static [File] { unsafe { &*VALUE.as_ptr() } } -pub fn workspace_dir() -> Str...
1
19
26
3a378f1e5ec5405437debcae6447565ab4d67e4d
Kenny Kerr
2021-08-19T22:53:09
Move gen code from macros crate to gen crate (#1070)
diff --git a/crates/gen/src/build.rs b/crates/gen/src/build.rs new file mode 100644 index 000000000..4e83fb049 --- /dev/null +++ b/crates/gen/src/build.rs @@ -0,0 +1,96 @@ +use super::*; + +pub fn gen_build() -> TokenStream { + let tokens = RawString(gen_source_tree().into_string()); + let target_dir = RawString(...
5
123
131
2a9f01796acf4ca3a777dd74a44986ccba3f1af1
Marijn Suijten
2021-08-19T20:49:06
Don't copy DLL files outside of the workspace target folder (#1068)
diff --git a/crates/macros/src/lib.rs b/crates/macros/src/lib.rs index eff2c8691..dc1236a46 100644 --- a/crates/macros/src/lib.rs +++ b/crates/macros/src/lib.rs @@ -125,9 +125,7 @@ pub fn build(stream: proc_macro::TokenStream) -> proc_macro::TokenStream { println!("cargo:rustc-link-search=native={}...
1
1
3
a27a74784ccf304ab362bf2416f5f44e98e5eecd
Kenny Kerr
2021-08-18T16:29:35
Improved support for nullptr/None result values (#1062)
diff --git a/crates/bindings/src/main.rs b/crates/bindings/src/main.rs index dbe304a79..34c4a27bb 100644 --- a/crates/bindings/src/main.rs +++ b/crates/bindings/src/main.rs @@ -3,7 +3,7 @@ fn main() -> std::io::Result<()> { Windows::{ Foundation::{IReference, IStringable, PropertyValue}, ...
11
60
19
6f66baa312dad6932dab8736a7d12737e71253f9
Kenny Kerr
2021-08-17T23:00:40
Simpler attribute handling (#1059)
diff --git a/crates/gen/src/enum.rs b/crates/gen/src/enum.rs index ae41879e5..621dda5f2 100644 --- a/crates/gen/src/enum.rs +++ b/crates/gen/src/enum.rs @@ -10,7 +10,7 @@ pub fn gen_enum(def: &TypeDef, gen: &Gen, include: TypeInclude) -> TokenStream { // Win32 enums sadly don't use unsigned values uniformly so w...
8
36
33
d1a697339c2590186184415bd19d0546eb61561d
Kenny Kerr
2021-08-16T22:07:59
Simplified token generation (#1056)
diff --git a/crates/gen/src/gen_helpers.rs b/crates/gen/src/gen_helpers.rs index 22b0c8335..f5d485ce7 100644 --- a/crates/gen/src/gen_helpers.rs +++ b/crates/gen/src/gen_helpers.rs @@ -43,7 +43,7 @@ pub fn gen_field(def: &Field, gen: &Gen) -> TokenStream { } pub fn gen_function(def: &MethodDef, gen: &Gen) -> TokenS...
12
66
123
657c5469e7ab181b2ce67df1648f468b96710f3b
Kenny Kerr
2021-08-13T20:15:13
Replace custom error macro in favor of the standard unimplemented macro (#1050)
diff --git a/crates/gen/src/async.rs b/crates/gen/src/async.rs index f8f79b1c2..83e4ce620 100644 --- a/crates/gen/src/async.rs +++ b/crates/gen/src/async.rs @@ -57,7 +57,7 @@ fn gen_async_kind( AsyncKind::ActionWithProgress => quote! { AsyncActionWithProgressCompletedHandler }, AsyncKind::Operation =>...
12
41
54
559599c0aa97f356d8485ba05640c8bf117ecb9a
Kenny Kerr
2021-08-13T18:55:46
Splitting out quote support into a separate module (#1049)
diff --git a/crates/gen/Cargo.toml b/crates/gen/Cargo.toml index 7230e6754..09ae756a8 100644 --- a/crates/gen/Cargo.toml +++ b/crates/gen/Cargo.toml @@ -4,9 +4,11 @@ version = "0.18.0" authors = ["Microsoft"] edition = "2018" license = "MIT OR Apache-2.0" -description = "Code generation for the windows crate" +descr...
7
13
3
1dd9a40a05af7c1f230ee0d84b56e93206d5d6da
Kenny Kerr
2021-08-13T02:02:44
Simplify implementation signatures for blittable parameters (#1042)
diff --git a/crates/gen/src/parser/method_signature.rs b/crates/gen/src/parser/method_signature.rs index 43277ba91..26528bb85 100644 --- a/crates/gen/src/parser/method_signature.rs +++ b/crates/gen/src/parser/method_signature.rs @@ -480,7 +480,7 @@ impl MethodParam { let kind = self.signature.kind.gen_name(gen...
2
2
3
700eb26470971dd069c6cff4410ee3b6e5975ef7
Kenny Kerr
2021-08-12T23:28:09
Support for implementing COM interfaces that don't directly inherit from IUnknown (#1041)
diff --git a/crates/gen/src/tables/type_def.rs b/crates/gen/src/tables/type_def.rs index 6b7fbe6e3..70e8a8b53 100644 --- a/crates/gen/src/tables/type_def.rs +++ b/crates/gen/src/tables/type_def.rs @@ -508,10 +508,36 @@ impl TypeDef { } } + // TODO: rename base_classes pub fn bases(&self) -> impl...
5
108
32
6375821cd6a505acf75d23072457347d11b2ba94
Kenny Kerr
2021-08-12T15:34:29
Avoid invalid code gen for Win32 array parameters (#1040)
diff --git a/crates/gen/src/parser/method_signature.rs b/crates/gen/src/parser/method_signature.rs index 91024a3fe..43277ba91 100644 --- a/crates/gen/src/parser/method_signature.rs +++ b/crates/gen/src/parser/method_signature.rs @@ -450,7 +450,10 @@ impl MethodSignature { impl MethodParam { fn is_retval(&self) ->...
1
4
1
72ec0a22df48acf97bdb95c4a550b4570b90b994
Kenny Kerr
2021-08-12T03:43:10
safety (#1036)
diff --git a/src/result/hresult.rs b/src/result/hresult.rs index 05464b687..bf043868d 100644 --- a/src/result/hresult.rs +++ b/src/result/hresult.rs @@ -70,6 +70,7 @@ impl HRESULT { Ok(op()) } + /// # Safety /// If the [`Result`] is [`Ok`] converts the `T::Abi` into `T`. pub unsafe fn from_...
6
9
1
e03a95c513f80ffe1e2f5e6032a364200de6fb46
Kenny Kerr
2021-08-12T03:28:35
Enable more COM implementation scenarios (#1035)
diff --git a/crates/gen/src/parser/method_signature.rs b/crates/gen/src/parser/method_signature.rs index 377422626..91024a3fe 100644 --- a/crates/gen/src/parser/method_signature.rs +++ b/crates/gen/src/parser/method_signature.rs @@ -5,6 +5,7 @@ pub struct MethodSignature { pub return_type: Option<Signature>, } ...
5
55
9
dcbb75c69f9aa7437da56a5278b7c49c14bb309d
Kenny Kerr
2021-08-12T02:17:11
Allow implementations to query themselves (#1034)
diff --git a/crates/macros/src/implement.rs b/crates/macros/src/implement.rs index b914b3035..fd19c963f 100644 --- a/crates/macros/src/implement.rs +++ b/crates/macros/src/implement.rs @@ -213,6 +213,13 @@ pub fn gen( tokens.combine(&quote! { impl <#constraints> #impl_ident { #constructors + ...
2
27
0
051ce346dc43500c826cfccc85f6ca755c0f0f5a
Marijn Suijten
2021-08-11T16:57:32
Fix clippy warnings in core crates (#1027)
diff --git a/crates/fmt/src/main.rs b/crates/fmt/src/main.rs index 70e945067..abbbb2b7c 100644 --- a/crates/fmt/src/main.rs +++ b/crates/fmt/src/main.rs @@ -28,7 +28,7 @@ fn update_file(path: &std::path::Path, pattern: &str) -> std::io::Result<()> { .take_while(|&c| c == ' ') .count();...
15
40
44
5c6cb07cb66450ae9508fb5f0c6bb127dee22e7e
Kenny Kerr
2021-08-11T15:36:42
Constrain generic types to simplify generic implementations (#1032)
diff --git a/crates/gen/src/types/struct.rs b/crates/gen/src/types/struct.rs index 354675133..e4528630a 100644 --- a/crates/gen/src/types/struct.rs +++ b/crates/gen/src/types/struct.rs @@ -94,7 +94,14 @@ impl Struct { #[derive(::std::clone::Clone, ::std::marker::Copy)] } } else if...
6
134
16
c36fb64e8888617e43c571fd71b3e2c0a1b58125
Kenny Kerr
2021-08-09T22:49:38
Additional COM signatures supported for implementations (#1025)
diff --git a/crates/gen/src/object.rs b/crates/gen/src/object.rs index 11c624c6e..5b26c0430 100644 --- a/crates/gen/src/object.rs +++ b/crates/gen/src/object.rs @@ -2,6 +2,27 @@ use super::*; pub fn gen_object(name: &TokenStream, constraints: &TokenStream) -> TokenStream { quote! { + impl<#constraints> :...
5
130
9
24ce36fb2e7da1ad6fa2559cd8914d57f17a478a
Kenny Kerr
2021-07-29T21:06:55
Consolidate TypeRow and ElementType (#1012)
diff --git a/crates/gen/src/parser/element_type.rs b/crates/gen/src/parser/element_type.rs index a6108ec54..bb6a11875 100644 --- a/crates/gen/src/parser/element_type.rs +++ b/crates/gen/src/parser/element_type.rs @@ -97,6 +97,15 @@ impl ElementType { } } + pub fn type_name(&self) -> TypeName { + ...
14
72
97
54f28a653a4817997507ac1d2008d5b6585b40b2
Kenny Kerr
2021-07-27T18:09:35
Remove dead code and unused traits (#1008)
diff --git a/crates/gen/src/import_limit.rs b/crates/gen/src/import_limit.rs deleted file mode 100644 index 790a6e49d..000000000 --- a/crates/gen/src/import_limit.rs +++ /dev/null @@ -1,13 +0,0 @@ -use std::collections::BTreeSet; - -#[derive(Debug)] -pub enum ImportLimit { - All, - Some(BTreeSet<&'static str>), -...
40
77
227
7add88a01c7bff73c008ed1a6d8c5aa208c7aa94
Kenny Kerr
2021-07-27T15:55:55
Code cleanup (#1007)
diff --git a/crates/gen/src/parser/element_type.rs b/crates/gen/src/parser/element_type.rs index d16038b23..16c5b22fb 100644 --- a/crates/gen/src/parser/element_type.rs +++ b/crates/gen/src/parser/element_type.rs @@ -339,10 +339,10 @@ impl ElementType { } } - pub fn is_explicit(&self) -> bool { + ...
15
39
115
91b828368d8b478083df75871f1abd28feb45268
Kenny Kerr
2021-07-23T22:49:36
Fix a few clippy issues (#999)
diff --git a/crates/gen/src/parser/method_signature.rs b/crates/gen/src/parser/method_signature.rs index 03ced7622..9aaa57871 100644 --- a/crates/gen/src/parser/method_signature.rs +++ b/crates/gen/src/parser/method_signature.rs @@ -44,18 +44,7 @@ impl MethodSignature { pub fn has_retval(&self) -> bool { ...
9
46
52
4ce6469b1dbaedfdd7de0420d683c1f7b2ba1ced
Kenny Kerr
2021-07-23T22:11:00
Remove unecessary helper functions (#998)
diff --git a/crates/bindings/src/main.rs b/crates/bindings/src/main.rs index c3a4b8a50..0887925d8 100644 --- a/crates/bindings/src/main.rs +++ b/crates/bindings/src/main.rs @@ -3,12 +3,9 @@ fn main() -> std::io::Result<()> { Windows::{ Foundation::{IReference, IStringable, PropertyValue}, ...
11
20
246
de73343280534299311e0629486b7c10e6b4b81c
Kenny Kerr
2021-07-23T20:17:31
Minor usability improvements for NTSTATUS (#997)
diff --git a/crates/gen/src/types/ntstatus.rs b/crates/gen/src/types/ntstatus.rs index eb1b96bec..90a8051f1 100644 --- a/crates/gen/src/types/ntstatus.rs +++ b/crates/gen/src/types/ntstatus.rs @@ -9,7 +9,7 @@ pub fn gen_ntstatus() -> TokenStream { impl NTSTATUS { #[inline] pub const f...
3
39
5
7cb2500ed3219d21519e832bd4a324b0a893244f
Kenny Kerr
2021-07-23T00:22:44
remap (#995)
diff --git a/crates/gen/src/parser/element_type.rs b/crates/gen/src/parser/element_type.rs index 1427242c4..d16038b23 100644 --- a/crates/gen/src/parser/element_type.rs +++ b/crates/gen/src/parser/element_type.rs @@ -22,7 +22,6 @@ pub enum ElementType { IUnknown, IInspectable, HRESULT, - Matrix3x2, ...
2
13
27
cef626aeadee0e672832340985544239129325f5
Kenny Kerr
2021-07-22T22:42:57
Transform `NTSTATUS` functions into `Result<()>` (#994)
diff --git a/crates/gen/src/types/function.rs b/crates/gen/src/types/function.rs index 1eeec69eb..542191269 100644 --- a/crates/gen/src/types/function.rs +++ b/crates/gen/src/types/function.rs @@ -108,36 +108,57 @@ impl Function { } } } else if let Some(return_type) = &signature.r...
8
143
23
7455af8750a3694a523857417c1e5b4efc9977a8
Kenny Kerr
2021-07-22T17:17:32
Correct ToImpl safety requirement (#993)
diff --git a/crates/macros/src/implement.rs b/crates/macros/src/implement.rs index 4d24da2b7..49e5fbc38 100644 --- a/crates/macros/src/implement.rs +++ b/crates/macros/src/implement.rs @@ -141,12 +141,10 @@ pub fn gen( } } } - ...
3
9
11
227a720efc13cb42ab90999d704a28b5f8f43479
Kenny Kerr
2021-07-22T16:59:04
Doc improvements (#992)
diff --git a/src/lib.rs b/src/lib.rs index c9c70e05d..982abbeb3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,7 +32,7 @@ pub use runtime::{ create_instance, factory, initialize_mta, initialize_sta, Array, FactoryCache, Guid, Param, RefCount, Waiter, Weak, WeakRefCount, HSTRING, }; -pub use traits::{Abi, Co...
8
12
6
a851c7e79e0add2bd83d3c93a2ee187bc014a8e0
Kenny Kerr
2021-07-22T00:07:38
Improved implementation support (#991)
diff --git a/crates/macros/src/implement.rs b/crates/macros/src/implement.rs index 922b1837b..4d24da2b7 100644 --- a/crates/macros/src/implement.rs +++ b/crates/macros/src/implement.rs @@ -43,6 +43,8 @@ pub fn gen( #(#generics: ::windows::RuntimeType + 'static,)* }; + let interfaces_len = Literal::us...
6
145
1
33f3c371fdecb557889a619fa5301b6327acdb99
Kenny Kerr
2021-07-19T22:38:42
Support for generic interface implementations (#986)
diff --git a/crates/gen/src/parser/element_type.rs b/crates/gen/src/parser/element_type.rs index ada3230ed..1427242c4 100644 --- a/crates/gen/src/parser/element_type.rs +++ b/crates/gen/src/parser/element_type.rs @@ -24,7 +24,7 @@ pub enum ElementType { HRESULT, Matrix3x2, TypeName, - GenericParam(tab...
12
416
119
6f42ccc82fd3f7a20d864270f0baedd250c9772e
DoctorNefario
2021-07-14T23:31:41
Document the usage of `HRESULT::from_thread()` (#978)
diff --git a/src/result/hresult.rs b/src/result/hresult.rs index 4f656a61f..4c03d6c4a 100644 --- a/src/result/hresult.rs +++ b/src/result/hresult.rs @@ -80,6 +80,29 @@ impl HRESULT { } /// Retrieves the error code stored on the calling thread. + /// + /// Example usage: + /// ```rust + /// # str...
1
23
0
ae225512b19b91dad26c339e1d98530e808d0d9e
Kenny Kerr
2021-07-14T02:29:16
Enables experimental support for raw-dylib (#977)
diff --git a/Cargo.toml b/Cargo.toml index 265769a76..bee09f8f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,3 +31,4 @@ targets = ["x86_64-pc-windows-msvc"] [features] default = ["macros"] macros = ["gen", "windows_macros"] +raw_dylib = ["gen/raw_dylib"] # TODO: remove feature once raw-dylib has stablized diff --...
3
21
4
d29314dc2ff342f0d663aeaedb07633ef7d11735
Rafael Rivera
2021-07-13T05:27:35
Add support for PropertyKey attribute on PROPERTYKEY consts (#975) For each `PROPERTYKEY` _constant_ encountered in the metadata, we now tap into the associated `PropertyKeyAttribute` to grab the _fmtid_ and _pid_ values and generate the appropriate `Windows.Win32.System.PropertiesSystem.PROPERTYKEY`. Fixes #768
diff --git a/crates/gen/src/guid.rs b/crates/gen/src/guid.rs index 5a37dbeac..273eb0a41 100644 --- a/crates/gen/src/guid.rs +++ b/crates/gen/src/guid.rs @@ -6,26 +6,28 @@ use super::*; pub struct Guid(u32, u16, u16, u8, u8, u8, u8, u8, u8, u8, u8); impl Guid { + pub fn from_args(args: &[(String, ConstantValue)])...
6
71
29
8ab83d4aac74efcee33ec337fa0e9e6942ca859c
Rafael Rivera
2021-07-12T06:18:45
Add thread preferred UI language helper (#971) Zeroes out the FormatMessageW langid parameter, to opt into its documented search behavior. This search is thread-locale inclusive, allowing us to explicitly set preferred UI language for tests that check against English errors and ultimate pass testing on non-English mac...
diff --git a/src/result/error.rs b/src/result/error.rs index 732cf5999..3dc889022 100644 --- a/src/result/error.rs +++ b/src/result/error.rs @@ -168,15 +168,6 @@ demand_load! { mod tests { use super::*; - #[test] - fn test_message() { - let code = Error::fast_error(HRESULT::from_win32(0)); - ...
13
69
25
66a40c5f59826fcfaa74a8156e6b346a9e6fc9a8
Rafael Rivera
2021-07-10T19:06:13
Pass params, traits through to struct Debug implementations (#969) Closes #439, #968
diff --git a/crates/gen/src/types/struct.rs b/crates/gen/src/types/struct.rs index 78073bfb3..4ecb4eb25 100644 --- a/crates/gen/src/types/struct.rs +++ b/crates/gen/src/types/struct.rs @@ -314,11 +314,11 @@ impl Struct { let index = Literal::usize_unsuffixed(index); ...
4
50
25
8a5b9a5fb63a53cc00e07e94f9843f1f8fee6dc3
Kenny Kerr
2021-07-09T20:54:06
Version 0.17.2 (#966)
diff --git a/Cargo.toml b/Cargo.toml index f9cc97d04..5a50c4094 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windows" -version = "0.17.1" +version = "0.17.2" authors = ["Microsoft"] edition = "2018" license = "MIT or Apache-2.0" @@ -11,8 +11,8 @@ readme = ".github/readme.md" exclude ...
3
6
6
53fbb1d6cb98b95d30389a6e351895a5f483704c
Kenny Kerr
2021-07-09T20:48:25
Fix incremental builds (#965)
diff --git a/crates/macros/src/lib.rs b/crates/macros/src/lib.rs index 754e214fa..2c9f1a834 100644 --- a/crates/macros/src/lib.rs +++ b/crates/macros/src/lib.rs @@ -108,31 +108,35 @@ pub fn build(stream: proc_macro::TokenStream) -> proc_macro::TokenStream { let mut source : ::std::path::PathBuf = ::std::en...
1
29
25
56acf4b7fbd8fc1ea55a54e95a84ad2024b3a016
Kenny Kerr
2021-07-08T23:35:47
Minor cleanup (#963)
diff --git a/crates/bindings/src/main.rs b/crates/bindings/src/main.rs index 21dca6821..c3a4b8a50 100644 --- a/crates/bindings/src/main.rs +++ b/crates/bindings/src/main.rs @@ -1,5 +1,3 @@ -use std::io::prelude::*; - fn main() -> std::io::Result<()> { let tokens = windows_macros::generate! { Windows::{ @...
9
24
40
171fe9fd0e67fb8e66a16b218df59ef321cb2ccd
Kenny Kerr
2021-07-08T21:47:15
More flexible macro formatting (#962)
diff --git a/crates/fmt/src/main.rs b/crates/fmt/src/main.rs index a224b3a74..ab80e0eb6 100644 --- a/crates/fmt/src/main.rs +++ b/crates/fmt/src/main.rs @@ -1,84 +1,82 @@ -use std::ffi::OsStr; -use std::io::Result; -use std::io::Write; -use std::path::*; -use std::process::Command; -use std::process::Stdio; - -fn forma...
2
77
86