跳到主要内容
版本:master

unsafe -- Unsafe type convertion & operation

概述

主要应用于与其他语言交互(ffi)时的类型转换和操作

接口

// Convert cstr to gs string
string cstr_to_string(int ptr);
// Peek memory as bytes (only used for return value of function in dynamic lib)
buffer data_to_buffer(int ptr, int len);
// Put int64 from a buffer
void memcpy(int dest, int src, int len);
// FFI module must be initialized before this module
mixed ref_cstruct(int id, int ptr);