Skip to content

Commit

Permalink
Remove usage of Deno.core. Fixes littledivy#59
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Dec 31, 2022
1 parent e412ea6 commit 6f5227d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,10 @@ export enum EventType {
}

const _raw = Symbol("raw");
const enc = new TextEncoder();

function asCString(str: string): Uint8Array {
// @ts-ignore: Deno.core is not public API.
return Deno.core.encode(`${str}\0`);
return enc.encode(`${str}\0`);
}

function throwSDLError(): never {
Expand Down

0 comments on commit 6f5227d

Please sign in to comment.