Skip to content
Discussion options

You must be logged in to vote

That type umw is an unsigned machine word. It's an alias for uintptr_t which is an unsigned int type that is guaranteed to be able to hold a pointer without losing any bits.

There are also 2 macros there that will get an umw from a Pointer or give a pointer to a certain type from a given UMW.

UMWFromPointer(Pointer), this converts a pointer into an integer that is large enough to hold it.
So, what you get is a numerical representation of the pointer that you pass to it.

PointerFromUMW(type, Value), this takes an integer like one created from UMWFromPointer(Pointer) and cast it back into a pointer of type type.
So, Value would be a UMW (an unsigned machine word)

Why do this at all? Sometim…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by btgvesta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants