void *done_baton;
bool done;
PyObject *commit_callback;
- struct EditorObject *active_child;
+ bool active_child;
struct EditorObject *parent;
} EditorObject;
obj->done = false;
obj->done_baton = done_baton;
obj->commit_callback = commit_callback;
- obj->active_child = NULL;
+ obj->active_child = false;
if (parent != NULL) {
Py_INCREF(parent);
- parent->active_child = obj;
+ parent->active_child = true;
}
obj->parent = (EditorObject *)parent;
return (PyObject *)obj;
RUN_SVN(editor->editor->close_file(editor->baton, c_checksum,
editor->pool));
- editor->parent->active_child = NULL;
+ editor->parent->active_child = false;
Py_DECREF(editor->parent);
editor->done = true;
RUN_SVN(editor->editor->close_file(editor->baton, NULL, editor->pool));
- editor->parent->active_child = NULL;
+ editor->parent->active_child = false;
Py_DECREF(editor->parent);
editor->done = true;
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "a child is already open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "child is already open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "child is already open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "child is already open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "child is still open");
return NULL;
}
RUN_SVN(editor->editor->close_directory(editor->baton, editor->pool));
if (editor->parent != NULL) {
- editor->parent->active_child = NULL;
+ editor->parent->active_child = false;
Py_DECREF(editor->parent);
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "another child is still open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "another child is still open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "another child is still open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "another child is still open");
return NULL;
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "a child is still open");
return NULL;
}
RUN_SVN(editor->editor->close_directory(editor->baton, editor->pool));
if (editor->parent != NULL) {
- editor->parent->active_child = NULL;
+ editor->parent->active_child = false;
Py_DECREF(editor->parent);
}
return NULL;
}
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "a child is still open");
return NULL;
}
if (exc_type != Py_None) {
RUN_SVN(editor->editor->abort_edit(editor->baton, editor->pool));
} else {
- if (editor->active_child != NULL) {
+ if (editor->active_child) {
PyErr_SetString(PyExc_RuntimeError, "a child is still open");
return NULL;
}