@@ -64,8 +64,7 @@ strip_severity(const char *msg)
6464 code. A list of error codes can be found at:
6565
6666 http://www.postgresql.org/docs/current/static/errcodes-appendix.html */
67- CPYCHECKER_RETURNS_BORROWED_REF
68- static PyObject *
67+ BORROWED static PyObject *
6968exception_from_sqlstate (const char * sqlstate )
7069{
7170 switch (sqlstate [0 ]) {
@@ -152,8 +151,7 @@ exception_from_sqlstate(const char *sqlstate)
152151
153152 This function should be called while holding the GIL. */
154153
155- CPYCHECKER_SETS_EXCEPTION
156- static void
154+ RAISES static void
157155pq_raise (connectionObject * conn , cursorObject * curs , PGresult * pgres )
158156{
159157 PyObject * exc = NULL ;
@@ -253,8 +251,7 @@ pq_clear_critical(connectionObject *conn)
253251
254252/* return -1 if the exception is set (i.e. if conn->critical is set),
255253 * else 0 */
256- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
257- static int
254+ RAISES_NEG static int
258255pq_resolve_critical (connectionObject * conn , int close )
259256{
260257 Dprintf ("pq_resolve_critical: resolving %s" , conn -> critical );
@@ -389,8 +386,7 @@ pq_execute_command_locked(connectionObject *conn, const char *query,
389386 This function should be called while holding the global interpreter
390387 lock.
391388 */
392- CPYCHECKER_SETS_EXCEPTION
393- void
389+ RAISES void
394390pq_complete_error (connectionObject * conn , PGresult * * pgres , char * * error )
395391{
396392 Dprintf ("pq_complete_error: pgconn = %p, pgres = %p, error = %s" ,
@@ -483,8 +479,7 @@ pq_commit(connectionObject *conn)
483479 return retvalue ;
484480}
485481
486- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
487- int
482+ RAISES_NEG int
488483pq_abort_locked (connectionObject * conn , PGresult * * pgres , char * * error ,
489484 PyThreadState * * tstate )
490485{
@@ -511,8 +506,7 @@ pq_abort_locked(connectionObject *conn, PGresult **pgres, char **error,
511506 This function should be called while holding the global interpreter
512507 lock. */
513508
514- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
515- int
509+ RAISES_NEG int
516510pq_abort (connectionObject * conn )
517511{
518512 int retvalue = -1 ;
@@ -554,8 +548,7 @@ pq_abort(connectionObject *conn)
554548 connection without holding the global interpreter lock.
555549*/
556550
557- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
558- int
551+ RAISES_NEG int
559552pq_reset_locked (connectionObject * conn , PGresult * * pgres , char * * error ,
560553 PyThreadState * * tstate )
561554{
@@ -847,8 +840,7 @@ pq_flush(connectionObject *conn)
847840 this fucntion locks the connection object
848841 this function call Py_*_ALLOW_THREADS macros */
849842
850- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
851- int
843+ RAISES_NEG int
852844pq_execute (cursorObject * curs , const char * query , int async )
853845{
854846 PGresult * pgres = NULL ;
@@ -1028,8 +1020,7 @@ pq_get_last_result(connectionObject *conn)
10281020 1 - result from backend (possibly data is ready)
10291021*/
10301022
1031- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
1032- static int
1023+ RAISES_NEG static int
10331024_pq_fetch_tuples (cursorObject * curs )
10341025{
10351026 int i , * dsize = NULL ;
0 commit comments