simplify WEBP_EXTERN macro

including the type in the macro doesn't bring much benefit to ordering,
current platforms work with a prefix, this would be insufficient if the
attribute needed to follow the function prototype. this form makes it
easier to override on the command line.

BUG=webp:355

Change-Id: Iba41ec0bb319403054be0e899c4cc472dd932fd9
This commit is contained in:
James Zern
2017-07-31 18:12:11 -07:00
parent 6878d42720
commit 8e42ba4c80
11 changed files with 181 additions and 181 deletions

View File

@ -78,11 +78,11 @@ typedef struct {
// decoding takes place. The contents of the interface struct are copied, it
// is safe to free the corresponding memory after this call. This function is
// not thread-safe. Return false in case of invalid pointer or methods.
WEBP_EXTERN(int) WebPSetWorkerInterface(
WEBP_EXTERN int WebPSetWorkerInterface(
const WebPWorkerInterface* const winterface);
// Retrieve the currently set thread worker interface.
WEBP_EXTERN(const WebPWorkerInterface*) WebPGetWorkerInterface(void);
WEBP_EXTERN const WebPWorkerInterface* WebPGetWorkerInterface(void);
//------------------------------------------------------------------------------

View File

@ -48,13 +48,13 @@ extern "C" {
// somewhere (like: malloc(num_pixels * sizeof(*something))). That's why this
// safe malloc() borrows the signature from calloc(), pointing at the dangerous
// underlying multiply involved.
WEBP_EXTERN(void*) WebPSafeMalloc(uint64_t nmemb, size_t size);
WEBP_EXTERN void* WebPSafeMalloc(uint64_t nmemb, size_t size);
// Note that WebPSafeCalloc() expects the second argument type to be 'size_t'
// in order to favor the "calloc(num_foo, sizeof(foo))" pattern.
WEBP_EXTERN(void*) WebPSafeCalloc(uint64_t nmemb, size_t size);
WEBP_EXTERN void* WebPSafeCalloc(uint64_t nmemb, size_t size);
// Companion deallocation function to the above allocations.
WEBP_EXTERN(void) WebPSafeFree(void* const ptr);
WEBP_EXTERN void WebPSafeFree(void* const ptr);
//------------------------------------------------------------------------------
// Alignment
@ -147,14 +147,14 @@ static WEBP_INLINE int BitsLog2Floor(uint32_t n) { return WebPLog2FloorC(n); }
struct WebPPicture;
// Copy width x height pixels from 'src' to 'dst' honoring the strides.
WEBP_EXTERN(void) WebPCopyPlane(const uint8_t* src, int src_stride,
uint8_t* dst, int dst_stride,
int width, int height);
WEBP_EXTERN void WebPCopyPlane(const uint8_t* src, int src_stride,
uint8_t* dst, int dst_stride,
int width, int height);
// Copy ARGB pixels from 'src' to 'dst' honoring strides. 'src' and 'dst' are
// assumed to be already allocated and using ARGB data.
WEBP_EXTERN(void) WebPCopyPixels(const struct WebPPicture* const src,
struct WebPPicture* const dst);
WEBP_EXTERN void WebPCopyPixels(const struct WebPPicture* const src,
struct WebPPicture* const dst);
//------------------------------------------------------------------------------
// Unique colors.
@ -166,8 +166,8 @@ WEBP_EXTERN(void) WebPCopyPixels(const struct WebPPicture* const src,
// MAX_PALETTE_SIZE, also outputs the actual unique colors into 'palette'.
// Note: 'palette' is assumed to be an array already allocated with at least
// MAX_PALETTE_SIZE elements.
WEBP_EXTERN(int) WebPGetColorPalette(const struct WebPPicture* const pic,
uint32_t* const palette);
WEBP_EXTERN int WebPGetColorPalette(const struct WebPPicture* const pic,
uint32_t* const palette);
//------------------------------------------------------------------------------