@@ -389,57 +389,59 @@ typedef struct {
389389 */
390390typedef struct {
391391 /* run before / after descending into a document */
392- bool (* visit_before ) (const bson_iter_t * iter , const char * key , void * data );
393- bool (* visit_after ) (const bson_iter_t * iter , const char * key , void * data );
392+ bool (BSON_CALL * visit_before ) (const bson_iter_t * iter , const char * key , void * data );
393+ bool (BSON_CALL * visit_after ) (const bson_iter_t * iter , const char * key , void * data );
394394 /* corrupt BSON, or unsupported type and visit_unsupported_type not set */
395- void (* visit_corrupt ) (const bson_iter_t * iter , void * data );
395+ void (BSON_CALL * visit_corrupt ) (const bson_iter_t * iter , void * data );
396396 /* normal bson field callbacks */
397- bool (* visit_double ) (const bson_iter_t * iter , const char * key , double v_double , void * data );
398- bool (* visit_utf8 ) (const bson_iter_t * iter , const char * key , size_t v_utf8_len , const char * v_utf8 , void * data );
399- bool (* visit_document ) (const bson_iter_t * iter , const char * key , const bson_t * v_document , void * data );
400- bool (* visit_array ) (const bson_iter_t * iter , const char * key , const bson_t * v_array , void * data );
401- bool (* visit_binary ) (const bson_iter_t * iter ,
402- const char * key ,
403- bson_subtype_t v_subtype ,
404- size_t v_binary_len ,
405- const uint8_t * v_binary ,
406- void * data );
397+ bool (BSON_CALL * visit_double ) (const bson_iter_t * iter , const char * key , double v_double , void * data );
398+ bool (BSON_CALL * visit_utf8 ) (
399+ const bson_iter_t * iter , const char * key , size_t v_utf8_len , const char * v_utf8 , void * data );
400+ bool (BSON_CALL * visit_document ) (const bson_iter_t * iter , const char * key , const bson_t * v_document , void * data );
401+ bool (BSON_CALL * visit_array ) (const bson_iter_t * iter , const char * key , const bson_t * v_array , void * data );
402+ bool (BSON_CALL * visit_binary ) (const bson_iter_t * iter ,
403+ const char * key ,
404+ bson_subtype_t v_subtype ,
405+ size_t v_binary_len ,
406+ const uint8_t * v_binary ,
407+ void * data );
407408 /* normal field with deprecated "Undefined" BSON type */
408- bool (* visit_undefined ) (const bson_iter_t * iter , const char * key , void * data );
409- bool (* visit_oid ) (const bson_iter_t * iter , const char * key , const bson_oid_t * v_oid , void * data );
410- bool (* visit_bool ) (const bson_iter_t * iter , const char * key , bool v_bool , void * data );
411- bool (* visit_date_time ) (const bson_iter_t * iter , const char * key , int64_t msec_since_epoch , void * data );
412- bool (* visit_null ) (const bson_iter_t * iter , const char * key , void * data );
413- bool (* visit_regex ) (
409+ bool (BSON_CALL * visit_undefined ) (const bson_iter_t * iter , const char * key , void * data );
410+ bool (BSON_CALL * visit_oid ) (const bson_iter_t * iter , const char * key , const bson_oid_t * v_oid , void * data );
411+ bool (BSON_CALL * visit_bool ) (const bson_iter_t * iter , const char * key , bool v_bool , void * data );
412+ bool (BSON_CALL * visit_date_time ) (const bson_iter_t * iter , const char * key , int64_t msec_since_epoch , void * data );
413+ bool (BSON_CALL * visit_null ) (const bson_iter_t * iter , const char * key , void * data );
414+ bool (BSON_CALL * visit_regex ) (
414415 const bson_iter_t * iter , const char * key , const char * v_regex , const char * v_options , void * data );
415- bool (* visit_dbpointer ) (const bson_iter_t * iter ,
416- const char * key ,
417- size_t v_collection_len ,
418- const char * v_collection ,
419- const bson_oid_t * v_oid ,
420- void * data );
421- bool (* visit_code ) (const bson_iter_t * iter , const char * key , size_t v_code_len , const char * v_code , void * data );
422- bool (* visit_symbol ) (
416+ bool (BSON_CALL * visit_dbpointer ) (const bson_iter_t * iter ,
417+ const char * key ,
418+ size_t v_collection_len ,
419+ const char * v_collection ,
420+ const bson_oid_t * v_oid ,
421+ void * data );
422+ bool (BSON_CALL * visit_code ) (
423+ const bson_iter_t * iter , const char * key , size_t v_code_len , const char * v_code , void * data );
424+ bool (BSON_CALL * visit_symbol ) (
423425 const bson_iter_t * iter , const char * key , size_t v_symbol_len , const char * v_symbol , void * data );
424- bool (* visit_codewscope ) (const bson_iter_t * iter ,
425- const char * key ,
426- size_t v_code_len ,
427- const char * v_code ,
428- const bson_t * v_scope ,
429- void * data );
430- bool (* visit_int32 ) (const bson_iter_t * iter , const char * key , int32_t v_int32 , void * data );
431- bool (* visit_timestamp ) (
426+ bool (BSON_CALL * visit_codewscope ) (const bson_iter_t * iter ,
427+ const char * key ,
428+ size_t v_code_len ,
429+ const char * v_code ,
430+ const bson_t * v_scope ,
431+ void * data );
432+ bool (BSON_CALL * visit_int32 ) (const bson_iter_t * iter , const char * key , int32_t v_int32 , void * data );
433+ bool (BSON_CALL * visit_timestamp ) (
432434 const bson_iter_t * iter , const char * key , uint32_t v_timestamp , uint32_t v_increment , void * data );
433- bool (* visit_int64 ) (const bson_iter_t * iter , const char * key , int64_t v_int64 , void * data );
434- bool (* visit_maxkey ) (const bson_iter_t * iter , const char * key , void * data );
435- bool (* visit_minkey ) (const bson_iter_t * iter , const char * key , void * data );
435+ bool (BSON_CALL * visit_int64 ) (const bson_iter_t * iter , const char * key , int64_t v_int64 , void * data );
436+ bool (BSON_CALL * visit_maxkey ) (const bson_iter_t * iter , const char * key , void * data );
437+ bool (BSON_CALL * visit_minkey ) (const bson_iter_t * iter , const char * key , void * data );
436438 /* if set, called instead of visit_corrupt when an apparently valid BSON
437439 * includes an unrecognized field type (reading future version of BSON) */
438- void (* visit_unsupported_type ) (const bson_iter_t * iter , const char * key , uint32_t type_code , void * data );
439- bool (* visit_decimal128 ) (const bson_iter_t * iter ,
440- const char * key ,
441- const bson_decimal128_t * v_decimal128 ,
442- void * data );
440+ void (BSON_CALL * visit_unsupported_type ) (const bson_iter_t * iter , const char * key , uint32_t type_code , void * data );
441+ bool (BSON_CALL * visit_decimal128 ) (const bson_iter_t * iter ,
442+ const char * key ,
443+ const bson_decimal128_t * v_decimal128 ,
444+ void * data );
443445
444446 void * padding [7 ];
445447} bson_visitor_t ;
0 commit comments