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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)
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