From fd52a094f3f5c860591610a842a30f22103ec06b Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 21 Dec 2020 02:39:09 +0100 Subject: [PATCH] Fixed typos in cython --- psycopg3_c/psycopg3_c/pq/pgconn.pyx | 12 ++++++------ psycopg3_c/psycopg3_c/pq/pgresult.pyx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/psycopg3_c/psycopg3_c/pq/pgconn.pyx b/psycopg3_c/psycopg3_c/pq/pgconn.pyx index f2a1f966e..0cf4af703 100644 --- a/psycopg3_c/psycopg3_c/pq/pgconn.pyx +++ b/psycopg3_c/psycopg3_c/pq/pgconn.pyx @@ -202,7 +202,7 @@ cdef class PGconn: cdef int cnparams cdef Oid *ctypes cdef char *const *cvalues - cdef int *clenghts + cdef int *clengths cdef int *cformats cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( param_values, param_types, param_formats) @@ -228,7 +228,7 @@ cdef class PGconn: cdef int cnparams cdef Oid *ctypes cdef char *const *cvalues - cdef int *clenghts + cdef int *clengths cdef int *cformats cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( param_values, param_types, param_formats) @@ -280,7 +280,7 @@ cdef class PGconn: cdef int cnparams cdef Oid *ctypes cdef char *const *cvalues - cdef int *clenghts + cdef int *clengths cdef int *cformats cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( param_values, None, param_formats) @@ -330,7 +330,7 @@ cdef class PGconn: cdef int cnparams cdef Oid *ctypes cdef char *const *cvalues - cdef int *clenghts + cdef int *clengths cdef int *cformats cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( param_values, None, param_formats) @@ -549,9 +549,9 @@ cdef (int, Oid *, char * const*, int *, int *) _query_params_args( cdef void _clear_query_params( - Oid *ctypes, char *const *cvalues, int *clenghts, int *cformats + Oid *ctypes, char *const *cvalues, int *clenghst, int *cformats ): PyMem_Free(ctypes) PyMem_Free(cvalues) - PyMem_Free(clenghts) + PyMem_Free(clenghst) PyMem_Free(cformats) diff --git a/psycopg3_c/psycopg3_c/pq/pgresult.pyx b/psycopg3_c/psycopg3_c/pq/pgresult.pyx index b170d221f..909d6dd1c 100644 --- a/psycopg3_c/psycopg3_c/pq/pgresult.pyx +++ b/psycopg3_c/psycopg3_c/pq/pgresult.pyx @@ -93,7 +93,7 @@ cdef class PGresult: cdef int crow = row_number cdef int ccol = column_number cdef int length = libpq.PQgetlength(self.pgresult_ptr, crow, ccol) - cdef char *v; + cdef char *v if length: v = libpq.PQgetvalue(self.pgresult_ptr, crow, ccol) # TODO: avoid copy @@ -146,7 +146,7 @@ cdef class PGresult: attrs[i].typlen = descr.typlen attrs[i].atttypmod = descr.atttypmod - cdef int res = libpq.PQsetResultAttrs(self.pgresult_ptr, num, attrs); + cdef int res = libpq.PQsetResultAttrs(self.pgresult_ptr, num, attrs) PyMem_Free(attrs) if (res == 0): raise PQerror("PQsetResultAttrs failed") -- 2.47.2