[][src]Function slang_sys::spAddTranslationUnitSourceStringSpan

pub unsafe extern "C" fn spAddTranslationUnitSourceStringSpan(
    request: *mut SlangCompileRequest,
    translationUnitIndex: c_int,
    path: *const c_char,
    sourceBegin: *const c_char,
    sourceEnd: *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 sourceBegin A pointer to a buffer of UTF-8 encoded source code. @param sourceEnd A pointer to to the end of the buffer specified in sourceBegin

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.