From 2f8a1768690fb0bb26411f561fe9d9d513c2de1f Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 10 Jan 2016 15:58:15 +0800
Subject: widl: Write correct typekind to the SLTG typeinfo block.

---
 tools/widl/write_sltg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c
index 05cda99..04c6123 100644
--- a/tools/widl/write_sltg.c
+++ b/tools/widl/write_sltg.c
@@ -419,7 +419,7 @@ static void add_interface_typeinfo(struct sltg_typelib *typelib, type_t *type)
     error("add_interface_typeinfo: %s not implemented\n", type->name);
 }
 
-static const char *add_typeinfo_block(struct sltg_typelib *typelib, const type_t *type)
+static const char *add_typeinfo_block(struct sltg_typelib *typelib, const type_t *type, int kind)
 {
     const char *index_name, *other_name;
     void *block;
@@ -456,7 +456,7 @@ static const char *add_typeinfo_block(struct sltg_typelib *typelib, const type_t
     *p++ = -1; /* res26 */
     *(GUID *)p = guid;
     p += sizeof(GUID)/2;
-    *p = type_get_type(type);
+    *p = kind;
 
     sltg_add_typeinfo(typelib, block, size, index_name);
 
@@ -670,7 +670,7 @@ static void add_structure_typeinfo(struct sltg_typelib *typelib, const type_t *t
 
     init_sltg_data(&data);
 
-    index_name = add_typeinfo_block(typelib, type);
+    index_name = add_typeinfo_block(typelib, type, TKIND_RECORD);
 
     init_typeinfo(&ti, type, TKIND_RECORD);
     append_data(&data, &ti, sizeof(ti));
-- 
2.6.4

