std/integ/c
Supplementer package for C interoperability of Integrated Jule. Provides helper API to make C interoperability easy and defines standards for common operations. Most C interoperable programs should use this package to make the program reliable and standardized. This is an elementary package to write C interoperable programs and packages with any scale.
DANGER
This package contains low-level implementations and is under the terms of the Unsafe Jule. Be careful using API of this package.
Index
fn Malloc(size: uint): *unsafe
fn Calloc(size: uint, n: uint): *unsafe
fn Realloc(mut ptr: *unsafe, size: uint): *unsafe
fn Free(mut ptr: *unsafe)
type Char
type Wchar
type SignedChar
type UnsignedChar
type Short
type ShortInt
type SignedShort
type SignedShortInt
type UnsignedShort
type UnsignedShortInt
type Int
type Signed
type SignedInt
type Unsigned
type UnsignedInt
type Long
type LongInt
type SignedLong
type SignedLongInt
type UnsignedLong
type UnsignedLongInt
type LongLong
type LongLongInt
type SignedLongLong
type SignedLongLongInt
type UnsignedLongLong
type UnsignedLongLongInt
type Float
type Double
type LongDouble
type Size
type Uintptr
type Intptr
type Ptrdiff
Malloc
fn Malloc(size: uint): *unsafeAllocates size bytes of memory. Memory does not initialize. Returns pointer to allocation if success, nil if not.
This function is part of the C-style memory management. It might be very dangerous.
Calloc
fn Calloc(size: uint, n: uint): *unsafeAllocates n elements of size bytes each, all initialized to zero. Returns pointer to allocation if success, nil if not.
This function is part of the C-style memory management. It can be very dangerous.
Realloc
fn Realloc(mut ptr: *unsafe, size: uint): *unsafeRe-allocates the previously allocated block in ptr, making the new block size bytes long. Returns pointer to allocation if success, nil if not.
This function is part of the C-style memory management. It can be very dangerous.
Free
fn Free(mut ptr: *unsafe)Free a block allocated by malloc, realloc or calloc. ptr is not set as nil by function, therefore ptr is dangling after free. Set ptr as nil after free for more safety.
This function is part of the C-style memory management. It can be very dangerous.
Char
type Char: cpp.charType alias for char type.
Wchar
type Wchar: cpp.wchar_tType alias for wchar_t type.
SignedChar
type SignedChar: cpp.__jule_signed_charType alias for signed char type.
UnsignedChar
type UnsignedChar: cpp.__jule_unsigned_charType alias for signed char type.
Short
type Short: cpp.shortType alias for short type.
ShortInt
type ShortInt: ShortType alias for short int type.
SignedShort
type SignedShort: ShortType alias for signed short type.
SignedShortInt
type SignedShortInt: ShortType alias for signed short int type.
UnsignedShort
type UnsignedShort: cpp.__jule_unsigned_shortType alias for unsigned short type.
UnsignedShortInt
type UnsignedShortInt: UnsignedShortType alias for unsigned short int type.
Int
type Int: cpp.signedType alias for int type.
Signed
type Signed: IntType alias for signed type.
SignedInt
type SignedInt: IntType alias for signed int type.
Unsigned
type Unsigned: cpp.unsignedType alias for unsigned type.
UnsignedInt
type UnsignedInt: UnsignedType alias for unsigned int type.
Long
type Long: cpp.longType alias for long type.
LongInt
type LongInt: LongType alias for long int type.
SignedLong
type SignedLong: LongType alias for signed long type.
SignedLongInt
type SignedLongInt: LongType alias for signed long int type.
UnsignedLong
type UnsignedLong: cpp.__jule_unsigned_longType alias for unsigned long type.
UnsignedLongInt
type UnsignedLongInt: UnsignedLongType alias for unsigned long int type.
LongLong
type LongLong: cpp.__jule_unsigned_longType alias for long long type.
LongLongInt
type LongLongInt: LongLongType alias for long long int type.
SignedLongLong
type SignedLongLong: LongLongType alias for signed long long type.
SignedLongLongInt
type SignedLongLongInt: LongLongType alias for signed long long int type.
UnsignedLongLong
type UnsignedLongLong: cpp.__jule_unsigned_long_longType alias for unsigned long long type.
UnsignedLongLongInt
type UnsignedLongLongInt: UnsignedLongLongType alias for unsigned long long int type.
Float
type Float: cpp.floatType alias for float type.
Double
type Double: cpp.doubleType alias for double type.
LongDouble
type LongDouble: cpp.__jule_long_doubleType alias for long double type.
Size
type Size: cpp.size_tType alias for size_t type.
Uintptr
type Uintptr: cpp.uintptr_tType alias for uintptr_t type.
Intptr
type Intptr: cpp.intptr_tType alias for intptr_t type.
Ptrdiff
type Ptrdiff: cpp.ptrdiff_tType alias for ptrdiff_t type.