package unsafe

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. unsafe
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class CArray[T, N <: Nat] extends AnyRef
  2. type CBool = Boolean

    The C '_Bool' and C++ 'bool' type.

  3. type CChar = Byte

    The C 'char' type.

  4. type CChar16 = UShort

    The C++ 'char16_t' type.

  5. type CChar32 = UInt

    The C++ 'char32_t' type.

  6. type CDouble = Double

    The C 'double' type.

  7. type CFloat = Float

    The C 'float' type.

  8. sealed abstract class CFuncPtr extends AnyRef
  9. final class CFuncPtr0[R] extends CFuncPtr
  10. final class CFuncPtr1[T1, R] extends CFuncPtr
  11. final class CFuncPtr10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R] extends CFuncPtr
  12. final class CFuncPtr11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R] extends CFuncPtr
  13. final class CFuncPtr12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R] extends CFuncPtr
  14. final class CFuncPtr13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R] extends CFuncPtr
  15. final class CFuncPtr14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R] extends CFuncPtr
  16. final class CFuncPtr15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R] extends CFuncPtr
  17. final class CFuncPtr16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R] extends CFuncPtr
  18. final class CFuncPtr17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R] extends CFuncPtr
  19. final class CFuncPtr18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R] extends CFuncPtr
  20. 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
  21. final class CFuncPtr2[T1, T2, R] extends CFuncPtr
  22. 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
  23. 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
  24. 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
  25. final class CFuncPtr3[T1, T2, T3, R] extends CFuncPtr
  26. final class CFuncPtr4[T1, T2, T3, T4, R] extends CFuncPtr
  27. final class CFuncPtr5[T1, T2, T3, T4, T5, R] extends CFuncPtr
  28. final class CFuncPtr6[T1, T2, T3, T4, T5, T6, R] extends CFuncPtr
  29. final class CFuncPtr7[T1, T2, T3, T4, T5, T6, T7, R] extends CFuncPtr
  30. final class CFuncPtr8[T1, T2, T3, T4, T5, T6, T7, T8, R] extends CFuncPtr
  31. final class CFuncPtr9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R] extends CFuncPtr
  32. type CInt = Int

    The C 'int' type.

  33. type CLong = Long

    The C 'long' type.

  34. type CLongInt = Long

    The C 'long int' type.

  35. type CLongLong = Long

    The C 'long long' type.

  36. type CPtrDiff = Long

    The C/C++ 'ptrdiff_t' type.

  37. implicit class CQuote extends AnyRef

    C-style string literal.

  38. type CSSize = Long

    The C/C++ 'ssize_t' type.

  39. type CShort = Short

    The C 'short' type.

  40. type CSignedChar = Byte

    The C 'signed char' type.

  41. type CSize = ULong

    The C/C++ 'size_t' type.

  42. type CString = Ptr[CChar]

    C-style string with trailing 0.

  43. sealed abstract class CStruct extends AnyRef
  44. final class CStruct0 extends CStruct
  45. final class CStruct1[T1] extends CStruct
  46. final class CStruct10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] extends CStruct
  47. final class CStruct11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] extends CStruct
  48. final class CStruct12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] extends CStruct
  49. final class CStruct13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] extends CStruct
  50. final class CStruct14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] extends CStruct
  51. final class CStruct15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] extends CStruct
  52. final class CStruct16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] extends CStruct
  53. final class CStruct17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] extends CStruct
  54. final class CStruct18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] extends CStruct
  55. final class CStruct19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] extends CStruct
  56. final class CStruct2[T1, T2] extends CStruct
  57. 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
  58. 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
  59. 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
  60. final class CStruct3[T1, T2, T3] extends CStruct
  61. final class CStruct4[T1, T2, T3, T4] extends CStruct
  62. final class CStruct5[T1, T2, T3, T4, T5] extends CStruct
  63. final class CStruct6[T1, T2, T3, T4, T5, T6] extends CStruct
  64. final class CStruct7[T1, T2, T3, T4, T5, T6, T7] extends CStruct
  65. final class CStruct8[T1, T2, T3, T4, T5, T6, T7, T8] extends CStruct
  66. final class CStruct9[T1, T2, T3, T4, T5, T6, T7, T8, T9] extends CStruct
  67. type CUnsignedChar = UByte

    The C 'unsigned char' type.

  68. type CUnsignedInt = UInt

    The C 'unsigned int' type.

  69. type CUnsignedLong = ULong

    The C 'unsigned long' type.

  70. type CUnsignedLongInt = ULong

    The C 'unsigned long int' type.

  71. type CUnsignedLongLong = ULong

    The C 'unsigned long long' type.

  72. type CUnsignedShort = UShort

    The C 'unsigned short' type.

  73. final class CVarArg extends AnyRef

    Type of a C-style vararg in an extern method.

  74. final class CVarArgList extends AnyRef

    Type of a C-style vararg list (va_list in C).

  75. type CWideChar = UInt

    The C++ 'wchar_t' type.

  76. type CWideString = Ptr[CWideChar]
  77. sealed abstract class Nat extends AnyRef
  78. final class Ptr[T] extends AnyRef
  79. sealed abstract class Tag[T] extends AnyRef
  80. type UWord = ULong

    UInt on 32-bit architectures and ULong on 64-bit ones.

  81. implicit final class UnsafeRichInt extends AnyVal

    Scala Native unsafe extensions to the standard Int.

  82. implicit final class UnsafeRichLong extends AnyVal

    Scala Native unsafe extensions to the standard Long.

  83. type Word = Long

    Int on 32-bit architectures and Long on 64-bit ones.

  84. trait Zone extends AnyRef

    Zone allocator which manages memory allocations.

    Zone allocator which manages memory allocations.

    Annotations
    @implicitNotFound()
  85. final class extern extends Annotation with StaticAnnotation

    An annotation that is used to mark objects that contain externally-defined members.

  86. 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.

  87. 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

  1. def alignmentof[T](implicit tag: Tag[T]): CSize

    C-style alignment operator.

    C-style alignment operator.

    Annotations
    @alwaysinline()
  2. 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.

  3. macro def alloc[T](implicit tag: Tag[T], z: Zone): Ptr[T]

    Heap allocate and zero-initialize a value using current implicit allocator.

  4. def extern: Nothing

    Used as right hand side of external method and field declarations.

  5. def fromCString(cstr: CString, charset: Charset = Charset.defaultCharset()): String

    Convert a CString to a String using given charset.

  6. 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()
  7. 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()
  8. def sizeof[T](implicit tag: Tag[T]): CSize

    The C 'sizeof' operator.

    The C 'sizeof' operator.

    Annotations
    @alwaysinline()
  9. def ssizeof[T](implicit tag: Tag[T]): CSSize

    The C 'ssizeof' operator.

    The C 'ssizeof' operator.

    Annotations
    @alwaysinline()
  10. 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.

  11. 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.

  12. def tagof[T](implicit tag: Tag[T]): Tag[T]

    Materialize tag for given type.

    Materialize tag for given type.

    Annotations
    @alwaysinline()
  13. def toCString(str: String, charset: Charset)(implicit z: Zone): CString

    Convert a java.lang.String to a CString using given charset and allocator.

  14. def toCString(str: String)(implicit z: Zone): CString

    Convert a java.lang.String to a CString using default charset and given allocator.

  15. def toCVarArgList(varargs: Seq[CVarArg])(implicit z: Zone): CVarArgList

    Convert a sequence of CVarArg into a c CVarArgList.

  16. def toCVarArgList(vararg: CVarArg, varargs: CVarArg*)(implicit z: Zone): CVarArgList

    Convert given CVarArgs into a c CVarArgList.

  17. def toCVarArgList()(implicit z: Zone): CVarArgList

    Create an empty CVarArgList.

  18. 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()
  19. 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()
  20. object CFuncPtr
  21. object CFuncPtr0
  22. object CFuncPtr1
  23. object CFuncPtr10
  24. object CFuncPtr11
  25. object CFuncPtr12
  26. object CFuncPtr13
  27. object CFuncPtr14
  28. object CFuncPtr15
  29. object CFuncPtr16
  30. object CFuncPtr17
  31. object CFuncPtr18
  32. object CFuncPtr19
  33. object CFuncPtr2
  34. object CFuncPtr20
  35. object CFuncPtr21
  36. object CFuncPtr22
  37. object CFuncPtr3
  38. object CFuncPtr4
  39. object CFuncPtr5
  40. object CFuncPtr6
  41. object CFuncPtr7
  42. object CFuncPtr8
  43. object CFuncPtr9
  44. object CVarArg
  45. object CVarArgList
  46. object Nat
  47. object Ptr
  48. object Tag
  49. object Zone

Deprecated Value Members

  1. 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 into CSize

    Annotations
    @deprecated
    Deprecated

    (Since version 0.4.0) alloc with signed type is deprecated, convert size to unsigned value

  2. 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 into CSize

    Annotations
    @deprecated
    Deprecated

    (Since version 0.4.0) alloc with signed type is deprecated, convert size to unsigned value

Inherited from AnyRef

Inherited from Any

Ungrouped