mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
- new_* functions in general moved to version without new_ prefix.
- `string::new_from_*` changed to `string::from_*`. - `String.to_utf16_copy` and related changed to `String.to_utf16`. - `String.to_utf16_tcopy` and related changed to `String.to_temp_utf16` - `mem::temp_new` changed to `mem::tnew`. - `mem::temp_alloc` and related changed to `mem::talloc`. - `mem::temp_new_array` changed to `mem::temp_array`.
This commit is contained in:
committed by
Christoffer Lerno
parent
b35aafd3d5
commit
c40198b016
@@ -40,7 +40,7 @@ fn void! native_stat(Stat* stat, String path) @if(env::DARWIN || env::LINUX || e
|
||||
fn usz! native_file_size(String path) @if(env::WIN32) => @pool()
|
||||
{
|
||||
Win32_FILE_ATTRIBUTE_DATA data;
|
||||
win32::getFileAttributesExW(path.to_wstring_tcopy()!, Win32_GET_FILEEX_INFO_LEVELS.STANDARD, &data);
|
||||
win32::getFileAttributesExW(path.to_temp_wstring()!, Win32_GET_FILEEX_INFO_LEVELS.STANDARD, &data);
|
||||
Win32_LARGE_INTEGER size;
|
||||
size.lowPart = data.nFileSizeLow;
|
||||
size.highPart = data.nFileSizeHigh;
|
||||
@@ -74,7 +74,7 @@ fn bool native_file_or_dir_exists(String path)
|
||||
$case env::WIN32:
|
||||
@pool()
|
||||
{
|
||||
return (bool)win32::pathFileExistsW(path.to_utf16_tcopy()) ?? false;
|
||||
return (bool)win32::pathFileExistsW(path.to_temp_utf16()) ?? false;
|
||||
};
|
||||
$case env::POSIX:
|
||||
@pool()
|
||||
|
||||
Reference in New Issue
Block a user