aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zilch/App/object-store.js2
-rw-r--r--src/zilch/Env/js.zig2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/zilch/App/object-store.js b/src/zilch/App/object-store.js
index 5199235..3566c89 100644
--- a/src/zilch/App/object-store.js
+++ b/src/zilch/App/object-store.js
@@ -127,7 +127,7 @@ class ObjectStore {
}
if (typeof value === 'string') {
- const string_ptr = wasm.exports.valueAllocString(ptr, value.length);
+ const string_ptr = wasm.exports.valueAllocBuffer(ptr, value.length);
const encoder = new TextEncoder();
const string = encoder.encode(value);
const memory = new Uint8Array(wasm.memory.buffer);
diff --git a/src/zilch/Env/js.zig b/src/zilch/Env/js.zig
index ed8592a..a653192 100644
--- a/src/zilch/Env/js.zig
+++ b/src/zilch/Env/js.zig
@@ -8,7 +8,7 @@ pub extern "object_store" fn process(
length: usize,
) void;
-export fn valueAllocString(value: *Env.Value, len: usize) [*]u8 {
+export fn valueAllocBuffer(value: *Env.Value, len: usize) [*]u8 {
const ptr: [*]u8 = @ptrCast(std.heap.wasm_allocator.alloc(u8, len) catch @panic("unable to allocate string"));
value.kind = .string;
value.value = .{