mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 20:35:44 +01:00
adapt the generator for arrays of strings [text]
This commit is contained in:
parent
13b8d24108
commit
b67d1c2cb2
@ -306,6 +306,11 @@ def special_populate_text_group(fname: str, paths: dict, group_dict: dict, detai
|
||||
if group != detailed_dset[dset]['group']:
|
||||
continue
|
||||
|
||||
if ('REPEAT GROUP_DSET_STR' in line) and (detailed_dset[dset]['dtype'] != 'char*'):
|
||||
continue
|
||||
if ('REPEAT GROUP_DSET_NUM' in line) and (detailed_dset[dset]['dtype'] == 'char*'):
|
||||
continue
|
||||
|
||||
dset_allocated.append(dset)
|
||||
|
||||
if 'FREE($group$->$group_dset$)' in loop_body:
|
||||
@ -313,7 +318,7 @@ def special_populate_text_group(fname: str, paths: dict, group_dict: dict, detai
|
||||
for dset_alloc in dset_allocated:
|
||||
tmp_string += f'FREE({group}->{dset_alloc});\n '
|
||||
|
||||
tmp_body = loop_body.replace('FREE($group$->$group_dset$);',tmp_string)
|
||||
tmp_body = loop_body.replace('FREE($group$->$group_dset$);', tmp_string)
|
||||
|
||||
populated_body = recursive_replace_line(tmp_body, triggers, detailed_dset[dset])
|
||||
f_out.write(populated_body)
|
||||
|
Loading…
Reference in New Issue
Block a user