| 280 | } |
| 281 | |
| 282 | static void |
| 283 | PLy_cursor_dealloc(PyObject *arg) |
| 284 | { |
| 285 | PLyCursorObject *cursor; |
| 286 | Portal portal; |
| 287 | |
| 288 | cursor = (PLyCursorObject *) arg; |
| 289 | |
| 290 | if (!cursor->closed) |
| 291 | { |
| 292 | portal = GetPortalByName(cursor->portalname); |
| 293 | |
| 294 | if (PortalIsValid(portal)) |
| 295 | { |
| 296 | UnpinPortal(portal); |
| 297 | SPI_cursor_close(portal); |
| 298 | } |
| 299 | cursor->closed = true; |
| 300 | } |
| 301 | if (cursor->mcxt) |
| 302 | { |
| 303 | MemoryContextDelete(cursor->mcxt); |
| 304 | cursor->mcxt = NULL; |
| 305 | } |
| 306 | arg->ob_type->tp_free(arg); |
| 307 | } |
| 308 | |
| 309 | static PyObject * |
| 310 | PLy_cursor_iternext(PyObject *self) |
nothing calls this directly
no test coverage detected