~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH hare] types::c: s/SHORT/SHRT/g

Details
Message ID
<20240907204341.21371-1-sebastian@sebsite.pw>
DKIM signature
pass
Download raw message
Patch: +6 -6
This is consistent with the macro names in limits.h. All other constants
mimick the limits.h names, so these should as well.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 types/c/arch+aarch64.ha | 4 ++--
 types/c/arch+riscv64.ha | 4 ++--
 types/c/arch+x86_64.ha  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/types/c/arch+aarch64.ha b/types/c/arch+aarch64.ha
index 1c2c9547..eaaf3733 100644
--- a/types/c/arch+aarch64.ha
+++ b/types/c/arch+aarch64.ha
@@ -16,10 +16,10 @@ export def CHAR_MAX: char = UCHAR_MAX;
export type short = i16;

// Minimum value which can be stored in a [[short]] type.
export def SHORT_MIN: short = types::I16_MIN;
export def SHRT_MIN: short = types::I16_MIN;

// Maximum value which can be stored in a [[short]] type.
export def SHORT_MAX: short = types::I16_MAX;
export def SHRT_MAX: short = types::I16_MAX;

// Integer type compatible with `unsigned short`, as specified by ISO/IEC 9899.
export type ushort = u16;
diff --git a/types/c/arch+riscv64.ha b/types/c/arch+riscv64.ha
index 1c2c9547..eaaf3733 100644
--- a/types/c/arch+riscv64.ha
+++ b/types/c/arch+riscv64.ha
@@ -16,10 +16,10 @@ export def CHAR_MAX: char = UCHAR_MAX;
export type short = i16;

// Minimum value which can be stored in a [[short]] type.
export def SHORT_MIN: short = types::I16_MIN;
export def SHRT_MIN: short = types::I16_MIN;

// Maximum value which can be stored in a [[short]] type.
export def SHORT_MAX: short = types::I16_MAX;
export def SHRT_MAX: short = types::I16_MAX;

// Integer type compatible with `unsigned short`, as specified by ISO/IEC 9899.
export type ushort = u16;
diff --git a/types/c/arch+x86_64.ha b/types/c/arch+x86_64.ha
index f770468b..60e68d8f 100644
--- a/types/c/arch+x86_64.ha
+++ b/types/c/arch+x86_64.ha
@@ -16,10 +16,10 @@ export def CHAR_MAX: char = SCHAR_MAX;
export type short = i16;

// Minimum value which can be stored in a [[short]] type.
export def SHORT_MIN: short = types::I16_MIN;
export def SHRT_MIN: short = types::I16_MIN;

// Maximum value which can be stored in a [[short]] type.
export def SHORT_MAX: short = types::I16_MAX;
export def SHRT_MAX: short = types::I16_MAX;

// Integer type compatible with `unsigned short`, as specified by ISO/IEC 9899.
export type ushort = u16;
-- 
2.45.2
Lorenz (xha) <me@xha.li>
Details
Message ID
<ZuBopoUIsxzIBkGP@xha.li>
In-Reply-To
<20240907204341.21371-1-sebastian@sebsite.pw> (view parent)
DKIM signature
pass
Download raw message
On Sat, Sep 07, 2024 at 04:42:15PM -0400, Sebastian wrote:
> This is consistent with the macro names in limits.h. All other constants
> mimick the limits.h names, so these should as well.

i want to talk to the person who thought that SHRT is better than SHORT.
didn't knew that was a thing lmao

this looks good to me, although i would mention the breaking change in the
commit message

> Signed-off-by: Sebastian <sebastian@sebsite.pw>
> ---
>  types/c/arch+aarch64.ha | 4 ++--
>  types/c/arch+riscv64.ha | 4 ++--
>  types/c/arch+x86_64.ha  | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/types/c/arch+aarch64.ha b/types/c/arch+aarch64.ha
> index 1c2c9547..eaaf3733 100644
> --- a/types/c/arch+aarch64.ha
> +++ b/types/c/arch+aarch64.ha
> @@ -16,10 +16,10 @@ export def CHAR_MAX: char = UCHAR_MAX;
>  export type short = i16;
>  
>  // Minimum value which can be stored in a [[short]] type.
> -export def SHORT_MIN: short = types::I16_MIN;
> +export def SHRT_MIN: short = types::I16_MIN;
>  
>  // Maximum value which can be stored in a [[short]] type.
> -export def SHORT_MAX: short = types::I16_MAX;
> +export def SHRT_MAX: short = types::I16_MAX;
>  
>  // Integer type compatible with `unsigned short`, as specified by ISO/IEC 9899.
>  export type ushort = u16;
> diff --git a/types/c/arch+riscv64.ha b/types/c/arch+riscv64.ha
> index 1c2c9547..eaaf3733 100644
> --- a/types/c/arch+riscv64.ha
> +++ b/types/c/arch+riscv64.ha
> @@ -16,10 +16,10 @@ export def CHAR_MAX: char = UCHAR_MAX;
>  export type short = i16;
>  
>  // Minimum value which can be stored in a [[short]] type.
> -export def SHORT_MIN: short = types::I16_MIN;
> +export def SHRT_MIN: short = types::I16_MIN;
>  
>  // Maximum value which can be stored in a [[short]] type.
> -export def SHORT_MAX: short = types::I16_MAX;
> +export def SHRT_MAX: short = types::I16_MAX;
>  
>  // Integer type compatible with `unsigned short`, as specified by ISO/IEC 9899.
>  export type ushort = u16;
> diff --git a/types/c/arch+x86_64.ha b/types/c/arch+x86_64.ha
> index f770468b..60e68d8f 100644
> --- a/types/c/arch+x86_64.ha
> +++ b/types/c/arch+x86_64.ha
> @@ -16,10 +16,10 @@ export def CHAR_MAX: char = SCHAR_MAX;
>  export type short = i16;
>  
>  // Minimum value which can be stored in a [[short]] type.
> -export def SHORT_MIN: short = types::I16_MIN;
> +export def SHRT_MIN: short = types::I16_MIN;
>  
>  // Maximum value which can be stored in a [[short]] type.
> -export def SHORT_MAX: short = types::I16_MAX;
> +export def SHRT_MAX: short = types::I16_MAX;
>  
>  // Integer type compatible with `unsigned short`, as specified by ISO/IEC 9899.
>  export type ushort = u16;
> -- 
> 2.45.2
> 
Details
Message ID
<D441XXSZYLY9.2WJQL1OLWU97G@d2evs.net>
In-Reply-To
<20240907204341.21371-1-sebastian@sebsite.pw> (view parent)
DKIM signature
pass
Download raw message
thanks!

to git@git.sr.ht:~sircmpwn/hare
  73befbb9..df6d453e  master -> master
Reply to thread Export thread (mbox)