aboutsummaryrefslogtreecommitdiff
path: root/scripts/unique_objects_generator.py
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2017-05-02 18:25:30 -0700
committerChris Forbes <chrisf@ijw.co.nz>2017-05-03 11:38:06 -0700
commit44148ddacddbe9995b01f3949899942088d755fe (patch)
treeec536753ef8f50c0cf177af682d975084423218c /scripts/unique_objects_generator.py
parent4ae75644b238b63d0e8f8b7d21cfd51f45b2c943 (diff)
downloadusermoji-44148ddacddbe9995b01f3949899942088d755fe.tar.xz
layers: use WrapNew in UO codegen
Diffstat (limited to 'scripts/unique_objects_generator.py')
-rw-r--r--scripts/unique_objects_generator.py4
1 files changed, 1 insertions, 3 deletions
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<uint64_t &>(%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