From e291354abe5eff9de35075020c7bbc00d4d7cf0e Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 30 Jun 2015 15:28:00 -0600 Subject: layers: Fix codegen for printing arrays of char* strings --- vk_helper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vk_helper.py b/vk_helper.py index 46daad5f..9e5b2e63 100755 --- a/vk_helper.py +++ b/vk_helper.py @@ -787,7 +787,7 @@ class StructWrapperGen: addr_char = '&' if 1 < stp_list[index]['full_type'].count('*'): addr_char = '' - if (stp_list[index]['array'] and 'char' not in stp_list[index]['type']): + if stp_list[index]['array']: sh_funcs.append('%s' % lineinfo.get()) if stp_list[index]['dyn_array']: sh_funcs.append('%s' % lineinfo.get()) @@ -835,7 +835,8 @@ class StructWrapperGen: sh_funcs.append('%s}' % (indent)) elif (stp_list[index]['ptr']): sh_funcs.append('%s' % lineinfo.get()) - sh_funcs.append(' if (pStruct->%s) {' % stp_list[index]['name']) + sh_funcs.append('%sif (pStruct->%s) {' % (indent, stp_list[index]['name'])) + indent += ' ' if 'pNext' == stp_list[index]['name']: sh_funcs.append('%s' % lineinfo.get()) sh_funcs.append(' tmp_str = dynamic_display((void*)pStruct->pNext, prefix);') -- cgit v1.2.3