Skip to content

Commit 18483ee

Browse files
RockfordWeibjori
authored andcommitted
Fixing gridfs_file_set_xxx wouldn’t export to module map.
When using clang to export modules, functions set of mongo_gridfs_file_set_xxx couldn’t export to destination simply because only the getting methods were marked with BSON_API. Typical scenario is a third party exporting, such as c library exporting for Swift language. Script test-libmongoc, which includes GridFS, passed. This issue was found by Kyle Jessup and Rockford Wei, perfect.org
1 parent 0b87289 commit 18483ee

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

src/mongoc/mongoc-gridfs-file.h

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,20 @@
2828
BSON_BEGIN_DECLS
2929

3030

31-
#define MONGOC_GRIDFS_FILE_STR_HEADER(name) \
32-
BSON_API \
33-
const char * \
34-
mongoc_gridfs_file_get_##name (mongoc_gridfs_file_t * file); \
35-
void \
36-
mongoc_gridfs_file_set_##name (mongoc_gridfs_file_t * file, \
37-
const char *str);
38-
39-
40-
#define MONGOC_GRIDFS_FILE_BSON_HEADER(name) \
41-
BSON_API \
42-
const bson_t * \
43-
mongoc_gridfs_file_get_##name (mongoc_gridfs_file_t * file); \
44-
void \
45-
mongoc_gridfs_file_set_##name (mongoc_gridfs_file_t * file, \
46-
const bson_t * bson);
47-
31+
#define MONGOC_GRIDFS_FILE_STR_HEADER(name) \
32+
BSON_API \
33+
const char *mongoc_gridfs_file_get_##name (mongoc_gridfs_file_t *file); \
34+
BSON_API \
35+
void mongoc_gridfs_file_set_##name (mongoc_gridfs_file_t *file, \
36+
const char *str);
37+
38+
39+
#define MONGOC_GRIDFS_FILE_BSON_HEADER(name) \
40+
BSON_API \
41+
const bson_t *mongoc_gridfs_file_get_##name (mongoc_gridfs_file_t *file); \
42+
BSON_API \
43+
void mongoc_gridfs_file_set_##name (mongoc_gridfs_file_t *file, \
44+
const bson_t *bson);
4845

4946
typedef struct _mongoc_gridfs_file_t mongoc_gridfs_file_t;
5047
typedef struct _mongoc_gridfs_file_opt_t mongoc_gridfs_file_opt_t;

0 commit comments

Comments
 (0)