summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-05 18:21:17 +0100
committerTyge Løvset <[email protected]>2023-02-05 18:21:17 +0100
commit217865ae413f9cfcc72af176ec7e98f418bddbea (patch)
treee862dddb60fe69fbdb91b14de1f4e44cd7088b43 /include
parentb21be5762a5037abbd9aa820d204f0825382194d (diff)
downloadSTC-modified-217865ae413f9cfcc72af176ec7e98f418bddbea.tar.gz
STC-modified-217865ae413f9cfcc72af176ec7e98f418bddbea.zip
Fixed linking parameters i_extern.
Diffstat (limited to 'include')
-rw-r--r--include/stc/crandom.h2
-rw-r--r--include/stc/cregex.h4
-rw-r--r--include/stc/cspan.h2
-rw-r--r--include/stc/csview.h2
-rw-r--r--include/stc/utf8.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/include/stc/crandom.h b/include/stc/crandom.h
index 32e541ff..827c93d6 100644
--- a/include/stc/crandom.h
+++ b/include/stc/crandom.h
@@ -109,7 +109,7 @@ STC_INLINE stc64_normalf_t stc64_normalf_new(double mean, double stddev) {
}
/* -------------------------- IMPLEMENTATION ------------------------- */
-#if defined(i_implement) || defined(i_extern)
+#if defined(i_static) || defined(i_extern)
/* Global random() */
static stc64_t stc64_global = {{
diff --git a/include/stc/cregex.h b/include/stc/cregex.h
index 564fe157..fa136f16 100644
--- a/include/stc/cregex.h
+++ b/include/stc/cregex.h
@@ -160,12 +160,12 @@ cstr cregex_replace_pattern_6(const char* pattern, const char* input, const char
void cregex_drop(cregex* re);
#endif // CREGEX_H_INCLUDED
-#if defined i_extern || defined STC_EXTERN
+#if defined(i_extern)
# include "../../src/cregex.c"
# include "../../src/utf8code.c"
+# undef i_extern
#endif
#undef i_opt
#undef i_header
#undef i_static
#undef i_implement
-#undef i_extern
diff --git a/include/stc/cspan.h b/include/stc/cspan.h
index cc3d03b3..f8ae9315 100644
--- a/include/stc/cspan.h
+++ b/include/stc/cspan.h
@@ -207,7 +207,7 @@ STC_API intptr_t _cspan_slice(int32_t odim[], int32_t ostri[], int* orank,
int rank, const int32_t a[][2]);
/* -------------------------- IMPLEMENTATION ------------------------- */
-#if defined(i_implement)
+#if defined(i_static) || defined(i_extern)
STC_DEF intptr_t _cspan_idxN(int rank, const int32_t shape[], const int32_t stri[], const int32_t a[]) {
intptr_t off = a[0];
diff --git a/include/stc/csview.h b/include/stc/csview.h
index a30672cd..aa519fec 100644
--- a/include/stc/csview.h
+++ b/include/stc/csview.h
@@ -159,7 +159,7 @@ STC_INLINE bool csview_eq(const csview* x, const csview* y)
STC_API uint64_t csview_hash(const csview *self);
/* -------------------------- IMPLEMENTATION ------------------------- */
-#if defined(i_implement)
+#if defined(i_static) || defined(i_extern)
STC_DEF intptr_t csview_find_sv(csview sv, csview search) {
char* res = cstrnstrn(sv.str, search.str, sv.size, search.size);
diff --git a/include/stc/utf8.h b/include/stc/utf8.h
index da738fc6..7ad01ef4 100644
--- a/include/stc/utf8.h
+++ b/include/stc/utf8.h
@@ -114,7 +114,7 @@ STC_INLINE intptr_t utf8_pos(const char* s, intptr_t index)
{ return (intptr_t)(utf8_at(s, index) - s); }
#endif // UTF8_H_INCLUDED
-#if defined i_extern || defined STC_EXTERN
+#if defined(i_extern)
# include "../../src/utf8code.c"
# undef i_extern
#endif