@@ -664,8 +664,7 @@ _mysql_debug(
664664 char * debug ;
665665 if (!PyArg_ParseTuple (args , "s" , & debug )) return NULL ;
666666 mysql_debug (debug );
667- Py_INCREF (Py_None );
668- return Py_None ;
667+ Py_RETURN_NONE ;
669668}
670669
671670static char _mysql_ConnectionObject_dump_debug_info__doc__ [] =
@@ -685,8 +684,7 @@ _mysql_ConnectionObject_dump_debug_info(
685684 err = mysql_dump_debug_info (& (self -> connection ));
686685 Py_END_ALLOW_THREADS
687686 if (err ) return _mysql_Exception (self );
688- Py_INCREF (Py_None );
689- return Py_None ;
687+ Py_RETURN_NONE ;
690688}
691689
692690static char _mysql_ConnectionObject_autocommit__doc__ [] =
@@ -704,8 +702,7 @@ _mysql_ConnectionObject_autocommit(
704702 err = mysql_autocommit (& (self -> connection ), flag );
705703 Py_END_ALLOW_THREADS
706704 if (err ) return _mysql_Exception (self );
707- Py_INCREF (Py_None );
708- return Py_None ;
705+ Py_RETURN_NONE ;
709706}
710707
711708static char _mysql_ConnectionObject_get_autocommit__doc__ [] =
@@ -737,8 +734,7 @@ _mysql_ConnectionObject_commit(
737734 err = mysql_commit (& (self -> connection ));
738735 Py_END_ALLOW_THREADS
739736 if (err ) return _mysql_Exception (self );
740- Py_INCREF (Py_None );
741- return Py_None ;
737+ Py_RETURN_NONE ;
742738}
743739
744740static char _mysql_ConnectionObject_rollback__doc__ [] =
@@ -1591,8 +1587,7 @@ _mysql_ConnectionObject_info(
15911587 check_connection (self );
15921588 s = mysql_info (& (self -> connection ));
15931589 if (s ) return PyString_FromString (s );
1594- Py_INCREF (Py_None );
1595- return Py_None ;
1590+ Py_RETURN_NONE ;
15961591}
15971592
15981593static char _mysql_ConnectionObject_insert_id__doc__ [] =
@@ -1646,8 +1641,7 @@ _mysql_ConnectionObject_kill(
16461641 r = mysql_kill (& (self -> connection ), pid );
16471642 Py_END_ALLOW_THREADS
16481643 if (r ) return _mysql_Exception (self );
1649- Py_INCREF (Py_None );
1650- return Py_None ;
1644+ Py_RETURN_NONE ;
16511645}
16521646
16531647static char _mysql_ConnectionObject_field_count__doc__ [] =
@@ -1741,8 +1735,7 @@ _mysql_ConnectionObject_ping(
17411735 r = mysql_ping (& (self -> connection ));
17421736 Py_END_ALLOW_THREADS
17431737 if (r ) return _mysql_Exception (self );
1744- Py_INCREF (Py_None );
1745- return Py_None ;
1738+ Py_RETURN_NONE ;
17461739}
17471740
17481741static char _mysql_ConnectionObject_query__doc__ [] =
@@ -1765,8 +1758,7 @@ _mysql_ConnectionObject_query(
17651758 r = mysql_real_query (& (self -> connection ), query , len );
17661759 Py_END_ALLOW_THREADS
17671760 if (r ) return _mysql_Exception (self );
1768- Py_INCREF (Py_None );
1769- return Py_None ;
1761+ Py_RETURN_NONE ;
17701762}
17711763
17721764
@@ -1789,8 +1781,7 @@ _mysql_ConnectionObject_send_query(
17891781 r = mysql_send_query (mysql , query , len );
17901782 Py_END_ALLOW_THREADS
17911783 if (r ) return _mysql_Exception (self );
1792- Py_INCREF (Py_None );
1793- return Py_None ;
1784+ Py_RETURN_NONE ;
17941785}
17951786
17961787
@@ -1810,8 +1801,7 @@ _mysql_ConnectionObject_read_query_result(
18101801 r = (int )mysql_read_query_result (mysql );
18111802 Py_END_ALLOW_THREADS
18121803 if (r ) return _mysql_Exception (self );
1813- Py_INCREF (Py_None );
1814- return Py_None ;
1804+ Py_RETURN_NONE ;
18151805}
18161806
18171807static char _mysql_ConnectionObject_select_db__doc__ [] =
@@ -1839,8 +1829,7 @@ _mysql_ConnectionObject_select_db(
18391829 r = mysql_select_db (& (self -> connection ), db );
18401830 Py_END_ALLOW_THREADS
18411831 if (r ) return _mysql_Exception (self );
1842- Py_INCREF (Py_None );
1843- return Py_None ;
1832+ Py_RETURN_NONE ;
18441833}
18451834
18461835static char _mysql_ConnectionObject_shutdown__doc__ [] =
@@ -1859,8 +1848,7 @@ _mysql_ConnectionObject_shutdown(
18591848 r = mysql_shutdown (& (self -> connection ), SHUTDOWN_DEFAULT );
18601849 Py_END_ALLOW_THREADS
18611850 if (r ) return _mysql_Exception (self );
1862- Py_INCREF (Py_None );
1863- return Py_None ;
1851+ Py_RETURN_NONE ;
18641852}
18651853
18661854static char _mysql_ConnectionObject_stat__doc__ [] =
@@ -2021,8 +2009,7 @@ _mysql_ResultObject_data_seek(
20212009 if (!PyArg_ParseTuple (args , "i:data_seek" , & row )) return NULL ;
20222010 check_result_connection (self );
20232011 mysql_data_seek (self -> result , row );
2024- Py_INCREF (Py_None );
2025- return Py_None ;
2012+ Py_RETURN_NONE ;
20262013}
20272014
20282015static void
0 commit comments