|
@@ -21,11 +21,7 @@
|
|
|
indent,
|
|
|
mcgen,
|
|
|
)
|
|
|
-from .gen import (
|
|
|
- QAPISchemaModularCVisitor,
|
|
|
- gen_special_features,
|
|
|
- ifcontext,
|
|
|
-)
|
|
|
+from .gen import QAPISchemaModularCVisitor, gen_features, ifcontext
|
|
|
from .schema import (
|
|
|
QAPISchema,
|
|
|
QAPISchemaAlternatives,
|
|
@@ -103,15 +99,15 @@ def gen_visit_object_members(name: str,
|
|
|
''',
|
|
|
name=memb.name, has=has)
|
|
|
indent.increase()
|
|
|
- special_features = gen_special_features(memb.features)
|
|
|
- if special_features != '0':
|
|
|
+ features = gen_features(memb.features)
|
|
|
+ if features != '0':
|
|
|
ret += mcgen('''
|
|
|
- if (visit_policy_reject(v, "%(name)s", %(special_features)s, errp)) {
|
|
|
+ if (visit_policy_reject(v, "%(name)s", %(features)s, errp)) {
|
|
|
return false;
|
|
|
}
|
|
|
- if (!visit_policy_skip(v, "%(name)s", %(special_features)s)) {
|
|
|
+ if (!visit_policy_skip(v, "%(name)s", %(features)s)) {
|
|
|
''',
|
|
|
- name=memb.name, special_features=special_features)
|
|
|
+ name=memb.name, features=features)
|
|
|
indent.increase()
|
|
|
ret += mcgen('''
|
|
|
if (!visit_type_%(c_type)s(v, "%(name)s", &obj->%(c_name)s, errp)) {
|
|
@@ -120,7 +116,7 @@ def gen_visit_object_members(name: str,
|
|
|
''',
|
|
|
c_type=memb.type.c_name(), name=memb.name,
|
|
|
c_name=c_name(memb.name))
|
|
|
- if special_features != '0':
|
|
|
+ if features != '0':
|
|
|
indent.decrease()
|
|
|
ret += mcgen('''
|
|
|
}
|