Skip to content

Commit 0e776ff

Browse files
committed
CDRIVER-2231 wrap all public functions in extern "C"
1 parent 15e89d0 commit 0e776ff

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/mongoc/mongoc-server-description.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "mongoc-read-prefs.h"
2424
#include "mongoc-host-list.h"
2525

26+
BSON_BEGIN_DECLS
27+
2628
typedef struct _mongoc_server_description_t mongoc_server_description_t;
2729

2830
MONGOC_EXPORT (void)
@@ -55,4 +57,6 @@ mongoc_server_description_compressor_id (
5557
const mongoc_server_description_t *description);
5658
#endif
5759

60+
BSON_END_DECLS
61+
5862
#endif

src/mongoc/mongoc-topology-description.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "mongoc-read-prefs.h"
2424

2525

26+
BSON_BEGIN_DECLS
27+
2628
typedef struct _mongoc_topology_description_t mongoc_topology_description_t;
2729

2830
MONGOC_EXPORT (bool)
@@ -37,4 +39,6 @@ MONGOC_EXPORT (mongoc_server_description_t **)
3739
mongoc_topology_description_get_servers (
3840
const mongoc_topology_description_t *td, size_t *n);
3941

42+
BSON_END_DECLS
43+
4044
#endif /* MONGOC_TOPOLOGY_DESCRIPTION_H */

src/mongoc/mongoc-version-functions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
#include "mongoc-macros.h"
2929

30+
BSON_BEGIN_DECLS
31+
3032
MONGOC_EXPORT (int)
3133
mongoc_get_major_version (void);
3234
MONGOC_EXPORT (int)
@@ -40,4 +42,6 @@ mongoc_check_version (int required_major,
4042
int required_minor,
4143
int required_micro);
4244

45+
BSON_END_DECLS
46+
4347
#endif /* MONGOC_VERSION_FUNCTIONS_H */

0 commit comments

Comments
 (0)