Skip to content

Commit 68e69ae

Browse files
committed
odb: set-const-ref
Signed-off-by: Osama <[email protected]>
1 parent 254e0e8 commit 68e69ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/odb/src/codeGenerator/gen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def add_field_attributes(field, klass, flags_struct, schema):
128128
field["isHashTable"] = is_hash_table(field["type"])
129129
field["hashTableType"] = get_hash_table_type(field["type"])
130130
field["isPassByRef"] = is_pass_by_ref(field["type"])
131-
field["isSetByRef"] = is_set_by_ref(field["type"])
131+
field.setdefault("flags", [])
132+
field["isSetByRef"] = 'set-const-ref' in field['flags'] or is_set_by_ref(field["type"])
132133
if "argument" not in field:
133134
field["argument"] = field["name"].strip("_")
134-
field.setdefault("flags", [])
135135
if "private" in field["flags"]:
136136
field["flags"].append("no-set")
137137
field["flags"].append("no-get")

src/odb/src/codeGenerator/schema/chip/dbChipInst.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"name": "loc_",
1212
"type": "Point3D",
13-
"flags":["cmpgt"]
13+
"flags":["cmpgt", "set-const-ref"]
1414
},
1515
{
1616
"name": "orient_",

0 commit comments

Comments
 (0)