Lines Matching refs:dict
60 static int py_insert_long(PyObject *dict, const char *name, int value) in py_insert_long() argument
65 rt = PyDict_SetItemString(dict, name, obj); in py_insert_long()
70 static int py_insert_bool(PyObject *dict, const char *name, int value) in py_insert_bool() argument
75 rt = PyDict_SetItemString(dict, name, obj); in py_insert_bool()
95 PyObject *dict = NULL; in get_sens() local
115 dict = PyDict_New(); in get_sens()
116 if (!dict) goto err; in get_sens()
126 if (py_insert_string(dict, lvl_name, tmp)) in get_sens()
140 py_decref(dict); dict = NULL; in get_sens()
146 return dict; in get_sens()
246 PyObject *dict = PyDict_New(); in get_cat_sens() local
247 if (!dict) goto err; in get_cat_sens()
263 dict = PyDict_New(); in get_cat_sens()
264 if (!dict) goto err; in get_cat_sens()
265 if (py_insert_string(dict, "name", cat_name)) in get_cat_sens()
279 if (py_insert_obj(dict, "level", list)) in get_cat_sens()
288 py_decref(dict); dict = NULL; in get_cat_sens()
293 return dict; in get_cat_sens()
427 PyObject *dict = PyDict_New(); in get_attr() local
428 if (!dict) goto err; in get_attr()
433 if (py_insert_string(dict, "name", attr_name)) in get_attr()
455 rt = PyDict_SetItemString(dict, "types", list); in get_attr()
465 py_decref(dict); dict = NULL; in get_attr()
471 return dict; in get_attr()
604 PyObject *dict = PyDict_New(); in get_type() local
605 if (!dict) goto err; in get_type()
616 if (py_insert_string(dict, "name", type_name)) in get_type()
619 if (py_insert_bool(dict, "permissive", ispermissive)) in get_type()
624 rt = py_insert_obj(dict, "attributes", obj); in get_type()
630 rt = py_insert_obj(dict, "aliases", obj); in get_type()
638 py_decref(dict); dict = NULL; in get_type()
642 return dict; in get_type()
659 PyObject *dict = NULL; in get_booleans() local
677 dict = PyDict_New(); in get_booleans()
678 if (!dict) goto err; in get_booleans()
679 if (py_insert_string(dict, "name", name)) in get_booleans()
681 if (py_insert_bool(dict, "name", state)) in get_booleans()
683 rt = py_append_obj(list, dict); in get_booleans()
684 Py_DECREF(dict); dict = NULL; in get_booleans()
699 dict = PyDict_New(); in get_booleans()
700 if (!dict) goto err; in get_booleans()
701 if (py_insert_string(dict, "name", bool_name)) in get_booleans()
703 if (py_insert_bool(dict, "state", state)) in get_booleans()
705 rt = py_append_obj(list, dict); in get_booleans()
706 Py_DECREF(dict); dict = NULL; in get_booleans()
717 py_decref(dict); dict = NULL; in get_booleans()
746 PyObject *dict = NULL; in get_user() local
753 dict = PyDict_New(); in get_user()
754 if (!dict) goto err; in get_user()
756 if (py_insert_string(dict, "name", user_name)) in get_user()
765 if (py_insert_string(dict, "level", tmp)) in get_user()
774 if (py_insert_string(dict, "range", tmp)) in get_user()
790 rt = py_insert_obj(dict, "roles", list); in get_user()
799 py_decref(dict); dict=NULL; in get_user()
807 return dict; in get_user()
826 PyObject *dict = PyDict_New(); in get_class() local
827 if (!dict) goto err; in get_class()
835 if (py_insert_string(dict, "name", class_name)) in get_class()
864 rt = py_insert_obj(dict, "permlist", list); in get_class()
874 py_decref(dict); dict=NULL; in get_class()
879 return dict; in get_class()
1021 PyObject *dict = PyDict_New(); in get_role() local
1022 if (!dict) goto err; in get_role()
1026 if (py_insert_string(dict, "name", role_name)) in get_role()
1044 rt = py_insert_obj(dict, "roles", list); in get_role()
1065 rt = py_insert_obj(dict, "types", list); in get_role()
1075 py_decref(dict); dict = NULL; in get_role()
1080 return dict; in get_role()
1110 PyObject *dict = NULL; in get_ports() local
1154 dict = PyDict_New(); in get_ports()
1155 if (!dict) goto err; in get_ports()
1156 if (py_insert_string(dict, "type", type)) in get_ports()
1164 if (py_insert_string(dict, "range", range_str)) in get_ports()
1168 if (py_insert_string(dict, "protocol", proto_str)) in get_ports()
1171 if (py_insert_long(dict, "high", high_port)) in get_ports()
1174 if (py_insert_long(dict, "low", low_port)) in get_ports()
1177 rt = py_append_obj(list, dict); in get_ports()
1178 Py_DECREF(dict); dict = NULL; in get_ports()
1187 py_decref(dict); dict = NULL; in get_ports()