File tree Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Original file line number Diff line number Diff line change 1+ export { decodeBase64 , encodeBase64 } from "jsr:@std/encoding@0.217.0/base64" ;
12export { dlopen } from "jsr:@denosaurs/plug@1.0.5" ;
23export {
34 createDownloadURL ,
Original file line number Diff line number Diff line change @@ -970,30 +970,22 @@ lib.sk_init();
970970
971971export default lib ;
972972
973- const {
974- op_ffi_cstr_read,
975- op_ffi_get_buf,
976- op_base64_encode,
977- op_base64_decode,
978- } : {
979- op_ffi_cstr_read : ( ptr : Deno . PointerValue ) => string ;
980- op_ffi_get_buf : (
981- ptr : Deno . PointerValue ,
982- offset : number ,
983- size : number ,
984- ) => ArrayBuffer ;
985- op_base64_encode : ( buf : Uint8Array ) => string ;
986- op_base64_decode : ( base64 : string ) => Uint8Array ;
987- // deno-lint-ignore no-explicit-any
988- } = ( Deno as any ) [ ( Deno as any ) . internal ] . core . ops ;
989-
990973export function cstr ( str : string ) {
991974 return new TextEncoder ( ) . encode ( str + "\0" ) ;
992975}
993976
994- export {
995- op_base64_decode as decodeBase64 ,
996- op_base64_encode as encodeBase64 ,
997- op_ffi_cstr_read as readCstr ,
998- op_ffi_get_buf as getBuffer ,
999- } ;
977+ export function readCstr ( ptr : Deno . PointerValue ) : string {
978+ return new Deno . UnsafePointerView ( ptr ! ) . getCString ( ) ;
979+ }
980+
981+ export function getBuffer (
982+ ptr : Deno . PointerValue ,
983+ offset : number ,
984+ size : number ,
985+ ) : Uint8Array {
986+ return new Uint8Array (
987+ new Deno . UnsafePointerView ( ptr ! ) . getArrayBuffer ( size , offset ) ,
988+ ) ;
989+ }
990+
991+ export { decodeBase64 , encodeBase64 } from "../deps.ts" ;
You can’t perform that action at this time.
0 commit comments