Allow overriding MESHOPTIMIZER_EXPERIMENTAL externally

Similarly to MESHOPTIMIZER_API, we now define MESHOPTIMIZER_EXPERIMENTAL
only if an existing definition is absent.

This allows, for example, setting this to a deprecated attribute which
still compiles the library itself cleanly, but will warn for any use of
experimental APIs for dependent code. Another interesting use case is
building .so where the experimental symbols are not exported, which
usually results in an ABI stable interface.
This commit is contained in:
Arseny Kapoulkine
2024-06-29 10:59:57 -07:00
parent ab9fc830b1
commit 39dbdc57de
+2
View File
@@ -29,7 +29,9 @@
#endif
/* Experimental APIs have unstable interface and might have implementation that's not fully tested or optimized */
#ifndef MESHOPTIMIZER_EXPERIMENTAL
#define MESHOPTIMIZER_EXPERIMENTAL MESHOPTIMIZER_API
#endif
/* C interface */
#ifdef __cplusplus