diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-03-17 03:10:10 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-03-17 03:49:34 +0000 |
| commit | 97220eadc65c03abf2b36fbff85b4f4f531e074b (patch) | |
| tree | f973b481aaa4afe246d5a7957893cade8c82bdc9 /psycopg/cursor_int.c | |
| parent | e740c21ee6b47a1d6534e4378bd8291100aae817 (diff) | |
| download | psycopg2-97220eadc65c03abf2b36fbff85b4f4f531e074b.tar.gz | |
Added helper methods to set a result into a connection/cursor
Diffstat (limited to 'psycopg/cursor_int.c')
| -rw-r--r-- | psycopg/cursor_int.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/psycopg/cursor_int.c b/psycopg/cursor_int.c index bebbeaa..453bf61 100644 --- a/psycopg/cursor_int.c +++ b/psycopg/cursor_int.c @@ -160,3 +160,11 @@ exit: Py_XDECREF(comp); return rv; } + + +void +curs_set_result(cursorObject *self, PGresult *pgres) +{ + PQclear(self->pgres); + self->pgres = pgres; +} |
