# c

# c.nullptr

Access the null pointer.

# c.malloc(size)

Allocate memory from the C heap. Return a pointer to the allocated memory.

# c.free(ptr)

Free memory from the C heap.

# c.sizeof(type: str)

Return the size in bytes of the C type. For example, c.sizeof("char") returns 1.

# c.cast(p, type: str)

Cast a pointer to a specific type. For example, c.cast(p, "int*").

# c.memcpy(dest, src, size)

Copy size bytes from src to dest. The memory areas must not overlap.

# c.memset(ptr, value, size)

Set size bytes of memory starting at ptr to value.

# c.ctype(type: str)

Return the C type of the given type.