internal

package
v0.0.0-...-8f8989e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyPrimitive

func DeepCopyPrimitive(v any) any

func UnsafeBytesToString

func UnsafeBytesToString(b []byte) string

func UnsafeNonEscape

func UnsafeNonEscape[T any](a []T) []T

Usage: * var stack_mem [100]byte // or stack_mem = []byte{99:0} * var mem_ne = UnsafeNonEscape(stack_mem[:]) * .... * doSomething(mem_ne) * .... * stack_mem[0] = 0 // or _ = stack_mem[0], can be sure that memory is not collected by gc

func UnsafeNonEscapeConv

func UnsafeNonEscapeConv[TSrc any, TRet any](a *TSrc) *TRet

Usage: * var stack_obj = some_struct{...} * var p = UnsafeNonEscapePtr(&stack_obj) * ... * doSomething(p) * ...

func UnsafeNonEscapePtr

func UnsafeNonEscapePtr[T any](a *T) *T

Usage: * var stack_obj = some_struct{...} * var p = UnsafeNonEscapePtr(&stack_obj) * ... * doSomething(p) * ...

func UnsafeStringToBytes

func UnsafeStringToBytes(s string) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL