Skip to content

Commit 2e10c8b

Browse files
committed
Suppresses C++ name mangling
1 parent 0529940 commit 2e10c8b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

cmp.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#ifndef CMP_H__
22
#define CMP_H__
33

4-
#if defined (__cplusplus)
5-
extern "C" {
6-
#endif
7-
84
struct cmp_ctx_s;
95

106
typedef bool (*cmp_reader)(struct cmp_ctx_s *ctx, void *data, size_t limit);
@@ -85,6 +81,10 @@ typedef struct cmp_object_s {
8581
union cmp_object_data_u as;
8682
} cmp_object_t;
8783

84+
#ifdef __cplusplus
85+
extern "C" {
86+
#endif
87+
8888
/*
8989
* ============================================================================
9090
* === Main API
@@ -350,11 +350,11 @@ bool cmp_read_ext16(cmp_ctx_t *ctx, int8_t *type, uint16_t *size, void *data);
350350
bool cmp_read_ext32_marker(cmp_ctx_t *ctx, int8_t *type, uint32_t *size);
351351
bool cmp_read_ext32(cmp_ctx_t *ctx, int8_t *type, uint32_t *size, void *data);
352352

353-
#if defined (__cplusplus)
353+
#ifdef __cplusplus
354354
}
355-
#endif
355+
#endif /* extern "C" */
356356

357-
#endif
357+
#endif /* CMP_H__ */
358358

359359
/* vi: set et ts=2 sw=2: */
360360

0 commit comments

Comments
 (0)