From: fennecdjay Date: Tue, 25 Jun 2019 01:35:58 +0000 (+0200) Subject: :art: Osx Compat (use unsigned short over ushort X-Git-Tag: nightly~2385^2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=refs%2Fpull%2F135%2Fhead;p=gwion.git :art: Osx Compat (use unsigned short over ushort --- diff --git a/src/vm/vm.c b/src/vm/vm.c index 522f60e5..4ff220d5 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -152,7 +152,7 @@ ANN static inline VM_Shred init_fork_shred(const VM_Shred shred, const VM_Code c #define ADISPATCH() { ADVANCE(); SDISPATCH(); } -#define PC ((*(ushort*)(byte + 2)) + 1) +#define PC ((*(unsigned short*)(byte + 2)) + 1) #define OP(t, sz, op, ...) \ reg -= sz;\ diff --git a/src/vm/vm_code.c b/src/vm/vm_code.c index 264dff3d..1f3e1c9f 100644 --- a/src/vm/vm_code.c +++ b/src/vm/vm_code.c @@ -57,7 +57,7 @@ ANN static m_bit* tobytecode(MemPool p, const VM_Code code) { *(Instr*)(ptr + (i*BYTECODE_SZ) + SZ_INT) = instr; *(f_instr*)(ptr + (i*BYTECODE_SZ) + SZ_INT*2) = instr->execute; } - *(ushort*)(ptr + (i*BYTECODE_SZ) + 2) = i; + *(unsigned short*)(ptr + (i*BYTECODE_SZ) + 2) = i; } return ptr; }