Skip to content

Commit d26b2a1

Browse files
author
Christian Hergert
committed
whitespace cleanup.
1 parent 915702f commit d26b2a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+613
-935
lines changed

src/mongoc/mongoc-array-private.h

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,12 @@ struct _mongoc_array_t
4242
#define _mongoc_array_clear(a) (a)->len = 0
4343

4444

45-
void
46-
_mongoc_array_init (mongoc_array_t *array,
47-
size_t element_size)
48-
BSON_GNUC_INTERNAL;
49-
50-
void
51-
_mongoc_array_append_vals (mongoc_array_t *array,
52-
const void *data,
53-
uint32_t n_elements)
54-
BSON_GNUC_INTERNAL;
55-
56-
void
57-
_mongoc_array_destroy (mongoc_array_t *array)
58-
BSON_GNUC_INTERNAL;
45+
void _mongoc_array_init (mongoc_array_t *array,
46+
size_t element_size);
47+
void _mongoc_array_append_vals (mongoc_array_t *array,
48+
const void *data,
49+
uint32_t n_elements);
50+
void _mongoc_array_destroy (mongoc_array_t *array);
5951

6052

6153
BSON_END_DECLS

src/mongoc/mongoc-client-pool.h

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
#if !defined (MONGOC_INSIDE) && !defined (MONGOC_COMPILATION)
19-
#error "Only <mongoc.h> can be included directly."
19+
# error "Only <mongoc.h> can be included directly."
2020
#endif
2121

2222

@@ -36,21 +36,12 @@ BSON_BEGIN_DECLS
3636
typedef struct _mongoc_client_pool_t mongoc_client_pool_t;
3737

3838

39-
mongoc_client_pool_t *
40-
mongoc_client_pool_new (const mongoc_uri_t *uri);
41-
42-
void
43-
mongoc_client_pool_destroy (mongoc_client_pool_t *pool);
44-
45-
mongoc_client_t *
46-
mongoc_client_pool_pop (mongoc_client_pool_t *pool);
47-
48-
void
49-
mongoc_client_pool_push (mongoc_client_pool_t *pool,
50-
mongoc_client_t *client);
51-
52-
mongoc_client_t *
53-
mongoc_client_pool_try_pop (mongoc_client_pool_t *pool);
39+
mongoc_client_pool_t *mongoc_client_pool_new (const mongoc_uri_t *uri);
40+
void mongoc_client_pool_destroy (mongoc_client_pool_t *pool);
41+
mongoc_client_t *mongoc_client_pool_pop (mongoc_client_pool_t *pool);
42+
void mongoc_client_pool_push (mongoc_client_pool_t *pool,
43+
mongoc_client_t *client);
44+
mongoc_client_t *mongoc_client_pool_try_pop (mongoc_client_pool_t *pool);
5445

5546

5647
BSON_END_DECLS

src/mongoc/mongoc-client-private.h

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
#include "mongoc-host-list.h"
2929
#include "mongoc-read-prefs.h"
3030
#include "mongoc-rpc-private.h"
31-
#include "mongoc-stream.h"
32-
#include "mongoc-write-concern.h"
33-
3431
#ifdef MONGOC_ENABLE_SSL
3532
#include "mongoc-ssl.h"
3633
#endif
34+
#include "mongoc-stream.h"
35+
#include "mongoc-write-concern.h"
3736

3837

3938
BSON_BEGIN_DECLS
@@ -60,45 +59,28 @@ struct _mongoc_client_t
6059
};
6160

6261

