Skip to content

Commit 2f475c5

Browse files
committed
stream-file: add mongoc_stream_file_t definition.
1 parent 255ab9e commit 2f475c5

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

doc/mongoc_api.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ linkmongoc:mongoc_gridfs_file_list[7] +
1010
linkmongoc:mongoc_read_prefs[7] +
1111
linkmongoc:mongoc_ssl[7] +
1212
linkmongoc:mongoc_stream[7] +
13+
linkmongoc:mongoc_stream_file[7] +
14+
linkmongoc:mongoc_stream_socket[7] +
15+
linkmongoc:mongoc_socket[7] +
1316
linkmongoc:mongoc_uri[7] +
1417
linkmongoc:mongoc_write_concern[7] +

src/mongoc/mongoc-stream-file.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
*/
3232

3333

34-
typedef struct
34+
struct _mongoc_stream_file_t
3535
{
3636
mongoc_stream_t vtable;
3737
int fd;
38-
} mongoc_stream_file_t;
38+
};
3939

4040

4141
static int
@@ -212,9 +212,9 @@ mongoc_stream_file_new_for_path (const char *path, /* IN */
212212

213213

214214
int
215-
mongoc_stream_file_get_fd (mongoc_stream_t *stream)
215+
mongoc_stream_file_get_fd (mongoc_stream_file_t *stream)
216216
{
217-
mongoc_stream_file_t *file = (mongoc_stream_file_t *)stream;
218-
bson_return_val_if_fail (file, -1);
219-
return file->fd;
217+
bson_return_val_if_fail (stream, -1);
218+
219+
return stream->fd;
220220
}

src/mongoc/mongoc-stream-file.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@
3030
BSON_BEGIN_DECLS
3131

3232

33-
mongoc_stream_t *mongoc_stream_file_new (int fd);
34-
mongoc_stream_t *mongoc_stream_file_new_for_path (const char *path,
35-
int flags,
36-
int mode);
37-
int mongoc_stream_file_get_fd (mongoc_stream_t *stream);
33+
typedef struct _mongoc_stream_file_t mongoc_stream_file_t;
34+
35+
36+
mongoc_stream_t *mongoc_stream_file_new (int fd);
37+
mongoc_stream_t *mongoc_stream_file_new_for_path (const char *path,
38+
int flags,
39+
int mode);
40+
int mongoc_stream_file_get_fd (mongoc_stream_file_t *stream);
3841

3942

4043
BSON_END_DECLS

0 commit comments

Comments
 (0)