From a871de025539e787c1dc4678ed8317579704757b Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Wed, 9 Mar 2011 21:25:53 -0800 Subject: [PATCH] add missing extern "C" Change-Id: Ie325dbbb1c1f0f55a3f207a32c67139f59c03bf2 --- src/dec/vp8.c | 10 ++++++++++ src/enc/config.c | 8 ++++++++ src/enc/filter.c | 8 ++++++++ 3 files changed, 26 insertions(+) diff --git a/src/dec/vp8.c b/src/dec/vp8.c index c17f575c..9f417ac8 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -12,6 +12,10 @@ #include #include "vp8i.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + //----------------------------------------------------------------------------- // VP8Decoder @@ -658,3 +662,9 @@ void VP8Clear(VP8Decoder* const dec) { memset(&dec->br_, 0, sizeof(dec->br_)); dec->ready_ = 0; } + +//----------------------------------------------------------------------------- + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif diff --git a/src/enc/config.c b/src/enc/config.c index 6a4cd1f9..86ef5ce2 100644 --- a/src/enc/config.c +++ b/src/enc/config.c @@ -12,6 +12,10 @@ #include #include "webp/encode.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + //----------------------------------------------------------------------------- // WebPConfig //----------------------------------------------------------------------------- @@ -105,3 +109,7 @@ int WebPValidateConfig(const WebPConfig* const config) { } //----------------------------------------------------------------------------- + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif diff --git a/src/enc/filter.c b/src/enc/filter.c index cf845e0d..5a243b17 100644 --- a/src/enc/filter.c +++ b/src/enc/filter.c @@ -12,6 +12,10 @@ #include #include "vp8enci.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + // NOTE: clip1, tables and InitTables are repeated entries of dsp.c static uint8_t abs0[255 + 255 + 1]; // abs(i) static uint8_t abs1[255 + 255 + 1]; // abs(i)>>1 @@ -368,3 +372,7 @@ void VP8AdjustFilterStrength(VP8EncIterator* const it) { enc->dqm_[s].fstrength_ = best_level; } } + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif