Skip to content

Commit 19365a0

Browse files
floreanedenhill
authored andcommitted
Fix #if directives in Producer. (#317)
Some checks that should be #ifdef directives were instead #if directives, causing headers to not be sent with messages.
1 parent 2938212 commit 19365a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

confluent_kafka/src/Producer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Producer_producev (Handle *self,
259259
const void *value, size_t value_len,
260260
const void *key, size_t key_len,
261261
void *opaque, int64_t timestamp
262-
#if RD_KAFKA_V_HEADERS
262+
#ifdef RD_KAFKA_V_HEADERS
263263
,rd_kafka_headers_t *headers
264264
#endif
265265
) {
@@ -272,7 +272,7 @@ Producer_producev (Handle *self,
272272
RD_KAFKA_V_VALUE((void *)value,
273273
(size_t)value_len),
274274
RD_KAFKA_V_TIMESTAMP(timestamp),
275-
#if RD_KAFKA_V_HEADERS
275+
#ifdef RD_KAFKA_V_HEADERS
276276
RD_KAFKA_V_HEADERS(headers),
277277
#endif
278278
RD_KAFKA_V_OPAQUE(opaque),
@@ -386,7 +386,7 @@ static PyObject *Producer_produce (Handle *self, PyObject *args,
386386
value, value_len,
387387
key, key_len,
388388
msgstate, timestamp
389-
#if RD_KAFKA_V_HEADERS
389+
#ifdef RD_KAFKA_V_HEADERS
390390
,rd_headers
391391
#endif
392392
);

0 commit comments

Comments
 (0)