@@ -461,10 +461,7 @@ static PyObject *Admin_create_topics (Handle *self, PyObject *args,
461
461
rd_kafka_AdminOptions_destroy (c_options );
462
462
rd_kafka_queue_destroy (rkqu ); /* drop reference from get_background */
463
463
464
- /* Increase refcount for the return value since
465
- * it is currently a borrowed reference. */
466
- Py_INCREF (future );
467
- return future ;
464
+ Py_RETURN_NONE ;
468
465
469
466
err :
470
467
rd_kafka_NewTopic_destroy_array (c_objs , i );
@@ -565,10 +562,7 @@ static PyObject *Admin_delete_topics (Handle *self, PyObject *args,
565
562
rd_kafka_AdminOptions_destroy (c_options );
566
563
rd_kafka_queue_destroy (rkqu ); /* drop reference from get_background */
567
564
568
- /* Increase refcount for the return value since
569
- * it is currently a borrowed reference. */
570
- Py_INCREF (future );
571
- return future ;
565
+ Py_RETURN_NONE ;
572
566
573
567
err :
574
568
rd_kafka_DeleteTopic_destroy_array (c_objs , i );
@@ -693,10 +687,7 @@ static PyObject *Admin_create_partitions (Handle *self, PyObject *args,
693
687
rd_kafka_AdminOptions_destroy (c_options );
694
688
rd_kafka_queue_destroy (rkqu ); /* drop reference from get_background */
695
689
696
- /* Increase refcount for the return value since
697
- * it is currently a borrowed reference. */
698
- Py_INCREF (future );
699
- return future ;
690
+ Py_RETURN_NONE ;
700
691
701
692
err :
702
693
rd_kafka_NewPartitions_destroy_array (c_objs , i );
@@ -824,10 +815,7 @@ static PyObject *Admin_describe_configs (Handle *self, PyObject *args,
824
815
825
816
Py_DECREF (ConfigResource_type ); /* from lookup() */
826
817
827
- /* Increase refcount for the return value since
828
- * it is currently a borrowed reference. */
829
- Py_INCREF (future );
830
- return future ;
818
+ Py_RETURN_NONE ;
831
819
832
820
err :
833
821
rd_kafka_ConfigResource_destroy_array (c_objs , i );
@@ -1014,10 +1002,7 @@ static PyObject *Admin_alter_configs (Handle *self, PyObject *args,
1014
1002
1015
1003
Py_DECREF (ConfigResource_type ); /* from lookup() */
1016
1004
1017
- /* Increase refcount for the return value since
1018
- * it is currently a borrowed reference. */
1019
- Py_INCREF (future );
1020
- return future ;
1005
+ Py_RETURN_NONE ;
1021
1006
1022
1007
err :
1023
1008
rd_kafka_ConfigResource_destroy_array (c_objs , i );
0 commit comments