ptr

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

README

ptr

Purpose

Facilitating pointer operations.

Documentation

github.com/Siiir/ptr v1

Repository

https://github.com/Siiir/ptr

Documentation

Overview

Facilitating memory & pointer operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmp128Bits

func Cmp128Bits[T1, T2 any](p1 *T1, p2 *T2) bool

Equivalent to: CmpBitsAs[[2]uint64](p1, p2)

func Cmp16Bits

func Cmp16Bits[T1, T2 any](p1 *T1, p2 *T2) bool

Equivalent to: CmpBitsAs[uint16](p1, p2)

func Cmp32Bits

func Cmp32Bits[T1, T2 any](p1 *T1, p2 *T2) bool

Equivalent to: CmpBitsAs[uint32](p1, p2)

func Cmp64Bits

func Cmp64Bits[T1, T2 any](p1 *T1, p2 *T2) bool

Equivalent to: CmpBitsAs[uint64](p1, p2)

func Cmp8Bits

func Cmp8Bits[T1, T2 any](p1 *T1, p2 *T2) bool

Equivalent to: CmpBitsAs[uint8](p1, p2)

func CmpBitsAs

func CmpBitsAs[CT comparable, T1, T2 any](p1 *T1, p2 *T2) bool

Compares values pointed by `p1` & `p2`, as if they were values of type CT, using equality operator.

If `InT` is smaller in memory than `CT`, function will deliberately fail to compile during linkage.

func InRange

func InRange[T any](val, leftInclusiveBound, rightInclusiveBound *T) bool

Returns logical value of `val`∈⟨`leftInclusiveBound`,`rightInclusiveBound`⟩

func NewUintptr

func NewUintptr[T any](val *T) uintptr

Casts *T into uintptr

Types

This section is empty.

Jump to

Keyboard shortcuts

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