63-
mongoc_stream_t *
64-
_mongoc_client_create_stream (mongoc_client_t *client,
65-
const mongoc_host_list_t *host,
66-
bson_error_t *error)
67-
BSON_GNUC_INTERNAL;
68-
69-
uint32_t
70-
_mongoc_client_sendv (mongoc_client_t *client,
71-
mongoc_rpc_t *rpcs,
72-
size_t rpcs_len,
73-
uint32_t hint,
74-
const mongoc_write_concern_t *write_concern,
75-
const mongoc_read_prefs_t *read_prefs,
76-
bson_error_t *error)
77-
BSON_GNUC_INTERNAL;
78-
79-
bool
80-
_mongoc_client_recv (mongoc_client_t *client,
81-
mongoc_rpc_t *rpc,
82-
mongoc_buffer_t *buffer,
83-
uint32_t hint,
84-
bson_error_t *error)
85-
BSON_GNUC_INTERNAL;
86-
87-
bool
88-
_mongoc_client_recv_gle (mongoc_client_t *client,
89-
uint32_t hint,
90-
bson_error_t *error)
91-
BSON_GNUC_INTERNAL;
92-
93-
uint32_t
94-
_mongoc_client_stamp (mongoc_client_t *client,
95-
uint32_t node)
96-
BSON_GNUC_INTERNAL;
97-
98-
bool
99-
_mongoc_client_warm_up (mongoc_client_t *client,
100-
bson_error_t *error)
101-
BSON_GNUC_INTERNAL;
62+
mongoc_stream_t *_mongoc_client_create_stream (mongoc_client_t *client,
63+
const mongoc_host_list_t *host,
64+
bson_error_t *error);
65+
uint32_t _mongoc_client_sendv (mongoc_client_t *client,
66+
mongoc_rpc_t *rpcs,
67+
size_t rpcs_len,
68+
uint32_t hint,
69+
const mongoc_write_concern_t *write_concern,
70+
const mongoc_read_prefs_t *read_prefs,
71+
bson_error_t *error);
72+
bool _mongoc_client_recv (mongoc_client_t *client,
73+
mongoc_rpc_t *rpc,
74+
mongoc_buffer_t *buffer,
75+
uint32_t hint,
76+
bson_error_t *error);
77+
bool _mongoc_client_recv_gle (mongoc_client_t *client,
78+
uint32_t hint,
79+
bson_error_t *error);
80+
uint32_t _mongoc_client_stamp (mongoc_client_t *client,
81+
uint32_t node);
82+
bool _mongoc_client_warm_up (mongoc_client_t *client,
83+
bson_error_t *error);
10284

10385

10486
BSON_END_DECLS

src/mongoc/mongoc-client.h

Lines changed: 45 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
#if !defined (MONGOC_INSIDE) && !defined (MONGOC_COMPILATION)
19-
#error "Only <mongoc.h> can be included directly."
19+
# error "Only <mongoc.h> can be included directly."
2020
#endif
2121

2222

@@ -33,14 +33,13 @@
3333
#include "mongoc-gridfs.h"
3434
#include "mongoc-index.h"
3535
#include "mongoc-read-prefs.h"
36+
#ifdef MONGOC_ENABLE_SSL
37+
# include "mongoc-ssl.h"
38+
#endif
3639
#include "mongoc-stream.h"
3740
#include "mongoc-uri.h"
3841
#include "mongoc-write-concern.h"
3942

40-
#ifdef MONGOC_ENABLE_SSL
41-
#include "mongoc-ssl.h"
42-
#endif
43-
4443

4544
BSON_BEGIN_DECLS
4645

@@ -76,79 +75,48 @@ typedef mongoc_stream_t *(*mongoc_stream_initiator_t) (const mongoc_uri_t
7675
bson_error_t *error);
7776

7877

