aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-04 01:17:47 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-04 01:17:47 -0500
commitaabc0a3cff685e31f2492c977c6562d8e0ef8ebc (patch)
tree518e70f81407c02978c69f80be6f9872dabaa295 /environment.c
parentb69d14b89492919dc5c1669d2c569ee3baf1bbb0 (diff)
Update text API to use optional returns when applicable
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/environment.c b/environment.c
index 39e50b02..47e30dba 100644
--- a/environment.c
+++ b/environment.c
@@ -374,9 +374,9 @@ env_t *new_compilation_unit(CORD libname)
{"ends_with", "Text$ends_with", "func(text,suffix:Text -> Bool)"},
{"find", "Text$find", "func(text:Text, pattern:Pattern, start=1 -> Int?)"},
{"find_all", "Text$find_all", "func(text:Text, pattern:Pattern -> [Text])"},
- {"from_bytes", "Text$from_bytes", "func(bytes:[Byte] -> Text)"},
- {"from_c_string", "Text$from_str", "func(str:CString -> Text)"},
- {"from_codepoint_names", "Text$from_codepoint_names", "func(codepoint_names:[Text] -> Text)"},
+ {"from_bytes", "Text$from_bytes", "func(bytes:[Byte] -> Text?)"},
+ {"from_c_string", "Text$from_str", "func(str:CString -> Text?)"},
+ {"from_codepoint_names", "Text$from_codepoint_names", "func(codepoint_names:[Text] -> Text?)"},
{"from_codepoints", "Text$from_codepoints", "func(codepoints:[Int32] -> Text)"},
{"without_escaping", "Path$cleanup", "func(text:Text -> Path)"},
{"has", "Text$has", "func(text:Text, pattern:Pattern -> Bool)"},