diff options
| author | Tyge Løvset <[email protected]> | 2021-09-12 23:04:33 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-09-12 23:04:33 +0200 |
| commit | fa2871406affad4d96a54554f80c7418a716b98c (patch) | |
| tree | 8062af12ca689538ee8d6882c6f06bdb05e29a1f /include/stc/cstack.h | |
| parent | 1a9020f895754f564e480ba9ed564c637f26060e (diff) | |
| download | STC-modified-fa2871406affad4d96a54554f80c7418a716b98c.tar.gz STC-modified-fa2871406affad4d96a54554f80c7418a716b98c.zip | |
Renamed input macro i_module to i_prefix. Replaced astar.c example.
Now supports that user defines i_prefix.
Diffstat (limited to 'include/stc/cstack.h')
| -rw-r--r-- | include/stc/cstack.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/stc/cstack.h b/include/stc/cstack.h index c0d89c78..043fbdc6 100644 --- a/include/stc/cstack.h +++ b/include/stc/cstack.h @@ -28,7 +28,9 @@ #include "forward.h"
#endif
-#define i_module cstack
+#ifndef i_prefix
+#define i_prefix cstack_
+#endif
#include "template.h"
#if !defined i_fwd
@@ -37,7 +39,7 @@ cx_deftypes(_c_cstack_types, Self, i_val); typedef i_valraw cx_rawvalue_t;
STC_INLINE Self cx_memb(_init)(void)
- { return (Self){0, 0, 0}; }
+ { return c_make(Self){0, 0, 0}; }
STC_INLINE Self cx_memb(_with_capacity)(size_t cap) {
Self out = {(cx_value_t *) c_malloc(cap*sizeof(cx_value_t)), 0, cap};
|