79-
mongoc_client_t *
80-
mongoc_client_new (const char *uri_string);
81-
82-
mongoc_client_t *
83-
mongoc_client_new_from_uri (const mongoc_uri_t *uri);
84-
85-
const mongoc_uri_t *
86-
mongoc_client_get_uri (const mongoc_client_t *client);
87-
88-
void
89-
mongoc_client_set_stream_initiator (mongoc_client_t *client,
90-
mongoc_stream_initiator_t initiator,
91-
void *user_data);
92-
93-
mongoc_cursor_t *
94-
mongoc_client_command (mongoc_client_t *client,
95-
const char *db_name,
96-
mongoc_query_flags_t flags,
97-
uint32_t skip,
98-
uint32_t limit,
99-
uint32_t batch_size,
100-
const bson_t *query,
101-
const bson_t *fields,
102-
const mongoc_read_prefs_t *read_prefs);
103-
104-
bool
105-
mongoc_client_command_simple (mongoc_client_t *client,
106-
const char *db_name,
107-
const bson_t *command,
108-
const mongoc_read_prefs_t *read_prefs,
109-
bson_t *reply,
110-
bson_error_t *error);
111-
112-
void
113-
mongoc_client_destroy (mongoc_client_t *client);
114-
115-
mongoc_database_t *
116-
mongoc_client_get_database (mongoc_client_t *client,
117-
const char *name);
118-
119-
mongoc_gridfs_t *
120-
mongoc_client_get_gridfs (mongoc_client_t *client,
121-
const char *db,
122-
const char *prefix,
123-
bson_error_t *error);
124-
125-
mongoc_collection_t *
126-
mongoc_client_get_collection (mongoc_client_t *client,
127-
const char *db,
128-
const char *collection);
129-
130-
char **
131-
mongoc_client_get_database_names (mongoc_client_t *client,
132-
bson_error_t *error);
133-
134-
const mongoc_write_concern_t *
135-
mongoc_client_get_write_concern (const mongoc_client_t *client);
136-
137-
void
138-
mongoc_client_set_write_concern (mongoc_client_t *client,
139-
const mongoc_write_concern_t *write_concern);
140-
141-
const mongoc_read_prefs_t *
142-
mongoc_client_get_read_prefs (const mongoc_client_t *client);
143-
144-
void
145-
mongoc_client_set_read_prefs (mongoc_client_t *client,
146-
const mongoc_read_prefs_t *read_prefs);
147-
78+
mongoc_client_t *mongoc_client_new (const char *uri_string);
79+
mongoc_client_t *mongoc_client_new_from_uri (const mongoc_uri_t *uri);
80+
const mongoc_uri_t *mongoc_client_get_uri (const mongoc_client_t *client);
81+
void mongoc_client_set_stream_initiator (mongoc_client_t *client,
82+
mongoc_stream_initiator_t initiator,
83+
void *user_data);
84+
mongoc_cursor_t *mongoc_client_command (mongoc_client_t *client,
85+
const char *db_name,
86+
mongoc_query_flags_t flags,
87+
uint32_t skip,
88+
uint32_t limit,
89+
uint32_t batch_size,
90+
const bson_t *query,
91+
const bson_t *fields,
92+
const mongoc_read_prefs_t *read_prefs);
93+
bool mongoc_client_command_simple (mongoc_client_t *client,
94+
const char *db_name,
95+
const bson_t *command,
96+
const mongoc_read_prefs_t *read_prefs,
97+
bson_t *reply,
98+
bson_error_t *error);
99+
void mongoc_client_destroy (mongoc_client_t *client);
100+
mongoc_database_t *mongoc_client_get_database (mongoc_client_t *client,
101+
const char *name);
102+
mongoc_gridfs_t *mongoc_client_get_gridfs (mongoc_client_t *client,
103+
const char *db,
104+
const char *prefix,
105+
bson_error_t *error);
106+
mongoc_collection_t *mongoc_client_get_collection (mongoc_client_t *client,
107+
const char *db,
108+
const char *collection);
109+
char **mongoc_client_get_database_names (mongoc_client_t *client,
110+
bson_error_t *error);
111+
const mongoc_write_concern_t *mongoc_client_get_write_concern (const mongoc_client_t *client);
112+
void mongoc_client_set_write_concern (mongoc_client_t *client,
113+
const mongoc_write_concern_t *write_concern);
114+
const mongoc_read_prefs_t *mongoc_client_get_read_prefs (const mongoc_client_t *client);
115+
void mongoc_client_set_read_prefs (mongoc_client_t *client,
116+
const mongoc_read_prefs_t *read_prefs);
148117
#ifdef MONGOC_ENABLE_SSL
149-
void
150-
mongoc_client_set_ssl_opts (mongoc_client_t *client,
151-
const mongoc_ssl_opt_t *opts);
118+
void mongoc_client_set_ssl_opts (mongoc_client_t *client,
119+
const mongoc_ssl_opt_t *opts);
152120
#endif
153121

154122

0 commit comments

Comments
 (0)