summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-14 10:25:55 +0200
committerTyge Løvset <[email protected]>2022-10-14 10:25:55 +0200
commit54c08dc031c622e78dc134353690ed359b9173d8 (patch)
tree38d827af29aa30350099a71d84d0caf0510b05ed /include
parentb2103dc2084f2f0b05645acc7879c9ff5ad84a05 (diff)
downloadSTC-modified-54c08dc031c622e78dc134353690ed359b9173d8.tar.gz
STC-modified-54c08dc031c622e78dc134353690ed359b9173d8.zip
Update sso_bench.cpp benchmark, and some internal improvements.
Diffstat (limited to 'include')
-rw-r--r--include/stc/alt/csmap.h2
-rw-r--r--include/stc/cregex.h34
2 files changed, 18 insertions, 18 deletions
diff --git a/include/stc/alt/csmap.h b/include/stc/alt/csmap.h
index 4b90fb78..086071f5 100644
--- a/include/stc/alt/csmap.h
+++ b/include/stc/alt/csmap.h
@@ -473,6 +473,7 @@ STC_DEF _cx_self
_cx_memb(_clone)(_cx_self cx) {
return c_make(_cx_self){_cx_memb(_clone_r_)(cx.root), cx.size};
}
+#endif // !_i_no_clone
#if !defined _i_no_emplace
STC_DEF _cx_result
@@ -485,7 +486,6 @@ _cx_memb(_emplace)(_cx_self* self, i_keyraw rkey _i_MAP_ONLY(, i_valraw rmapped)
return res;
}
#endif // _i_no_emplace
-#endif // !_i_no_clone
static void
_cx_memb(_drop_r_)(_cx_node* tn) {
diff --git a/include/stc/cregex.h b/include/stc/cregex.h
index 6c817f1c..e3703ca8 100644
--- a/include/stc/cregex.h
+++ b/include/stc/cregex.h
@@ -35,21 +35,21 @@ THE SOFTWARE.
#include "forward.h" // csview
typedef enum {
- cre_success = 1,
- cre_nomatch = 0,
- cre_matcherror = -1,
- cre_outofmemory = -2,
- cre_unmatchedleftparenthesis = -3,
- cre_unmatchedrightparenthesis = -4,
- cre_toomanysubexpressions = -5,
- cre_toomanycharacterclasses = -6,
- cre_malformedcharacterclass = -7,
- cre_missingoperand = -8,
- cre_unknownoperator = -9,
- cre_operandstackoverflow = -10,
- cre_operatorstackoverflow = -11,
- cre_operatorstackunderflow = -12,
-} cregex_error_t;
+ cre_success = 0,
+ cre_nomatch = -1,
+ cre_matcherror = -2,
+ cre_outofmemory = -3,
+ cre_unmatchedleftparenthesis = -4,
+ cre_unmatchedrightparenthesis = -5,
+ cre_toomanysubexpressions = -6,
+ cre_toomanycharacterclasses = -7,
+ cre_malformedcharacterclass = -8,
+ cre_missingoperand = -9,
+ cre_unknownoperator = -10,
+ cre_operandstackoverflow = -11,
+ cre_operatorstackoverflow = -12,
+ cre_operatorstackunderflow = -13,
+} cregex_result;
enum {
/* compile-flags */
@@ -87,7 +87,7 @@ cregex cregex_init(void) {
return re;
}
-/* return 1 on success, or negative error code on failure. */
+/* return cre_success, or negative error code on failure. */
int cregex_compile(cregex *self, const char* pattern, int cflags);
static inline
@@ -100,7 +100,7 @@ cregex cregex_from(const char* pattern, int cflags) {
/* number of capture groups in a regex pattern, 0 if regex is invalid */
int cregex_captures(const cregex* self);
-/* return 1 on match, 0 on nomatch, and -1 on failure. */
+/* return cre_success, cre_nomatch or cre_matcherror. */
int cregex_find(const cregex* re, const char* input,
csview match[], int mflags);
static inline