From 44148ddacddbe9995b01f3949899942088d755fe Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 2 May 2017 18:25:30 -0700 Subject: layers: use WrapNew in UO codegen --- scripts/unique_objects_generator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/unique_objects_generator.py') diff --git a/scripts/unique_objects_generator.py b/scripts/unique_objects_generator.py index d53c3bc4..3a408486 100644 --- a/scripts/unique_objects_generator.py +++ b/scripts/unique_objects_generator.py @@ -553,9 +553,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): create_ndo_code += '%sfor (uint32_t index0 = 0; index0 < %s; index0++) {\n' % (indent, cmd_info[-1].len) indent = self.incIndent(indent) ndo_dest = '%s[index0]' % cmd_info[-1].name - create_ndo_code += '%suint64_t unique_id = global_unique_id++;\n' % (indent) - create_ndo_code += '%sdev_data->unique_id_mapping[unique_id] = reinterpret_cast(%s);\n' % (indent, ndo_dest) - create_ndo_code += '%s%s = reinterpret_cast<%s&>(unique_id);\n' % (indent, ndo_dest, handle_type.text) + create_ndo_code += '%s%s = WrapNew(dev_data, %s);\n' % (indent, ndo_dest, ndo_dest) if ndo_array == True: indent = self.decIndent(indent) create_ndo_code += '%s}\n' % indent -- cgit v1.2.3