From f6a285ccfcc1b171e3cf8e5644625117e6b16216 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 28 Jan 2016 08:53:38 +0100 Subject: [PATCH] widl-SLTG_Typelib_Support: Added patch for minor/cosmetic clean up. --- patches/patchinstall.sh | 2 + .../0026-widl-Minor-cosmetic-clean-up.patch | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 patches/widl-SLTG_Typelib_Support/0026-widl-Minor-cosmetic-clean-up.patch diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 4cf8e0c3..1a26f005 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -6043,6 +6043,7 @@ if test "$enable_widl_SLTG_Typelib_Support" -eq 1; then patch_apply widl-SLTG_Typelib_Support/0023-oleaut32-Implement-decoding-of-SLTG-help-strings.patch patch_apply widl-SLTG_Typelib_Support/0024-oleaut32-Add-support-for-decoding-SLTG-function-help.patch patch_apply widl-SLTG_Typelib_Support/0025-oleaut32-Add-support-for-decoding-SLTG-variable-help.patch + patch_apply widl-SLTG_Typelib_Support/0026-widl-Minor-cosmetic-clean-up.patch ( echo '+ { "Dmitry Timoshkov", "widl: Add initial implementation of SLTG typelib generator.", 1 },'; echo '+ { "Dmitry Timoshkov", "widl: Add support for structures.", 1 },'; @@ -6069,6 +6070,7 @@ if test "$enable_widl_SLTG_Typelib_Support" -eq 1; then echo '+ { "Dmitry Timoshkov", "oleaut32: Implement decoding of SLTG help strings.", 1 },'; echo '+ { "Dmitry Timoshkov", "oleaut32: Add support for decoding SLTG function help strings.", 1 },'; echo '+ { "Dmitry Timoshkov", "oleaut32: Add support for decoding SLTG variable help strings.", 1 },'; + echo '+ { "Dmitry Timoshkov", "widl: Minor/cosmetic clean up.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/widl-SLTG_Typelib_Support/0026-widl-Minor-cosmetic-clean-up.patch b/patches/widl-SLTG_Typelib_Support/0026-widl-Minor-cosmetic-clean-up.patch new file mode 100644 index 00000000..489eac57 --- /dev/null +++ b/patches/widl-SLTG_Typelib_Support/0026-widl-Minor-cosmetic-clean-up.patch @@ -0,0 +1,39 @@ +From 3ad26c39f490daab83f32e87ec6b1b32a27f1bfa Mon Sep 17 00:00:00 2001 +From: Dmitry Timoshkov +Date: Thu, 28 Jan 2016 15:36:12 +0800 +Subject: widl: Minor/cosmetic clean up. + +--- + tools/widl/write_sltg.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c +index 3cb137c..04313e6 100644 +--- a/tools/widl/write_sltg.c ++++ b/tools/widl/write_sltg.c +@@ -298,9 +298,9 @@ static int add_name(struct sltg_typelib *sltg, const char *name) + else + new_size = (new_size + 1) & ~1; + +- if (aligned_size > sltg->name_table.allocated) ++ if (new_size > sltg->name_table.allocated) + { +- sltg->name_table.allocated = max(sltg->name_table.allocated * 2, aligned_size); ++ sltg->name_table.allocated = max(sltg->name_table.allocated * 2, new_size); + sltg->name_table.data = xrealloc(sltg->name_table.data, sltg->name_table.allocated); + } + +@@ -889,9 +889,8 @@ static short write_var_desc(struct sltg_typelib *typelib, struct sltg_data *data + { + chat("write_var_desc: vt VT_PTR | 0x0400 | %04x\n", param_flags); + vt = VT_PTR | 0x0400 | param_flags; +- param_flags = 0; + append_data(data, &vt, sizeof(vt)); +- write_var_desc(typelib, data, ref, param_flags, 0, base_offset, size_instance, hrefmap); ++ write_var_desc(typelib, data, ref, 0, 0, base_offset, size_instance, hrefmap); + } + else + write_var_desc(typelib, data, ref, param_flags, 0x0e00, base_offset, size_instance, hrefmap); +-- +2.6.4 +