package unsafe
- Alphabetic
- By Inheritance
- unsafe
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class CArray[T, N <: Nat] extends AnyRef
- type CBool = Boolean
The C '_Bool' and C++ 'bool' type.
- type CChar = Byte
The C 'char' type.
- type CChar16 = UShort
The C++ 'char16_t' type.
- type CChar32 = UInt
The C++ 'char32_t' type.
- type CDouble = Double
The C 'double' type.
- type CFloat = Float
The C 'float' type.
- sealed abstract class CFuncPtr extends AnyRef
- final class CFuncPtr0[R] extends CFuncPtr
- final class CFuncPtr1[T1, R] extends CFuncPtr
- final class CFuncPtr10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R] extends CFuncPtr
- final class CFuncPtr11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R] extends CFuncPtr
- final class CFuncPtr12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R] extends CFuncPtr
- final class CFuncPtr13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R] extends CFuncPtr
- final class CFuncPtr14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R] extends CFuncPtr
- final class CFuncPtr15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R] extends CFuncPtr
- final class CFuncPtr16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R] extends CFuncPtr
- final class CFuncPtr17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R] extends CFuncPtr
- final class CFuncPtr18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R] extends CFuncPtr
- final class CFuncPtr19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R] extends CFuncPtr
- final class CFuncPtr2[T1, T2, R] extends CFuncPtr
- final class CFuncPtr20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R] extends CFuncPtr
- final class CFuncPtr21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R] extends CFuncPtr
- final class CFuncPtr22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R] extends CFuncPtr
- final class CFuncPtr3[T1, T2, T3, R] extends CFuncPtr
- final class CFuncPtr4[T1, T2, T3, T4, R] extends CFuncPtr
- final class CFuncPtr5[T1, T2, T3, T4, T5, R] extends CFuncPtr
- final class CFuncPtr6[T1, T2, T3, T4, T5, T6, R] extends CFuncPtr
- final class CFuncPtr7[T1, T2, T3, T4, T5, T6, T7, R] extends CFuncPtr
- final class CFuncPtr8[T1, T2, T3, T4, T5, T6, T7, T8, R] extends CFuncPtr
- final class CFuncPtr9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R] extends CFuncPtr
- type CInt = Int
The C 'int' type.
- type CLong = Long
The C 'long' type.
- type CLongInt = Long
The C 'long int' type.
- type CLongLong = Long
The C 'long long' type.
- type CPtrDiff = Long
The C/C++ 'ptrdiff_t' type.
- implicit class CQuote extends AnyRef
C-style string literal.
- type CSSize = Long
The C/C++ 'ssize_t' type.
- type CShort = Short
The C 'short' type.
- type CSignedChar = Byte
The C 'signed char' type.
- type CSize = ULong
The C/C++ 'size_t' type.
- type CString = Ptr[CChar]
C-style string with trailing 0.
- sealed abstract class CStruct extends AnyRef
- final class CStruct0 extends CStruct
- final class CStruct1[T1] extends CStruct
- final class CStruct10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] extends CStruct
- final class CStruct11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] extends CStruct
- final class CStruct12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] extends CStruct
- final class CStruct13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] extends CStruct
- final class CStruct14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] extends CStruct
- final class CStruct15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] extends CStruct
- final class CStruct16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] extends CStruct
- final class CStruct17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] extends CStruct
- final class CStruct18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] extends CStruct
- final class CStruct19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] extends CStruct
- final class CStruct2[T1, T2] extends CStruct
- final class CStruct20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] extends CStruct
- final class CStruct21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] extends CStruct
- final class CStruct22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] extends CStruct
- final class CStruct3[T1, T2, T3] extends CStruct
- final class CStruct4[T1, T2, T3, T4] extends CStruct
- final class CStruct5[T1, T2, T3, T4, T5] extends CStruct
- final class CStruct6[T1, T2, T3, T4, T5, T6] extends CStruct
- final class CStruct7[T1, T2, T3, T4, T5, T6, T7] extends CStruct
- final class CStruct8[T1, T2, T3, T4, T5, T6, T7, T8] extends CStruct
- final class CStruct9[T1, T2, T3, T4, T5, T6, T7, T8, T9] extends CStruct
- type CUnsignedChar = UByte
The C 'unsigned char' type.
- type CUnsignedInt = UInt
The C 'unsigned int' type.
- type CUnsignedLong = ULong
The C 'unsigned long' type.
- type CUnsignedLongInt = ULong
The C 'unsigned long int' type.
- type CUnsignedLongLong = ULong
The C 'unsigned long long' type.
- type CUnsignedShort = UShort
The C 'unsigned short' type.
- final class CVarArg extends AnyRef
Type of a C-style vararg in an extern method.
- final class CVarArgList extends AnyRef
Type of a C-style vararg list (va_list in C).
- type CWideChar = UInt
The C++ 'wchar_t' type.
- type CWideString = Ptr[CWideChar]
- sealed abstract class Nat extends AnyRef
- final class Ptr[T] extends AnyRef
- sealed abstract class Tag[T] extends AnyRef
- type UWord = ULong
UInt on 32-bit architectures and ULong on 64-bit ones.
- implicit final class UnsafeRichInt extends AnyVal
Scala Native unsafe extensions to the standard Int.
- implicit final class UnsafeRichLong extends AnyVal
Scala Native unsafe extensions to the standard Long.
- type Word = Long
Int on 32-bit architectures and Long on 64-bit ones.
- trait Zone extends AnyRef
Zone allocator which manages memory allocations.
Zone allocator which manages memory allocations.
- Annotations
- @implicitNotFound()
- final class extern extends Annotation with StaticAnnotation
An annotation that is used to mark objects that contain externally-defined members.
- final class link extends Annotation with StaticAnnotation
An annotation that is used to automatically link with native library whenever an annotated extern object is used.
- final class name extends Annotation with StaticAnnotation
An annotation that is used to refer to differently-named native symbol.
An annotation that is used to refer to differently-named native symbol.
- Annotations
- @field() @getter() @setter()
Value Members
- def alignmentof[T](implicit tag: Tag[T]): CSize
C-style alignment operator.
C-style alignment operator.
- Annotations
- @alwaysinline()
- macro def alloc[T](n: CSize)(implicit tag: Tag[T], z: Zone): Ptr[T]
Heap allocate and zero-initialize n values using current implicit allocator.
- macro def alloc[T](implicit tag: Tag[T], z: Zone): Ptr[T]
Heap allocate and zero-initialize a value using current implicit allocator.
- def extern: Nothing
Used as right hand side of external method and field declarations.
- def fromCString(cstr: CString, charset: Charset = Charset.defaultCharset()): String
Convert a CString to a String using given charset.
- def fromCWideString(cwstr: Ptr[CChar16], charset: Charset)(implicit d: DummyImplicit): String
Convert a CWideString based on Ptr[CChar16] to a String using given charset
Convert a CWideString based on Ptr[CChar16] to a String using given charset
- Annotations
- @alwaysinline()
- def fromCWideString(cwstr: CWideString, charset: Charset): String
Convert a CWideString to a String using given charset, assumes platform default wchar_t size
Convert a CWideString to a String using given charset, assumes platform default wchar_t size
- Annotations
- @alwaysinline()
- def sizeof[T](implicit tag: Tag[T]): CSize
The C 'sizeof' operator.
The C 'sizeof' operator.
- Annotations
- @alwaysinline()
- def ssizeof[T](implicit tag: Tag[T]): CSSize
The C 'ssizeof' operator.
The C 'ssizeof' operator.
- Annotations
- @alwaysinline()
- macro def stackalloc[T](n: CSize)(implicit tag: Tag[T]): Ptr[T]
Stack allocate n values of given type.
Stack allocate n values of given type.
Note: unlike alloc, the memory is not zero-initialized.
- macro def stackalloc[T](implicit tag: Tag[T]): Ptr[T]
Stack allocate a value of given type.
Stack allocate a value of given type.
Note: unlike alloc, the memory is not zero-initialized.
- def tagof[T](implicit tag: Tag[T]): Tag[T]
Materialize tag for given type.
Materialize tag for given type.
- Annotations
- @alwaysinline()
- def toCString(str: String, charset: Charset)(implicit z: Zone): CString
Convert a java.lang.String to a CString using given charset and allocator.
- def toCString(str: String)(implicit z: Zone): CString
Convert a java.lang.String to a CString using default charset and given allocator.
- def toCVarArgList(varargs: Seq[CVarArg])(implicit z: Zone): CVarArgList
Convert a sequence of CVarArg into a c CVarArgList.
- def toCVarArgList(vararg: CVarArg, varargs: CVarArg*)(implicit z: Zone): CVarArgList
Convert given CVarArgs into a c CVarArgList.
- def toCVarArgList()(implicit z: Zone): CVarArgList
Create an empty CVarArgList.
- def toCWideString(str: String, charset: Charset = StandardCharsets.UTF_16LE)(implicit z: Zone): Ptr[CWideString]
Convert a java.lang.String to a CWideString using given charset and allocator.
Convert a java.lang.String to a CWideString using given charset and allocator.
- Annotations
- @alwaysinline()
- def toCWideStringUTF16LE(str: String)(implicit z: Zone): Ptr[CChar16]
Convert a java.lang.String to a CWideString using given UTF-16 LE charset.
Convert a java.lang.String to a CWideString using given UTF-16 LE charset.
- Annotations
- @alwaysinline()
- object CFuncPtr
- object CFuncPtr0
- object CFuncPtr1
- object CFuncPtr10
- object CFuncPtr11
- object CFuncPtr12
- object CFuncPtr13
- object CFuncPtr14
- object CFuncPtr15
- object CFuncPtr16
- object CFuncPtr17
- object CFuncPtr18
- object CFuncPtr19
- object CFuncPtr2
- object CFuncPtr20
- object CFuncPtr21
- object CFuncPtr22
- object CFuncPtr3
- object CFuncPtr4
- object CFuncPtr5
- object CFuncPtr6
- object CFuncPtr7
- object CFuncPtr8
- object CFuncPtr9
- object CVarArg
- object CVarArgList
- object Nat
- object Ptr
- object Tag
- object Zone
Deprecated Value Members
- macro def alloc[T](n: CSSize)(implicit tag: Tag[T], z: Zone): Ptr[T]
Heap allocate and zero-initialize n values using current implicit allocator.
Heap allocate and zero-initialize n values using current implicit allocator. This method takes argument of type
CSSize
for easier interop, but it' always converted intoCSize
- Annotations
- @deprecated
- Deprecated
(Since version 0.4.0) alloc with signed type is deprecated, convert size to unsigned value
- macro def stackalloc[T](n: CSSize)(implicit tag: Tag[T]): Ptr[T]
Stack allocate n values of given type.
Stack allocate n values of given type.
Note: unlike alloc, the memory is not zero-initialized. This method takes argument of type
CSSize
for easier interop, but it's always converted intoCSize
- Annotations
- @deprecated
- Deprecated
(Since version 0.4.0) alloc with signed type is deprecated, convert size to unsigned value