Skip to content

Commit

Permalink
Remove warning
Browse files Browse the repository at this point in the history
  • Loading branch information
emasab committed Apr 4, 2023
1 parent 863ed15 commit 9083277
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/confluent_kafka/src/confluent_kafka.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,7 @@ static int TopicPartition_traverse (TopicPartition *self,
return 0;
}

static PyObject *TopicPartition_get_leader_epoch (PyObject *po, void *closure) {
TopicPartition *tp = po;
static PyObject *TopicPartition_get_leader_epoch (TopicPartition *tp, void *closure) {
if (tp->leader_epoch >= 0) {
return cfl_PyInt_FromInt(tp->leader_epoch);
}
Expand Down Expand Up @@ -943,8 +942,9 @@ static PyMemberDef TopicPartition_members[] = {
{ NULL }
};

static PyGetSetDef TopicPartition_getter_and_setters[] = {
{ "leader_epoch", TopicPartition_get_leader_epoch,
static PyGetSetDef TopicPartition_getters_and_setters[] = {
{ "leader_epoch",
(getter) TopicPartition_get_leader_epoch,
NULL,
":attribute leader_epoch: Offset leader epoch (int), or None"},
};
Expand Down Expand Up @@ -1081,20 +1081,20 @@ PyTypeObject TopicPartitionType = {
(traverseproc)TopicPartition_traverse, /* tp_traverse */
(inquiry)TopicPartition_clear, /* tp_clear */
(richcmpfunc)TopicPartition_richcompare, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
TopicPartition_members, /* tp_members */
TopicPartition_getter_and_setters, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
TopicPartition_init, /* tp_init */
0, /* tp_alloc */
TopicPartition_new /* tp_new */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
TopicPartition_members, /* tp_members */
TopicPartition_getters_and_setters, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
TopicPartition_init, /* tp_init */
0, /* tp_alloc */
TopicPartition_new /* tp_new */
};

/**
Expand Down

0 comments on commit 9083277

Please sign in to comment.