diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 15:35:51 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 15:35:51 -0400 |
| commit | 4ad7509013bcd383c2060c3659733edb17221fb3 (patch) | |
| tree | 0f3cc93b5866bdfb22a339a373e006fba112387b /stdlib | |
| parent | 9800784d41c892a021bcde11b6af228b80b90253 (diff) | |
Fix optional bytes
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/optionals.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stdlib/optionals.c b/stdlib/optionals.c index b6ca8dfb..e21be507 100644 --- a/stdlib/optionals.c +++ b/stdlib/optionals.c @@ -3,6 +3,7 @@ #include <pthread.h> #include "bools.h" +#include "bytes.h" #include "datatypes.h" #include "integers.h" #include "metamethods.h" @@ -33,6 +34,8 @@ public PUREFUNC bool is_null(const void *obj, const TypeInfo *non_optional_type) return ((OptionalInt16_t*)obj)->is_null; else if (non_optional_type == &Int8$info) return ((OptionalInt8_t*)obj)->is_null; + else if (non_optional_type == &Byte$info) + return ((OptionalByte_t*)obj)->is_null; else if (non_optional_type == &Thread) return *(pthread_t**)obj == NULL; |
