summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cbits.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-01-02 14:18:22 +0100
committerTyge Løvset <[email protected]>2022-01-02 14:18:22 +0100
commit9826f52e385e1ec019c63fd483f1c8acccf4a360 (patch)
tree415a95e035b35995781392f04cf0c0bcb986b41c /include/stc/cbits.h
parent8134d0f62ebc659741131eb79cec4fdcf5f774f7 (diff)
downloadSTC-modified-9826f52e385e1ec019c63fd483f1c8acccf4a360.tar.gz
STC-modified-9826f52e385e1ec019c63fd483f1c8acccf4a360.zip
Simplified and improved linkage configuration. Reorganized crandom.h a bit.
May define "i_opt c_shared", or "i_opt c_static" to specify individual container linkage, based on if STC_HEADER is defined, i.e static linkage is default, STC_HEADER defined makes shared symbols default.
Diffstat (limited to 'include/stc/cbits.h')
-rw-r--r--include/stc/cbits.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/stc/cbits.h b/include/stc/cbits.h
index b4ff287d..f99867e9 100644
--- a/include/stc/cbits.h
+++ b/include/stc/cbits.h
@@ -20,9 +20,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "ccommon.h"
+
#ifndef CBITS_H_INCLUDED
#define CBITS_H_INCLUDED
-
/*
Similar to boost::dynamic_bitset / std::bitset
@@ -54,7 +55,6 @@ int main() {
*/
#include <stdlib.h>
#include <string.h>
-#include "ccommon.h"
struct cbits {
uint64_t *data64;
@@ -168,7 +168,7 @@ STC_INLINE void cbits_xor(cbits *self, cbits other) {
}
#endif
-#if !defined(STC_SHARED) || defined(STC_IMPLEMENTATION)
+#if defined(_i_implement)
STC_DEF cbits* cbits_copy(cbits* self, cbits other) {
if (self->data64 == other.data64) return self;
@@ -241,3 +241,4 @@ STC_DEF bool cbits_disjoint(cbits s, cbits other) { _cbits_SETOP(&, 0); }
#endif
#endif
+#undef i_opt \ No newline at end of file