Void* should never deref and should allow methods to be attached to it.

This commit is contained in:
Christoffer Lerno
2023-10-27 00:10:59 +02:00
parent a0bc03a9f5
commit e17bb5f321
7 changed files with 11 additions and 13 deletions

View File

@@ -362,6 +362,7 @@ macro uint bool.hash(bool b) => (uint)b;
macro uint typeid.hash(typeid t) => ((ulong)(uptr)t).hash();
macro uint String.hash(String c) => (uint)fnv32a::encode(c);
macro uint char[].hash(char[] c) => (uint)fnv32a::encode(c);
macro uint void*.hash(void* ptr) => ((ulong)(uptr)ptr).hash();
module std::core::builtin @if((env::LINUX || env::DARWIN) && env::COMPILER_SAFE_MODE && env::DEBUG_SYMBOLS);
import libc;