Browse Source

use static inline instead of extern inline

master
Felix von Leitner 6 years ago
parent
commit
8cf357cc70
  1. 12
      safemult.h

12
safemult.h

@ -15,14 +15,14 @@ extern "C" {
/* for historical reasons, the mult interface uses 0 for failure and 1
* for success, while the builtins (and my own addition and
* subtraction routines in rangecheck.h) do it the other way around. */
extern inline int umult16(uint16 a,uint16 b,uint16* c) { return !__builtin_mul_overflow(a,b,c); }
extern inline int imult16( int16 a, int16 b, int16* c) { return !__builtin_mul_overflow(a,b,c); }
static inline int umult16(uint16 a,uint16 b,uint16* c) { return !__builtin_mul_overflow(a,b,c); }
static inline int imult16( int16 a, int16 b, int16* c) { return !__builtin_mul_overflow(a,b,c); }
extern inline int umult32(uint32 a,uint32 b,uint32* c) { return !__builtin_mul_overflow(a,b,c); }
extern inline int imult32( int32 a, int32 b, int32* c) { return !__builtin_mul_overflow(a,b,c); }
static inline int umult32(uint32 a,uint32 b,uint32* c) { return !__builtin_mul_overflow(a,b,c); }
static inline int imult32( int32 a, int32 b, int32* c) { return !__builtin_mul_overflow(a,b,c); }
extern inline int umult64(uint64 a,uint64 b,uint64* c) { return !__builtin_mul_overflow(a,b,c); }
extern inline int imult64( int64 a, int64 b, int64* c) { return !__builtin_mul_overflow(a,b,c); }
static inline int umult64(uint64 a,uint64 b,uint64* c) { return !__builtin_mul_overflow(a,b,c); }
static inline int imult64( int64 a, int64 b, int64* c) { return !__builtin_mul_overflow(a,b,c); }
#else

Loading…
Cancel
Save