diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 18:47:39 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 18:47:39 -0400 |
| commit | 61e482f6f36aee6f72392a6188f2ec5c858b88fd (patch) | |
| tree | bea4123fcc62dd834405ae89ce9fe260e90a0023 /builtins/functions.h | |
| parent | f0f8f218703ebb4512b3cd3f9e06b86a7d9861b0 (diff) | |
Initial WIP first past
Diffstat (limited to 'builtins/functions.h')
| -rw-r--r-- | builtins/functions.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/builtins/functions.h b/builtins/functions.h index 70266ba6..96837249 100644 --- a/builtins/functions.h +++ b/builtins/functions.h @@ -9,25 +9,25 @@ #include "datatypes.h" #include "types.h" -extern uint8_t TOMO_HASH_KEY[8]; +extern uint8_t TOMO_HASH_KEY[16]; void tomo_init(void); -void fail(CORD fmt, ...); -void fail_source(const char *filename, int64_t start, int64_t end, CORD fmt, ...); -CORD builtin_last_err(); +void fail(const char *fmt, ...); +void fail_source(const char *filename, int64_t start, int64_t end, const char *fmt, ...); +Text_t builtin_last_err(); void start_test(const char *filename, int64_t start, int64_t end); -void end_test(void *expr, const TypeInfo *type, CORD expected, const char *filename, int64_t start, int64_t end); +void end_test(void *expr, const TypeInfo *type, const char *expected, const char *filename, int64_t start, int64_t end); #define test(expr, type, expected, filename, start, end) {\ start_test(filename, start, end); \ end_test(expr, type, expected, filename, start, end); } -void say(CORD text, bool newline); +void say(Text_t text, bool newline); -uint32_t generic_hash(const void *obj, const TypeInfo *type); +uint64_t generic_hash(const void *obj, const TypeInfo *type); int32_t generic_compare(const void *x, const void *y, const TypeInfo *type); bool generic_equal(const void *x, const void *y, const TypeInfo *type); -CORD generic_as_text(const void *obj, bool colorize, const TypeInfo *type); +Text_t generic_as_text(const void *obj, bool colorize, const TypeInfo *type); closure_t spawn(closure_t fn); -bool pop_flag(char **argv, int *i, const char *flag, CORD *result); +bool pop_flag(char **argv, int *i, const char *flag, Text_t *result); // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
