aboutsummaryrefslogtreecommitdiff
path: root/examples/http.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-15 17:34:34 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-15 17:34:34 -0400
commit8ee23054bf771e56802ce21d70229b7f8f2e9654 (patch)
tree58b7ac43f523ed1de1e8b5f49b6465d376c88843 /examples/http.tm
parent3cbc62ee43737e3afae0dd2e6597ff703689634e (diff)
Update Inline C syntax and documentation/tests
Diffstat (limited to 'examples/http.tm')
-rw-r--r--examples/http.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/http.tm b/examples/http.tm
index 0a27ece2..bbec3308 100644
--- a/examples/http.tm
+++ b/examples/http.tm
@@ -12,9 +12,9 @@ _curl := !@Memory
func _send(method:_Method, url:Text, data:Text?, headers=[:Text])->HTTPResponse:
chunks := @[:Text]
save_chunk := func(chunk:CString, size:Int64, n:Int64):
- chunks:insert(inline C (
+ chunks:insert(inline C:Text {
Text$format("%.*s", $size*$n, $chunk)
- ) : Text)
+ })
return n*size
inline C {