dplug.core.nogc

Various @nogc alternatives. This file includes parts of std.process, std.random, std.uuid.

Members

Aliases

CString
alias CString = CStringImpl!char
Undocumented in source.
CString16
alias CString16 = CStringImpl!wchar
Undocumented in source.
nogcComparisonFunction
alias nogcComparisonFunction(T) = int delegate(in T a, in T b) nothrow @(nogc)

Must return -1 if a < b 0 if a == b 1 if a > b

Functions

assumeNoGC
auto assumeNoGC(T t)
Undocumented in source. Be warned that the author may not have intended to support it.
assumeNothrowNoGC
auto assumeNothrowNoGC(T t)
Undocumented in source. Be warned that the author may not have intended to support it.
assumeZeroTerminated
const(char)* assumeZeroTerminated(const(char)[] input)

Semantic function to check that a D string implicitely conveys a termination byte after the slice. (typically those comes from string literals or stringDup/stringIDup)

browseNoGC
void browseNoGC(string url)
Undocumented in source. Be warned that the author may not have intended to support it.
debugBreak
void debugBreak()

Inserts a breakpoint instruction. useful to trigger the debugger.

debugLog
void debugLog(const(char)* message)
debugLogf
void debugLogf(const(char)* fmt, ...)

Outputs a debug string in either: - stdout on POSIX-like (visible in the command-line) - the Output Windows on Windows (visible withing Visual Studio or with dbgview.exe) Warning: no end-of-line added!

destroyFree
void destroyFree(T p)

Destroys and frees a class object created with mallocEmplace.

destroyFree
void destroyFree(T p)

Destroys and frees an interface object created with mallocEmplace.

destroyFree
void destroyFree(T* p)

Destroys and frees a non-class object created with mallocEmplace.

destroyNoGC
void destroyNoGC(T x)
Undocumented in source. Be warned that the author may not have intended to support it.
destroyNoGC
void destroyNoGC(T obj)
Undocumented in source. Be warned that the author may not have intended to support it.
destroyNoGC
void destroyNoGC(T obj)
Undocumented in source. Be warned that the author may not have intended to support it.
freeSlice
void freeSlice(const(T)[] slice)

Frees a slice allocated with mallocSlice.

mallocDup
T[] mallocDup(const(T)[] slice)

Duplicates a slice with malloc. Equivalent to .dup Has to be cleaned-up with free(slice.ptr) or freeSlice(slice).

mallocIDup
immutable(T)[] mallocIDup(const(T)[] slice)

Duplicates a slice with malloc. Equivalent to .idup Has to be cleaned-up with free(slice.ptr) or freeSlice(slice).

mallocNew
auto mallocNew(Args args)

Allocates and construct a struct or class object.

mallocSlice
T[] mallocSlice(size_t count)

Allocates a slice with malloc.

mallocSliceNoInit
T[] mallocSliceNoInit(size_t count)

Allocates a slice with malloc, but does not initialize the content.

stringDup
char[] stringDup(const(char)* cstr)

Duplicates a zero-terminated string with malloc, return a char[] with zero-terminated byte. Has to be cleaned-up with free(s.ptr). Note: The zero-terminating byte is preserved. This allow to have a string which also can be converted to a C string with .ptr. However the zero byte is not included in slice length.

stringIDup
string stringIDup(const(char)* cstr)

Duplicates a zero-terminated string with malloc, return a string. with zero-terminated byte. Has to be cleaned-up with free(s.ptr). Note: The zero-terminating byte is preserved. This allow to have a string which also can be converted to a C string with .ptr. However the zero byte is not included in slice length.

stringNCopy
void stringNCopy(char* dest, size_t maxChars, const(char)[] source)
Undocumented in source. Be warned that the author may not have intended to support it.
timSort
void timSort(T[] dst, Vec!T storeBuf, nogcComparisonFunction!T comparison)
Undocumented in source. Be warned that the author may not have intended to support it.
unsafeObjectCast
T unsafeObjectCast(Object obj)

A bit faster than a dynamic cast. This is to avoid TypeInfo look-up.

Structs

CStringImpl
struct CStringImpl(CharType)

Zero-terminated C string, to replace toStringz and toUTF16z

Meta