Skip to content

Commit cf5a95b

Browse files
committed
Fix PY_SSIZE_T_CLEAN warning
1 parent b96bc1d commit cf5a95b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/confluent_kafka/src/Producer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Producer_produce0 (Handle *self,
228228
static PyObject *Producer_produce (Handle *self, PyObject *args,
229229
PyObject *kwargs) {
230230
const char *topic, *value = NULL, *key = NULL;
231-
int value_len = 0, key_len = 0;
231+
Py_ssize_t value_len = 0, key_len = 0;
232232
int partition = RD_KAFKA_PARTITION_UA;
233233
PyObject *headers = NULL, *dr_cb = NULL, *dr_cb2 = NULL;
234234
long long timestamp = 0;

src/confluent_kafka/src/confluent_kafka.h

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17+
#define PY_SSIZE_T_CLEAN
1718
#include <Python.h>
1819
#include <structmember.h>
1920
#include <pythread.h>

0 commit comments

Comments
 (0)