summaryrefslogtreecommitdiff
path: root/prism/templates/src
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2023-10-24 14:23:39 -0400
committergit <[email protected]>2023-10-26 13:33:22 +0000
commitfeb1427ad8f3d6448d9f8d0c7009dfdf711b7f48 (patch)
treeb2a512367cd7346ca08816de4620bced03d16023 /prism/templates/src
parentbfb9b5e69921c91901cce820f54e79907a5ae829 (diff)
[ruby/prism] Compile with WASI
https://github.com/ruby/prism/commit/73c44b0b9c
Diffstat (limited to 'prism/templates/src')
-rw-r--r--prism/templates/src/serialize.c.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/prism/templates/src/serialize.c.erb b/prism/templates/src/serialize.c.erb
index e985e72ec3..9528496c7d 100644
--- a/prism/templates/src/serialize.c.erb
+++ b/prism/templates/src/serialize.c.erb
@@ -150,11 +150,11 @@ static void
pm_serialize_magic_comment(pm_parser_t *parser, pm_magic_comment_t *magic_comment, pm_buffer_t *buffer) {
// serialize key location
pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->key_start - parser->start));
- pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->key_length));
+ pm_buffer_append_u32(buffer, pm_sizet_to_u32(magic_comment->key_length));
// serialize value location
pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->value_start - parser->start));
- pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->value_length));
+ pm_buffer_append_u32(buffer, pm_sizet_to_u32(magic_comment->value_length));
}
static void