William S Fulton | 49be05f | 2006-03-07 00:14:10 +0000 | [diff] [blame] | 1 | /* ----------------------------------------------------------------------------- |
William S Fulton | 49be05f | 2006-03-07 00:14:10 +0000 | [diff] [blame] | 2 | * stdint.i |
| 3 | * |
| 4 | * SWIG library file for ISO C99 types: 7.18 Integer types <stdint.h> |
| 5 | * ----------------------------------------------------------------------------- */ |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 6 | |
| 7 | %{ |
Marcelo Matus | 38a72d8 | 2006-01-22 00:02:38 +0000 | [diff] [blame] | 8 | #include <stdint.h> // Use the C99 official header |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 9 | %} |
| 10 | |
Marcelo Matus | d79b9fc | 2005-12-01 07:00:24 +0000 | [diff] [blame] | 11 | %include <swigarch.i> |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 12 | |
| 13 | /* Exact integral types. */ |
| 14 | |
| 15 | /* Signed. */ |
| 16 | |
| 17 | typedef signed char int8_t; |
| 18 | typedef short int int16_t; |
| 19 | typedef int int32_t; |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 20 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 21 | typedef long int int64_t; |
| 22 | #else |
| 23 | typedef long long int int64_t; |
| 24 | #endif |
| 25 | |
| 26 | /* Unsigned. */ |
| 27 | typedef unsigned char uint8_t; |
| 28 | typedef unsigned short int uint16_t; |
| 29 | typedef unsigned int uint32_t; |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 30 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 31 | typedef unsigned long int uint64_t; |
| 32 | #else |
| 33 | typedef unsigned long long int uint64_t; |
| 34 | #endif |
| 35 | |
| 36 | |
| 37 | /* Small types. */ |
| 38 | |
| 39 | /* Signed. */ |
| 40 | typedef signed char int_least8_t; |
| 41 | typedef short int int_least16_t; |
| 42 | typedef int int_least32_t; |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 43 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 44 | typedef long int int_least64_t; |
| 45 | #else |
| 46 | typedef long long int int_least64_t; |
| 47 | #endif |
| 48 | |
| 49 | /* Unsigned. */ |
| 50 | typedef unsigned char uint_least8_t; |
| 51 | typedef unsigned short int uint_least16_t; |
| 52 | typedef unsigned int uint_least32_t; |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 53 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 54 | typedef unsigned long int uint_least64_t; |
| 55 | #else |
| 56 | typedef unsigned long long int uint_least64_t; |
| 57 | #endif |
| 58 | |
| 59 | |
| 60 | /* Fast types. */ |
| 61 | |
| 62 | /* Signed. */ |
| 63 | typedef signed char int_fast8_t; |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 64 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 65 | typedef long int int_fast16_t; |
| 66 | typedef long int int_fast32_t; |
| 67 | typedef long int int_fast64_t; |
| 68 | #else |
| 69 | typedef int int_fast16_t; |
| 70 | typedef int int_fast32_t; |
| 71 | typedef long long int int_fast64_t; |
| 72 | #endif |
| 73 | |
| 74 | /* Unsigned. */ |
| 75 | typedef unsigned char uint_fast8_t; |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 76 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 77 | typedef unsigned long int uint_fast16_t; |
| 78 | typedef unsigned long int uint_fast32_t; |
| 79 | typedef unsigned long int uint_fast64_t; |
| 80 | #else |
| 81 | typedef unsigned int uint_fast16_t; |
| 82 | typedef unsigned int uint_fast32_t; |
| 83 | typedef unsigned long long int uint_fast64_t; |
| 84 | #endif |
| 85 | |
| 86 | |
| 87 | /* Types for `void *' pointers. */ |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 88 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 89 | typedef long int intptr_t; |
| 90 | typedef unsigned long int uintptr_t; |
| 91 | #else |
| 92 | typedef int intptr_t; |
| 93 | typedef unsigned int uintptr_t; |
| 94 | #endif |
| 95 | |
| 96 | |
| 97 | /* Largest integral types. */ |
Marcelo Matus | 8150278 | 2005-12-01 06:54:05 +0000 | [diff] [blame] | 98 | #if defined(SWIGWORDSIZE64) |
Marcelo Matus | da1f4a0 | 2005-11-21 20:27:24 +0000 | [diff] [blame] | 99 | typedef long int intmax_t; |
| 100 | typedef unsigned long int uintmax_t; |
| 101 | #else |
| 102 | typedef long long int intmax_t; |
| 103 | typedef unsigned long long int uintmax_t; |
| 104 | #endif |
| 105 | |
| 106 | |