mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 21:39:59 +02:00
use WEBP_INLINE for inline function declarations
removes a #define inline, objectionable in certain projects Change-Id: Iebe0ce0b25a030756304d402679ef769e5f854d1
This commit is contained in:
@ -154,7 +154,7 @@ WEBP_EXTERN(int) WebPInitDecBufferInternal(WebPDecBuffer* const, int);
|
||||
|
||||
// Initialize the structure as empty. Must be called before any other use.
|
||||
// Returns false in case of version mismatch
|
||||
static inline int WebPInitDecBuffer(WebPDecBuffer* const buffer) {
|
||||
static WEBP_INLINE int WebPInitDecBuffer(WebPDecBuffer* const buffer) {
|
||||
return WebPInitDecBufferInternal(buffer, WEBP_DECODER_ABI_VERSION);
|
||||
}
|
||||
|
||||
@ -332,9 +332,9 @@ WEBP_EXTERN(VP8StatusCode) WebPGetFeaturesInternal(
|
||||
// with information gathered from the bitstream.
|
||||
// Returns false in case of error or version mismatch.
|
||||
// In case of error, features->bitstream_status will reflect the error code.
|
||||
static inline
|
||||
VP8StatusCode WebPGetFeatures(const uint8_t* data, uint32_t data_size,
|
||||
WebPBitstreamFeatures* const features) {
|
||||
static WEBP_INLINE VP8StatusCode WebPGetFeatures(
|
||||
const uint8_t* data, uint32_t data_size,
|
||||
WebPBitstreamFeatures* const features) {
|
||||
return WebPGetFeaturesInternal(data, data_size, features,
|
||||
WEBP_DECODER_ABI_VERSION);
|
||||
}
|
||||
@ -367,7 +367,7 @@ WEBP_EXTERN(int) WebPInitDecoderConfigInternal(WebPDecoderConfig* const, int);
|
||||
// Initialize the configuration as empty. This function must always be
|
||||
// called first, unless WebPGetFeatures() is to be called.
|
||||
// Returns false in case of mismatched version.
|
||||
static inline int WebPInitDecoderConfig(WebPDecoderConfig* const config) {
|
||||
static WEBP_INLINE int WebPInitDecoderConfig(WebPDecoderConfig* const config) {
|
||||
return WebPInitDecoderConfigInternal(config, WEBP_DECODER_ABI_VERSION);
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ WEBP_EXTERN(VP8Decoder*) VP8New(void);
|
||||
// Must be called to make sure 'io' is initialized properly.
|
||||
// Returns false in case of version mismatch. Upon such failure, no other
|
||||
// decoding function should be called (VP8Decode, VP8GetHeaders, ...)
|
||||
static inline int VP8InitIo(VP8Io* const io) {
|
||||
static WEBP_INLINE int VP8InitIo(VP8Io* const io) {
|
||||
return VP8InitIoInternal(io, WEBP_DECODER_ABI_VERSION);
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ WEBP_EXTERN(int) WebPConfigInitInternal(
|
||||
// Should always be called, to initialize a fresh WebPConfig structure before
|
||||
// modification. Returns 0 in case of version mismatch. WebPConfigInit() must
|
||||
// have succeeded before using the 'config' object.
|
||||
static inline int WebPConfigInit(WebPConfig* const config) {
|
||||
static WEBP_INLINE int WebPConfigInit(WebPConfig* const config) {
|
||||
return WebPConfigInitInternal(config, WEBP_PRESET_DEFAULT, 75.f,
|
||||
WEBP_ENCODER_ABI_VERSION);
|
||||
}
|
||||
@ -101,8 +101,8 @@ static inline int WebPConfigInit(WebPConfig* const config) {
|
||||
// set of parameters (referred to by 'preset') and a given quality factor.
|
||||
// This function can be called as a replacement to WebPConfigInit(). Will
|
||||
// return 0 in case of error.
|
||||
static inline int WebPConfigPreset(WebPConfig* const config,
|
||||
WebPPreset preset, float quality) {
|
||||
static WEBP_INLINE int WebPConfigPreset(WebPConfig* const config,
|
||||
WebPPreset preset, float quality) {
|
||||
return WebPConfigInitInternal(config, preset, quality,
|
||||
WEBP_ENCODER_ABI_VERSION);
|
||||
}
|
||||
@ -209,7 +209,7 @@ WEBP_EXTERN(int) WebPPictureInitInternal(WebPPicture* const, int);
|
||||
// Should always be called, to initialize the structure. Returns 0 in case of
|
||||
// version mismatch. WebPPictureInit() must have succeeded before using the
|
||||
// 'picture' object.
|
||||
static inline int WebPPictureInit(WebPPicture* const picture) {
|
||||
static WEBP_INLINE int WebPPictureInit(WebPPicture* const picture) {
|
||||
return WebPPictureInitInternal(picture, WEBP_ENCODER_ABI_VERSION);
|
||||
}
|
||||
|
||||
|
@ -14,9 +14,11 @@
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <inttypes.h>
|
||||
#ifdef ANSI
|
||||
#define inline
|
||||
#endif /* ANSI */
|
||||
#ifdef __STRICT_ANSI__
|
||||
#define WEBP_INLINE
|
||||
#else /* __STRICT_ANSI__ */
|
||||
#define WEBP_INLINE inline
|
||||
#endif
|
||||
#else
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
@ -26,7 +28,7 @@ typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
typedef long long int int64_t;
|
||||
#define inline __forceinline
|
||||
#define WEBP_INLINE __forceinline
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#ifndef WEBP_EXTERN
|
||||
|
Reference in New Issue
Block a user