From a42b6c5cebb2985fc8a72eeba9dda044605d7bb0 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sat, 6 Feb 2021 14:44:17 +0100 Subject: [PATCH] [Maintenance] Define `(u)int16_t` as `int` rather than `short` Turbo C++ 4.0J considers them different types internally, even though they have the same size and signedness. Using `int` allows us to more correctly redeclare a bunch of functions that originally use `(unsigned) int` parameters as `(u)int16_t`. Part of P0134, funded by [Anonymous]. --- platform.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform.h b/platform.h index 29efeb77..da2024ed 100644 --- a/platform.h +++ b/platform.h @@ -13,10 +13,10 @@ typedef int bool16; # define false 0 # define true 1 typedef char int8_t; -typedef short int16_t; +typedef int int16_t; typedef long int32_t; typedef unsigned char uint8_t; -typedef unsigned short uint16_t; +typedef unsigned int uint16_t; typedef unsigned long uint32_t; // Generic callback function types. Note the difference between function