Skip to content

Commit e16682d

Browse files
author
Petr Vesely
committed
[UR] Pointer to handle arguments require a range() check
1 parent 9a9c057 commit e16682d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/templates/helper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,9 @@ def get_loader_prologue(namespace, tags, obj, meta):
11481148
fty_name = re.sub(r"(\w+)_handle_t", r"\1_factory", tname)
11491149

11501150
if type_traits.is_pointer(item['type']):
1151+
if not param_traits.is_range(item):
1152+
print(item)
1153+
raise Exception("Pointer to a handle parameter requires a `[range(start, end)]` check as part of the description.")
11511154
range_start = param_traits.range_start(item)
11521155
range_end = param_traits.range_end(item)
11531156
prologue.append({

0 commit comments

Comments
 (0)