Skip to content

Instantly share code, notes, and snippets.

@phoddie
Last active December 27, 2016 18:40
Show Gist options
  • Save phoddie/fe3ae5d9f1a36d58d0f31aa999740587 to your computer and use it in GitHub Desktop.
Save phoddie/fe3ae5d9f1a36d58d0f31aa999740587 to your computer and use it in GitHub Desktop.
Useful C types
uintptr_t - integer type large enough to hold pointer
#include "stdint.h"
void *xp = // some pointer
uintptr_t xi = (uintptr_t)xp;
int *xp2 = (void *)xi;
// xp == xp2 on all systems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment