[][src]Function slang_sys::spAddTranslationUnitSourceString

pub unsafe extern "C" fn spAddTranslationUnitSourceString(
    request: *mut SlangCompileRequest,
    translationUnitIndex: c_int,
    path: *const c_char,
    source: *const c_char
)

Add a source string to the given translation unit.

@param request The compile request that owns the translation unit. @param translationUnitIndex The index of the translation unit to add source to. @param path The file-system path that should be assumed for the source code. @param source A null-terminated UTF-8 encoded string of source code.

The implementation will make a copy of the source code data. An application may free the buffer immediately after this call returns.

The path will be used in any diagnostic output, as well as to determine the base path when resolving relative #includes.