Shared.h 667 B

123456789101112131415161718192021222324
  1. #ifdef _WIN32
  2. typedef unsigned __int64 U64;
  3. typedef signed __int64 I64;
  4. typedef signed __int32 I32;
  5. #else
  6. #include <stdint.h>
  7. typedef uint64_t U64;
  8. typedef int64_t I64;
  9. typedef int32_t I32;
  10. #endif
  11. #if defined _WIN64 || defined __LP64__
  12. typedef I64 IntPtr; // Signed Int capable of storing full memory address (needs to be 64-bit on 64-bit platforms)
  13. #else
  14. typedef I32 IntPtr; // Signed Int capable of storing full memory address (needs to be 32-bit on 32-bit platforms)
  15. #endif
  16. typedef void *Ptr;
  17. namespace EE
  18. {
  19. extern Ptr Alloc(IntPtr size);
  20. extern void Free (Ptr &ptr);
  21. }