Skip to content

Commit 3aa92b3

Browse files
committed
Don't return the future from the C Admin methods, not needed
1 parent 868787d commit 3aa92b3

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

confluent_kafka/src/Admin.c

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,7 @@ static PyObject *Admin_create_topics (Handle *self, PyObject *args,
461461
rd_kafka_AdminOptions_destroy(c_options);
462462
rd_kafka_queue_destroy(rkqu); /* drop reference from get_background */
463463

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;
468465

469466
err:
470467
rd_kafka_NewTopic_destroy_array(c_objs, i);
@@ -565,10 +562,7 @@ static PyObject *Admin_delete_topics (Handle *self, PyObject *args,
565562
rd_kafka_AdminOptions_destroy(c_options);
566563
rd_kafka_queue_destroy(rkqu); /* drop reference from get_background */
567564

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;
572566

573567
err:
574568
rd_kafka_DeleteTopic_destroy_array(c_objs, i);
@@ -693,10 +687,7 @@ static PyObject *Admin_create_partitions (Handle *self, PyObject *args,
693687
rd_kafka_AdminOptions_destroy(c_options);
694688
rd_kafka_queue_destroy(rkqu); /* drop reference from get_background */
695689

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;
700691

701692
err:
702693
rd_kafka_NewPartitions_destroy_array(c_objs, i);
@@ -824,10 +815,7 @@ static PyObject *Admin_describe_configs (Handle *self, PyObject *args,
824815

825816
Py_DECREF(ConfigResource_type); /* from lookup() */
826817

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;
831819

832820
err:
833821
rd_kafka_ConfigResource_destroy_array(c_objs, i);
@@ -1014,10 +1002,7 @@ static PyObject *Admin_alter_configs (Handle *self, PyObject *args,
10141002

10151003
Py_DECREF(ConfigResource_type); /* from lookup() */
10161004

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;
10211006

10221007
err:
10231008
rd_kafka_ConfigResource_destroy_array(c_objs, i);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy