util

package
v0.0.0-...-e895a29 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hashable

func Hashable(value interface{}) (hashable bool)

func UnsafeBytesData

func UnsafeBytesData(b []byte) (unsafe.Pointer, int)

unsafeBytesData returns a C string backed by Go data. The C string is NOT null-terminated, so its length must be taken into account.

If the array backing the b Go slice is garbage collected, the returned C data will be invalid and will crash the program if used. As such, the resulting data must only be used inside the implementation of the qml package and while the life time of the Go array is guaranteed.

func UnsafeString

func UnsafeString(data unsafe.Pointer, size int) string

unsafeString returns a Go string backed by C data.

If the C data is deallocated or moved, the string will be invalid and will crash the program if used. As such, the resulting string must only be used inside the implementation of the qml package and while the life time of the C data is guaranteed.

func UnsafeStringData

func UnsafeStringData(s string) (unsafe.Pointer, int)

unsafeStringData returns a C string backed by Go data. The C string is NOT null-terminated, so its length must be taken into account.

If the s Go string is garbage collected, the returned C data will be invalid and will crash the program if used. As such, the resulting data must only be used inside the implementation of the qml package and while the life time of the Go string is guaranteed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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