1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-18 16:10:26 +02:00
Beef/BeefLibs/corlib/src/Pointer.bf

30 lines
320 B
Beef
Raw Normal View History

2019-08-23 11:56:54 -07:00
namespace System
{
2019-10-09 16:16:01 -07:00
[AlwaysInclude]
struct Pointer : IHashable
2019-08-23 11:56:54 -07:00
{
2019-10-09 16:16:01 -07:00
void* mVal;
2019-08-23 11:56:54 -07:00
2019-10-09 16:16:01 -07:00
public int GetHashCode()
{
return (int)mVal;
}
[AlwaysInclude]
Object GetBoxed()
{
return new box this;
}
2019-08-23 11:56:54 -07:00
}
2019-10-09 16:16:01 -07:00
struct Pointer<T> : IHashable
2019-08-23 11:56:54 -07:00
{
T* mVal;
2019-10-09 16:16:01 -07:00
public int GetHashCode()
{
return (int)mVal;
}
2019-08-23 11:56:54 -07:00
}
}