diff options
Diffstat (limited to 'source/blender')
41 files changed, 328 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_args.h b/source/blender/blenlib/BLI_args.h index 0e4ca61e81a..9031cd2ba2f 100644 --- a/source/blender/blenlib/BLI_args.h +++ b/source/blender/blenlib/BLI_args.h @@ -25,6 +25,10 @@ * \brief A general argument parsing module. */ +#ifdef __cplusplus +extern "C" { +#endif + struct bArgs; typedef struct bArgs bArgs; @@ -71,4 +75,8 @@ void BLI_argsPrintOtherDoc(struct bArgs *ba); void BLI_argsPrint(struct bArgs *ba); const char **BLI_argsArgv(struct bArgs *ba); +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/blenlib/BLI_array_store.h b/source/blender/blenlib/BLI_array_store.h index 1dc4a504884..a8a7dde63b5 100644 --- a/source/blender/blenlib/BLI_array_store.h +++ b/source/blender/blenlib/BLI_array_store.h @@ -22,6 +22,10 @@ * \brief Efficient in-memory storage of multiple similar arrays. */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct BArrayState BArrayState; typedef struct BArrayStore BArrayStore; @@ -46,4 +50,8 @@ void *BLI_array_store_state_data_get_alloc(BArrayState *state, size_t *r_data_le /* only for tests */ bool BLI_array_store_is_valid(BArrayStore *bs); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_ARRAY_STORE_H__ */ diff --git a/source/blender/blenlib/BLI_array_store_utils.h b/source/blender/blenlib/BLI_array_store_utils.h index ff6caddffd5..5b5263bf8a4 100644 --- a/source/blender/blenlib/BLI_array_store_utils.h +++ b/source/blender/blenlib/BLI_array_store_utils.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + struct BArrayStore; struct BArrayStore_AtSize { @@ -40,4 +44,8 @@ void BLI_array_store_at_size_calc_memory_usage(struct BArrayStore_AtSize *bs_str size_t *r_size_expanded, size_t *r_size_compacted); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_ARRAY_STORE_UTILS_H__ */ diff --git a/source/blender/blenlib/BLI_array_utils.h b/source/blender/blenlib/BLI_array_utils.h index 4ceb149f238..f70aa3b54fa 100644 --- a/source/blender/blenlib/BLI_array_utils.h +++ b/source/blender/blenlib/BLI_array_utils.h @@ -24,6 +24,10 @@ #include "BLI_compiler_typecheck.h" +#ifdef __cplusplus +extern "C" { +#endif + void _bli_array_reverse(void *arr, unsigned int arr_len, size_t arr_stride); #define BLI_array_reverse(arr, arr_len) _bli_array_reverse(arr, arr_len, sizeof(*(arr))) @@ -85,4 +89,8 @@ bool _bli_array_iter_span(const void *arr, bool _bli_array_is_zeroed(const void *arr, unsigned int arr_len, size_t arr_stride); #define BLI_array_is_zeroed(arr, arr_len) _bli_array_is_zeroed(arr, arr_len, sizeof(*(arr))) +#ifdef __cplusplus +} +#endif + #endif /* __BLI_ARRAY_UTILS_H__ */ diff --git a/source/blender/blenlib/BLI_astar.h b/source/blender/blenlib/BLI_astar.h index 3fe37d7886b..8a70371cbcb 100644 --- a/source/blender/blenlib/BLI_astar.h +++ b/source/blender/blenlib/BLI_astar.h @@ -29,6 +29,10 @@ #include "BLI_bitmap.h" +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------- */ typedef struct BLI_AStarGNLink { @@ -114,4 +118,8 @@ bool BLI_astar_graph_solve(BLI_AStarGraph *as_graph, BLI_AStarSolution *r_solution, const int max_steps); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_ASTAR_H__ */ diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index 3af25e3de1d..3772a063515 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned int BLI_bitmap; /* warning: the bitmap does not keep track of its own size or check @@ -109,4 +113,8 @@ void BLI_bitmap_copy_all(BLI_bitmap *dst, const BLI_bitmap *src, size_t bits); void BLI_bitmap_and_all(BLI_bitmap *dst, const BLI_bitmap *src, size_t bits); void BLI_bitmap_or_all(BLI_bitmap *dst, const BLI_bitmap *src, size_t bits); +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/blenlib/BLI_bitmap_draw_2d.h b/source/blender/blenlib/BLI_bitmap_draw_2d.h index bad1605ac5d..f5f8b28b27f 100644 --- a/source/blender/blenlib/BLI_bitmap_draw_2d.h +++ b/source/blender/blenlib/BLI_bitmap_draw_2d.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + void BLI_bitmap_draw_2d_line_v2v2i(const int p1[2], const int p2[2], bool (*callback)(int, int, void *), @@ -41,4 +45,8 @@ void BLI_bitmap_draw_2d_poly_v2i_n(const int xmin, void (*callback)(int x, int x_end, int y, void *), void *user_data); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_BITMAP_DRAW_2D_H__ */ diff --git a/source/blender/blenlib/BLI_boxpack_2d.h b/source/blender/blenlib/BLI_boxpack_2d.h index b519a920a77..762cb7aaa44 100644 --- a/source/blender/blenlib/BLI_boxpack_2d.h +++ b/source/blender/blenlib/BLI_boxpack_2d.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + struct ListBase; /* Box Packer */ @@ -57,4 +61,8 @@ void BLI_box_pack_2d_fixedarea(struct ListBase *boxes, int height, struct ListBase *packed); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_BOXPACK_2D_H__ */ diff --git a/source/blender/blenlib/BLI_buffer.h b/source/blender/blenlib/BLI_buffer.h index 22d21262712..d81446af14b 100644 --- a/source/blender/blenlib/BLI_buffer.h +++ b/source/blender/blenlib/BLI_buffer.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct BLI_Buffer { void *data; const size_t elem_size; @@ -93,4 +97,8 @@ void _bli_buffer_free(BLI_Buffer *buffer); #define BLI_buffer_field_free(name_) _bli_buffer_free(name_) +#ifdef __cplusplus +} +#endif + #endif /* __BLI_BUFFER_H__ */ diff --git a/source/blender/blenlib/BLI_convexhull_2d.h b/source/blender/blenlib/BLI_convexhull_2d.h index 556dc79fc47..7417c1e3a98 100644 --- a/source/blender/blenlib/BLI_convexhull_2d.h +++ b/source/blender/blenlib/BLI_convexhull_2d.h @@ -21,10 +21,18 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + int BLI_convexhull_2d_sorted(const float (*points)[2], const int n, int r_points[]); int BLI_convexhull_2d(const float (*points)[2], const int n, int r_points[]); float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned int n); float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], unsigned int n); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_CONVEXHULL_2D_H__ */ diff --git a/source/blender/blenlib/BLI_delaunay_2d.h b/source/blender/blenlib/BLI_delaunay_2d.h index 9d853dd9509..95111dbbbf7 100644 --- a/source/blender/blenlib/BLI_delaunay_2d.h +++ b/source/blender/blenlib/BLI_delaunay_2d.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + /** * Interface for Constrained Delaunay Triangulation (CDT) in 2D. * @@ -202,4 +206,8 @@ CDT_result *BLI_delaunay_2d_cdt_calc(const CDT_input *input, const CDT_output_ty void BLI_delaunay_2d_cdt_free(CDT_result *result); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_DELAUNAY_2D_H__ */ diff --git a/source/blender/blenlib/BLI_dial_2d.h b/source/blender/blenlib/BLI_dial_2d.h index 71b0683d149..a39543720e6 100644 --- a/source/blender/blenlib/BLI_dial_2d.h +++ b/source/blender/blenlib/BLI_dial_2d.h @@ -46,10 +46,18 @@ * \endcode */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct Dial Dial; Dial *BLI_dial_initialize(const float start_position[2], float threshold); float BLI_dial_angle(Dial *dial, const float current_position[2]); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_DIAL_2D_H__ */ diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h index 11e5e2c70e9..277d9116558 100644 --- a/source/blender/blenlib/BLI_dlrbTree.h +++ b/source/blender/blenlib/BLI_dlrbTree.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + /* Double-Linked Red-Black Tree Implementation: * * This is simply a Red-Black Tree implementation whose nodes can later @@ -159,4 +163,8 @@ void BLI_dlrbTree_insert(DLRBT_Tree *tree, DLRBT_Node *node); /* ********************************************** */ +#ifdef __cplusplus +} +#endif + #endif /* __BLI_DLRBTREE_H__ */ diff --git a/source/blender/blenlib/BLI_dynlib.h b/source/blender/blenlib/BLI_dynlib.h index 3359a70ef11..4adffd51e17 100644 --- a/source/blender/blenlib/BLI_dynlib.h +++ b/source/blender/blenlib/BLI_dynlib.h @@ -24,6 +24,10 @@ #ifndef __BLI_DYNLIB_H__ #define __BLI_DYNLIB_H__ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct DynamicLibrary DynamicLibrary; DynamicLibrary *BLI_dynlib_open(const char *name); @@ -31,4 +35,8 @@ void *BLI_dynlib_find_symbol(DynamicLibrary *lib, const char *symname); char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib); void BLI_dynlib_close(DynamicLibrary *lib); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_DYNLIB_H__ */ diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h index 87e58d90d3f..cb1f3d58f23 100644 --- a/source/blender/blenlib/BLI_dynstr.h +++ b/source/blender/blenlib/BLI_dynstr.h @@ -34,6 +34,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + struct DynStr; /** The abstract DynStr type */ @@ -57,4 +61,8 @@ void BLI_dynstr_get_cstring_ex(DynStr *__restrict ds, char *__restrict str) ATTR void BLI_dynstr_clear(DynStr *ds) ATTR_NONNULL(); void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL(); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_DYNSTR_H__ */ diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h index 66797ee113f..bd149e2eaa0 100644 --- a/source/blender/blenlib/BLI_edgehash.h +++ b/source/blender/blenlib/BLI_edgehash.h @@ -23,6 +23,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + struct EdgeHash; typedef struct EdgeHash EdgeHash; @@ -150,4 +154,8 @@ BLI_INLINE bool BLI_edgesetIterator_isDone(EdgeSetIterator *esi) return esi->index >= esi->length; } +#ifdef __cplusplus +} +#endif + #endif /* __BLI_EDGEHASH_H__ */ diff --git a/source/blender/blenlib/BLI_endian_switch.h b/source/blender/blenlib/BLI_endian_switch.h index c849398a56f..a07508e31a0 100644 --- a/source/blender/blenlib/BLI_endian_switch.h +++ b/source/blender/blenlib/BLI_endian_switch.h @@ -23,6 +23,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + /* BLI_endian_switch_inline.h */ BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_NONNULL(1); BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val) ATTR_NONNULL(1); @@ -43,6 +47,10 @@ void BLI_endian_switch_int64_array(int64_t *val, const int size) ATTR_NONNULL(1) void BLI_endian_switch_uint64_array(uint64_t *val, const int size) ATTR_NONNULL(1); void BLI_endian_switch_double_array(double *val, const int size) ATTR_NONNULL(1); +#ifdef __cplusplus +} +#endif + #include "BLI_endian_switch_inline.h" #endif /* __BLI_ENDIAN_SWITCH_H__ */ diff --git a/source/blender/blenlib/BLI_endian_switch_inline.h b/source/blender/blenlib/BLI_endian_switch_inline.h index 55e14b6d77c..316e24cfc6d 100644 --- a/source/blender/blenlib/BLI_endian_switch_inline.h +++ b/source/blender/blenlib/BLI_endian_switch_inline.h @@ -17,6 +17,10 @@ #ifndef __BLI_ENDIAN_SWITCH_INLINE_H__ #define __BLI_ENDIAN_SWITCH_INLINE_H__ +#ifdef __cplusplus +extern "C" { +#endif + /* only include from header */ #ifndef __BLI_ENDIAN_SWITCH_H__ # error "this file isnt to be directly included" @@ -85,4 +89,8 @@ BLI_INLINE void BLI_endian_switch_double(double *val) BLI_endian_switch_uint64((uint64_t *)val); } +#ifdef __cplusplus +} +#endif + #endif /* __BLI_ENDIAN_SWITCH_INLINE_H__ */ diff --git a/source/blender/blenlib/BLI_fileops_types.h b/source/blender/blenlib/BLI_fileops_types.h index 6456b457cfb..41f916ed0ca 100644 --- a/source/blender/blenlib/BLI_fileops_types.h +++ b/source/blender/blenlib/BLI_fileops_types.h @@ -27,6 +27,10 @@ #include <sys/stat.h> +#ifdef __cplusplus +extern "C" { +#endif + #if defined(WIN32) typedef unsigned int mode_t; #endif @@ -57,4 +61,8 @@ struct dirlink { char *name; }; +#ifdef __cplusplus +} +#endif + #endif /* __BLI_FILEOPS_TYPES_H__ */ diff --git a/source/blender/blenlib/BLI_hash_md5.h b/source/blender/blenlib/BLI_hash_md5.h index a3e56b53e76..b326b17c19b 100644 --- a/source/blender/blenlib/BLI_hash_md5.h +++ b/source/blender/blenlib/BLI_hash_md5.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The * result is always in little endian byte order, so that a byte-wise * output yields to the wanted ASCII representation of the message @@ -36,4 +40,8 @@ int BLI_hash_md5_stream(FILE *stream, void *resblock); char *BLI_hash_md5_to_hexdigest(void *resblock, char r_hex_digest[33]); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_HASH_MD5_H__ */ diff --git a/source/blender/blenlib/BLI_hash_mm2a.h b/source/blender/blenlib/BLI_hash_mm2a.h index cafa52205c7..840ff31dd19 100644 --- a/source/blender/blenlib/BLI_hash_mm2a.h +++ b/source/blender/blenlib/BLI_hash_mm2a.h @@ -23,6 +23,10 @@ #include "BLI_sys_types.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct BLI_HashMurmur2A { uint32_t hash; uint32_t tail; @@ -40,4 +44,8 @@ uint32_t BLI_hash_mm2a_end(BLI_HashMurmur2A *mm2); uint32_t BLI_hash_mm2(const unsigned char *data, size_t len, uint32_t seed); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_HASH_MM2A_H__ */ diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h index 897620da561..3ce8da7e03c 100644 --- a/source/blender/blenlib/BLI_heap.h +++ b/source/blender/blenlib/BLI_heap.h @@ -22,6 +22,10 @@ * \brief A min-heap / priority queue ADT */ +#ifdef __cplusplus +extern "C" { +#endif + struct Heap; struct HeapNode; typedef struct Heap Heap; @@ -52,4 +56,8 @@ void *BLI_heap_node_ptr(const HeapNode *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNU /* only for gtest */ bool BLI_heap_is_valid(const Heap *heap); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_HEAP_H__ */ diff --git a/source/blender/blenlib/BLI_heap_simple.h b/source/blender/blenlib/BLI_heap_simple.h index a2ff4bebf7e..d2bc542491c 100644 --- a/source/blender/blenlib/BLI_heap_simple.h +++ b/source/blender/blenlib/BLI_heap_simple.h @@ -22,6 +22,10 @@ * \brief A min-heap / priority queue ADT */ +#ifdef __cplusplus +extern "C" { +#endif + struct HeapSimple; typedef struct HeapSimple HeapSimple; @@ -37,4 +41,8 @@ uint BLI_heapsimple_len(const HeapSimple *heap) ATTR_WARN_UNUSED_RESULT ATTR_NON float BLI_heapsimple_top_value(const HeapSimple *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); void *BLI_heapsimple_pop_min(HeapSimple *heap) ATTR_NONNULL(1); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_HEAP_SIMPLE_H__ */ diff --git a/source/blender/blenlib/BLI_iterator.h b/source/blender/blenlib/BLI_iterator.h index 4513ecdff10..ce2311aa3f7 100644 --- a/source/blender/blenlib/BLI_iterator.h +++ b/source/blender/blenlib/BLI_iterator.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct BLI_Iterator { void *current; /* current pointer we iterate over */ void *data; /* stored data required for this iterator */ @@ -51,4 +55,8 @@ typedef void (*IteratorBeginCb)(BLI_Iterator *iter, void *data_in); } \ ((void)0) +#ifdef __cplusplus +} +#endif + #endif /* __BLI_ITERATOR_H__ */ diff --git a/source/blender/blenlib/BLI_jitter_2d.h b/source/blender/blenlib/BLI_jitter_2d.h index bfbf9c00bef..fa184916b5b 100644 --- a/source/blender/blenlib/BLI_jitter_2d.h +++ b/source/blender/blenlib/BLI_jitter_2d.h @@ -24,8 +24,16 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + void BLI_jitter_init(float (*jitarr)[2], int num); void BLI_jitterate1(float (*jit1)[2], float (*jit2)[2], int num, float radius1); void BLI_jitterate2(float (*jit1)[2], float (*jit2)[2], int num, float radius2); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_JITTER_2D_H__ */ diff --git a/source/blender/blenlib/BLI_lasso_2d.h b/source/blender/blenlib/BLI_lasso_2d.h index 8bd0568bb84..56db360dab0 100644 --- a/source/blender/blenlib/BLI_lasso_2d.h +++ b/source/blender/blenlib/BLI_lasso_2d.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + struct rcti; void BLI_lasso_boundbox(struct rcti *rect, const int mcords[][2], const unsigned int moves); @@ -40,4 +44,8 @@ bool BLI_lasso_is_edge_inside(const int mcords[][2], int y1, const int error_value); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_LASSO_2D_H__ */ diff --git a/source/blender/blenlib/BLI_linklist.h b/source/blender/blenlib/BLI_linklist.h index d04d3e29e14..06796d6592a 100644 --- a/source/blender/blenlib/BLI_linklist.h +++ b/source/blender/blenlib/BLI_linklist.h @@ -26,6 +26,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + struct BLI_mempool; struct MemArena; @@ -93,4 +97,8 @@ LinkNode *BLI_linklist_sort_r(LinkNode *list, #define BLI_linklist_append_alloca(list_pair, ptr) \ BLI_linklist_append_nlink(list_pair, ptr, alloca(sizeof(LinkNode))) +#ifdef __cplusplus +} +#endif + #endif /* __BLI_LINKLIST_H__ */ diff --git a/source/blender/blenlib/BLI_math_interp.h b/source/blender/blenlib/BLI_math_interp.h index add55fa9531..0f3032fa625 100644 --- a/source/blender/blenlib/BLI_math_interp.h +++ b/source/blender/blenlib/BLI_math_interp.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + void BLI_bicubic_interpolation_fl( const float *buffer, float *output, int width, int height, int components, float u, float v); @@ -88,4 +92,8 @@ void BLI_ewa_filter(const int width, void *customdata, float result[4]); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_MATH_INTERP_H__ */ diff --git a/source/blender/blenlib/BLI_memory_utils.h b/source/blender/blenlib/BLI_memory_utils.h index 74d4451ed8d..99ec44cf9ea 100644 --- a/source/blender/blenlib/BLI_memory_utils.h +++ b/source/blender/blenlib/BLI_memory_utils.h @@ -22,9 +22,17 @@ * \brief Generic memory manipulation API. */ +#ifdef __cplusplus +extern "C" { +#endif + /* it may be defined already */ #ifndef __BLI_UTILDEFINES_H__ bool BLI_memory_is_zero(const void *arr, const size_t size); #endif +#ifdef __cplusplus +} +#endif + #endif /* __BLI_MEMORY_UTILS_H__ */ diff --git a/source/blender/blenlib/BLI_polyfill_2d.h b/source/blender/blenlib/BLI_polyfill_2d.h index 4b229cc6c1e..cb12b73c1d5 100644 --- a/source/blender/blenlib/BLI_polyfill_2d.h +++ b/source/blender/blenlib/BLI_polyfill_2d.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + struct MemArena; void BLI_polyfill_calc_arena(const float (*coords)[2], @@ -38,4 +42,8 @@ void BLI_polyfill_calc(const float (*coords)[2], /* default size of polyfill arena */ #define BLI_POLYFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14) +#ifdef __cplusplus +} +#endif + #endif /* __BLI_POLYFILL_2D_H__ */ diff --git a/source/blender/blenlib/BLI_polyfill_2d_beautify.h b/source/blender/blenlib/BLI_polyfill_2d_beautify.h index 042cb7e0ea9..94c4b412225 100644 --- a/source/blender/blenlib/BLI_polyfill_2d_beautify.h +++ b/source/blender/blenlib/BLI_polyfill_2d_beautify.h @@ -21,6 +21,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + struct Heap; struct MemArena; @@ -44,4 +48,8 @@ float BLI_polyfill_beautify_quad_rotate_calc_ex(const float v1[2], /* avoid realloc's when creating new structures for polyfill ngons */ #define BLI_POLYFILL_ALLOC_NGON_RESERVE 64 +#ifdef __cplusplus +} +#endif + #endif /* __BLI_POLYFILL_2D_BEAUTIFY_H__ */ diff --git a/source/blender/blenlib/BLI_quadric.h b/source/blender/blenlib/BLI_quadric.h index 787e8630493..1383a19ed1f 100644 --- a/source/blender/blenlib/BLI_quadric.h +++ b/source/blender/blenlib/BLI_quadric.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct Quadric { double a2, ab, ac, ad, b2, bc, bd, c2, cd, d2; } Quadric; @@ -43,4 +47,8 @@ void BLI_quadric_mul(Quadric *a, const double scalar); double BLI_quadric_evaluate(const Quadric *q, const double v[3]); bool BLI_quadric_optimize(const Quadric *q, double v[3], const double epsilon); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_QUADRIC_H__ */ diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h index 083c4c411d4..cb0330d1bad 100644 --- a/source/blender/blenlib/BLI_smallhash.h +++ b/source/blender/blenlib/BLI_smallhash.h @@ -26,6 +26,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { uintptr_t key; void *val; @@ -74,4 +78,8 @@ void **BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr double BLI_smallhash_calc_quality(SmallHash *sh); #endif +#ifdef __cplusplus +} +#endif + #endif /* __BLI_SMALLHASH_H__ */ diff --git a/source/blender/blenlib/BLI_sort_utils.h b/source/blender/blenlib/BLI_sort_utils.h index 055ee26ef5f..9c99f893a1f 100644 --- a/source/blender/blenlib/BLI_sort_utils.h +++ b/source/blender/blenlib/BLI_sort_utils.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + /** * \note keep \a sort_value first, * so cmp functions can be reused. @@ -57,4 +61,8 @@ int BLI_sortutil_cmp_int_reverse(const void *a_, const void *b_); int BLI_sortutil_cmp_ptr(const void *a_, const void *b_); int BLI_sortutil_cmp_ptr_reverse(const void *a_, const void *b_); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_SORT_UTILS_H__ */ diff --git a/source/blender/blenlib/BLI_string_cursor_utf8.h b/source/blender/blenlib/BLI_string_cursor_utf8.h index a54089ad8d6..f8afff214a3 100644 --- a/source/blender/blenlib/BLI_string_cursor_utf8.h +++ b/source/blender/blenlib/BLI_string_cursor_utf8.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + typedef enum eStrCursorJumpType { STRCUR_JUMP_NONE, STRCUR_JUMP_DELIM, @@ -52,4 +56,8 @@ void BLI_str_cursor_step_utf32(const char32_t *str, eStrCursorJumpType jump, bool use_init_step); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_STRING_CURSOR_UTF8_H__ */ diff --git a/source/blender/blenlib/BLI_timecode.h b/source/blender/blenlib/BLI_timecode.h index ae514274a68..d3c6803130a 100644 --- a/source/blender/blenlib/BLI_timecode.h +++ b/source/blender/blenlib/BLI_timecode.h @@ -26,6 +26,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + size_t BLI_timecode_string_from_time(char *str, const size_t len, const int brevity_level, @@ -42,4 +46,8 @@ size_t BLI_timecode_string_from_time_seconds(char *str, const int brevity_level, const float time_seconds) ATTR_NONNULL(); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_TIMECODE_H__ */ diff --git a/source/blender/blenlib/BLI_timer.h b/source/blender/blenlib/BLI_timer.h index 56cafb1bd36..144fcd0a0d7 100644 --- a/source/blender/blenlib/BLI_timer.h +++ b/source/blender/blenlib/BLI_timer.h @@ -26,6 +26,10 @@ * \ingroup BLI */ +#ifdef __cplusplus +extern "C" { +#endif + /* ret < 0: the timer will be removed. * ret >= 0: the timer will be called again in ret seconds */ typedef double (*BLI_timer_func)(uintptr_t uuid, void *user_data); @@ -54,4 +58,8 @@ void BLI_timer_free(void); * is properly configured for the new file. */ void BLI_timer_on_file_load(void); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_TIMER_H__ */ diff --git a/source/blender/blenlib/BLI_uvproject.h b/source/blender/blenlib/BLI_uvproject.h index b5ed95f72c7..8a33ea6961c 100644 --- a/source/blender/blenlib/BLI_uvproject.h +++ b/source/blender/blenlib/BLI_uvproject.h @@ -20,6 +20,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + struct Object; struct ProjCameraInfo; @@ -46,4 +50,8 @@ void BLI_uvproject_from_view_ortho(float target[2], float source[3], float rotma /* so we can adjust scale with keeping the struct private */ void BLI_uvproject_camera_info_scale(struct ProjCameraInfo *uci, float scale_x, float scale_y); +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/blenlib/BLI_vfontdata.h b/source/blender/blenlib/BLI_vfontdata.h index 7fa7cab1ff7..047a72ec59a 100644 --- a/source/blender/blenlib/BLI_vfontdata.h +++ b/source/blender/blenlib/BLI_vfontdata.h @@ -28,6 +28,10 @@ #include "DNA_listBase.h" +#ifdef __cplusplus +extern "C" { +#endif + struct PackedFile; struct VFont; @@ -52,4 +56,8 @@ VFontData *BLI_vfontdata_copy(const VFontData *vfont_src, const int flag); VChar *BLI_vfontchar_from_freetypefont(struct VFont *vfont, unsigned long character); VChar *BLI_vfontchar_copy(const VChar *vchar_src, const int flag); +#ifdef __cplusplus +} +#endif + #endif diff --git a/source/blender/blenlib/BLI_voronoi_2d.h b/source/blender/blenlib/BLI_voronoi_2d.h index fd457dc1a9a..947b120f51a 100644 --- a/source/blender/blenlib/BLI_voronoi_2d.h +++ b/source/blender/blenlib/BLI_voronoi_2d.h @@ -26,6 +26,10 @@ struct ListBase; * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct VoronoiSite { float co[2]; float color[3]; @@ -74,4 +78,8 @@ void BLI_voronoi_triangulate(const VoronoiSite *sites, int (**triangles_r)[3], int *triangles_total_r); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_VORONOI_2D_H__ */ diff --git a/source/blender/blenlib/BLI_voxel.h b/source/blender/blenlib/BLI_voxel.h index ef210a82a65..220ab9b3705 100644 --- a/source/blender/blenlib/BLI_voxel.h +++ b/source/blender/blenlib/BLI_voxel.h @@ -24,6 +24,10 @@ * \ingroup bli */ +#ifdef __cplusplus +extern "C" { +#endif + /** Find the index number of a voxel, given x/y/z integer coords and resolution vector. */ #define BLI_VOXEL_INDEX(x, y, z, res) \ @@ -36,4 +40,8 @@ float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3 float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float co[3]); float BLI_voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline); +#ifdef __cplusplus +} +#endif + #endif /* __BLI_VOXEL_H__ */ |