| 1179 | } |
| 1180 | |
| 1181 | static PyObject * |
| 1182 | txn_begin(UpsTransaction *self, PyObject *args) |
| 1183 | { |
| 1184 | UpsEnvironment *env = 0; |
| 1185 | |
| 1186 | if (!PyArg_ParseTuple(args, "O!:begin", &UpsEnvironment_Type, &env)) |
| 1187 | return (0); |
| 1188 | |
| 1189 | if (self->txn) |
| 1190 | ups_txn_abort(self->txn, 0); |
| 1191 | |
| 1192 | ups_status_t st = ups_txn_begin(&self->txn, env->env, 0, 0, 0); |
| 1193 | if (st) |
| 1194 | THROW(st); |
| 1195 | |
| 1196 | Py_INCREF(self); |
| 1197 | return ((PyObject *)self); |
| 1198 | } |
| 1199 | |
| 1200 | static PyObject * |
| 1201 | txn_abort(UpsTransaction *self, PyObject *args) |
no test coverage detected