Skip to content

Commit

Permalink
Merge pull request #247 from anholt/win64-khr-types
Browse files Browse the repository at this point in the history
Support Win64 pointer-sized types
  • Loading branch information
ebassi authored Apr 19, 2021
2 parents 54f645b + 144cbc9 commit 0a304d1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/gen_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,17 @@ def write_header(self, out_file):
self.outln('typedef uint32_t khronos_uint32_t;')
self.outln('typedef uint64_t khronos_uint64_t;')
self.outln('typedef float khronos_float_t;')
self.outln('typedef long khronos_intptr_t;')
self.outln('typedef long khronos_ssize_t;')
self.outln('typedef unsigned long khronos_usize_t;')
self.outln('#ifdef _WIN64')
self.outln('typedef signed long long int khronos_intptr_t;')
self.outln('typedef unsigned long long int khronos_uintptr_t;')
self.outln('typedef signed long long int khronos_ssize_t;')
self.outln('typedef unsigned long long int khronos_usize_t;')
self.outln('#else')
self.outln('typedef signed long int khronos_intptr_t;')
self.outln('typedef unsigned long int khronos_uintptr_t;')
self.outln('typedef signed long int khronos_ssize_t;')
self.outln('typedef unsigned long int khronos_usize_t;')
self.outln('#endif')
self.outln('typedef uint64_t khronos_utime_nanoseconds_t;')
self.outln('typedef int64_t khronos_stime_nanoseconds_t;')
self.outln('#define KHRONOS_MAX_ENUM 0x7FFFFFFF')
Expand Down

0 comments on commit 0a304d1

Please sign in to comment.