@@ -664,8 +664,7 @@ _mysql_debug(
664
664
char * debug ;
665
665
if (!PyArg_ParseTuple (args , "s" , & debug )) return NULL ;
666
666
mysql_debug (debug );
667
- Py_INCREF (Py_None );
668
- return Py_None ;
667
+ Py_RETURN_NONE ;
669
668
}
670
669
671
670
static char _mysql_ConnectionObject_dump_debug_info__doc__ [] =
@@ -685,8 +684,7 @@ _mysql_ConnectionObject_dump_debug_info(
685
684
err = mysql_dump_debug_info (& (self -> connection ));
686
685
Py_END_ALLOW_THREADS
687
686
if (err ) return _mysql_Exception (self );
688
- Py_INCREF (Py_None );
689
- return Py_None ;
687
+ Py_RETURN_NONE ;
690
688
}
691
689
692
690
static char _mysql_ConnectionObject_autocommit__doc__ [] =
@@ -704,8 +702,7 @@ _mysql_ConnectionObject_autocommit(
704
702
err = mysql_autocommit (& (self -> connection ), flag );
705
703
Py_END_ALLOW_THREADS
706
704
if (err ) return _mysql_Exception (self );
707
- Py_INCREF (Py_None );
708
- return Py_None ;
705
+ Py_RETURN_NONE ;
709
706
}
710
707
711
708
static char _mysql_ConnectionObject_get_autocommit__doc__ [] =
@@ -737,8 +734,7 @@ _mysql_ConnectionObject_commit(
737
734
err = mysql_commit (& (self -> connection ));
738
735
Py_END_ALLOW_THREADS
739
736
if (err ) return _mysql_Exception (self );
740
- Py_INCREF (Py_None );
741
- return Py_None ;
737
+ Py_RETURN_NONE ;
742
738
}
743
739
744
740
static char _mysql_ConnectionObject_rollback__doc__ [] =
@@ -1591,8 +1587,7 @@ _mysql_ConnectionObject_info(
1591
1587
check_connection (self );
1592
1588
s = mysql_info (& (self -> connection ));
1593
1589
if (s ) return PyString_FromString (s );
1594
- Py_INCREF (Py_None );
1595
- return Py_None ;
1590
+ Py_RETURN_NONE ;
1596
1591
}
1597
1592
1598
1593
static char _mysql_ConnectionObject_insert_id__doc__ [] =
@@ -1646,8 +1641,7 @@ _mysql_ConnectionObject_kill(
1646
1641
r = mysql_kill (& (self -> connection ), pid );
1647
1642
Py_END_ALLOW_THREADS
1648
1643
if (r ) return _mysql_Exception (self );
1649
- Py_INCREF (Py_None );
1650
- return Py_None ;
1644
+ Py_RETURN_NONE ;
1651
1645
}
1652
1646
1653
1647
static char _mysql_ConnectionObject_field_count__doc__ [] =
@@ -1741,8 +1735,7 @@ _mysql_ConnectionObject_ping(
1741
1735
r = mysql_ping (& (self -> connection ));
1742
1736
Py_END_ALLOW_THREADS
1743
1737
if (r ) return _mysql_Exception (self );
1744
- Py_INCREF (Py_None );
1745
- return Py_None ;
1738
+ Py_RETURN_NONE ;
1746
1739
}
1747
1740
1748
1741
static char _mysql_ConnectionObject_query__doc__ [] =
@@ -1765,8 +1758,7 @@ _mysql_ConnectionObject_query(
1765
1758
r = mysql_real_query (& (self -> connection ), query , len );
1766
1759
Py_END_ALLOW_THREADS
1767
1760
if (r ) return _mysql_Exception (self );
1768
- Py_INCREF (Py_None );
1769
- return Py_None ;
1761
+ Py_RETURN_NONE ;
1770
1762
}
1771
1763
1772
1764
@@ -1789,8 +1781,7 @@ _mysql_ConnectionObject_send_query(
1789
1781
r = mysql_send_query (mysql , query , len );
1790
1782
Py_END_ALLOW_THREADS
1791
1783
if (r ) return _mysql_Exception (self );
1792
- Py_INCREF (Py_None );
1793
- return Py_None ;
1784
+ Py_RETURN_NONE ;
1794
1785
}
1795
1786
1796
1787
@@ -1810,8 +1801,7 @@ _mysql_ConnectionObject_read_query_result(
1810
1801
r = (int )mysql_read_query_result (mysql );
1811
1802
Py_END_ALLOW_THREADS
1812
1803
if (r ) return _mysql_Exception (self );
1813
- Py_INCREF (Py_None );
1814
- return Py_None ;
1804
+ Py_RETURN_NONE ;
1815
1805
}
1816
1806
1817
1807
static char _mysql_ConnectionObject_select_db__doc__ [] =
@@ -1839,8 +1829,7 @@ _mysql_ConnectionObject_select_db(
1839
1829
r = mysql_select_db (& (self -> connection ), db );
1840
1830
Py_END_ALLOW_THREADS
1841
1831
if (r ) return _mysql_Exception (self );
1842
- Py_INCREF (Py_None );
1843
- return Py_None ;
1832
+ Py_RETURN_NONE ;
1844
1833
}
1845
1834
1846
1835
static char _mysql_ConnectionObject_shutdown__doc__ [] =
@@ -1859,8 +1848,7 @@ _mysql_ConnectionObject_shutdown(
1859
1848
r = mysql_shutdown (& (self -> connection ), SHUTDOWN_DEFAULT );
1860
1849
Py_END_ALLOW_THREADS
1861
1850
if (r ) return _mysql_Exception (self );
1862
- Py_INCREF (Py_None );
1863
- return Py_None ;
1851
+ Py_RETURN_NONE ;
1864
1852
}
1865
1853
1866
1854
static char _mysql_ConnectionObject_stat__doc__ [] =
@@ -2021,8 +2009,7 @@ _mysql_ResultObject_data_seek(
2021
2009
if (!PyArg_ParseTuple (args , "i:data_seek" , & row )) return NULL ;
2022
2010
check_result_connection (self );
2023
2011
mysql_data_seek (self -> result , row );
2024
- Py_INCREF (Py_None );
2025
- return Py_None ;
2012
+ Py_RETURN_NONE ;
2026
2013
}
2027
2014
2028
2015
static void
0 commit comments