while (PyDict_Next(py_obj, &dict_pos, &key, &value)) {
char *key_str = PyString_AsString(key);
- if (strcmp(key_str, "dn") != 0) {
+ if (ldb_attr_cmp(key_str, "dn") != 0) {
msg_el = PyObject_AsMessageElement(msg->elements, value,
mod_flags, key_str);
if (msg_el == NULL) {
return NULL;
}
name = PyString_AsString(py_name);
- if (!strcmp(name, "dn"))
+ if (!ldb_attr_cmp(name, "dn"))
return pyldb_Dn_FromDn(msg->dn);
el = ldb_msg_find_element(msg, name);
if (el == NULL) {