mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-04 20:37:40 +03:00
11 lines
239 B
Go
11 lines
239 B
Go
package common
|
|
|
|
import "unsafe"
|
|
|
|
func PointerOf(reference any) uintptr {
|
|
return (uintptr)(unsafe.Pointer(reference.(*interface{})))
|
|
}
|
|
|
|
func PointerEquals(reference any, other any) bool {
|
|
return PointerOf(reference) == PointerOf(other)
|
|
}
|