#define qdict_put(qdict, key, obj) \
qdict_put_obj(qdict, key, QOBJECT(obj))
-/* Helpers for int, bool, and string */
+/* Helpers for int, bool, null, and string */
#define qdict_put_int(qdict, key, value) \
qdict_put(qdict, key, qnum_from_int(value))
#define qdict_put_bool(qdict, key, value) \
qdict_put(qdict, key, qbool_from_bool(value))
#define qdict_put_str(qdict, key, value) \
qdict_put(qdict, key, qstring_from_str(value))
+#define qdict_put_null(qdict, key) \
+ qdict_put(qdict, key, qnull())
/* High level helpers */
double qdict_get_double(const QDict *qdict, const char *key);
|
- qdict_put(Obj, Key, qstring_from_str(E));
+ qdict_put_str(Obj, Key, E);
+|
+- qdict_put(Obj, Key, qnull());
++ qdict_put_null(Obj, Key);
)
// Use QList macros where they make sense
d = qdict_new();
for (i = 0; props[i]; i++) {
- qdict_put(d, props[i], qnull());
+ qdict_put_null(d, props[i]);
}
for (w = 0; w < FEATURE_WORDS; w++) {
if (!fi->feat_names[bit]) {
continue;
}
- qdict_put(d, fi->feat_names[bit], qnull());
+ qdict_put_null(d, fi->feat_names[bit]);
}
}