1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.10
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 #define SWIGMODULE libwebp
11 /* -----------------------------------------------------------------------------
12  *  This section contains generic SWIG labels for method/variable
13  *  declarations/attributes, and other compiler dependent labels.
14  * ----------------------------------------------------------------------------- */
15 
16 /* template workaround for compilers that cannot correctly implement the C++ standard */
17 #ifndef SWIGTEMPLATEDISAMBIGUATOR
18 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
19 #  define SWIGTEMPLATEDISAMBIGUATOR template
20 # elif defined(__HP_aCC)
21 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
22 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
23 #  define SWIGTEMPLATEDISAMBIGUATOR template
24 # else
25 #  define SWIGTEMPLATEDISAMBIGUATOR
26 # endif
27 #endif
28 
29 /* inline attribute */
30 #ifndef SWIGINLINE
31 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
32 #   define SWIGINLINE inline
33 # else
34 #   define SWIGINLINE
35 # endif
36 #endif
37 
38 /* attribute recognised by some compilers to avoid 'unused' warnings */
39 #ifndef SWIGUNUSED
40 # if defined(__GNUC__)
41 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
42 #     define SWIGUNUSED __attribute__ ((__unused__))
43 #   else
44 #     define SWIGUNUSED
45 #   endif
46 # elif defined(__ICC)
47 #   define SWIGUNUSED __attribute__ ((__unused__))
48 # else
49 #   define SWIGUNUSED
50 # endif
51 #endif
52 
53 #ifndef SWIG_MSC_UNSUPPRESS_4505
54 # if defined(_MSC_VER)
55 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
56 # endif
57 #endif
58 
59 #ifndef SWIGUNUSEDPARM
60 # ifdef __cplusplus
61 #   define SWIGUNUSEDPARM(p)
62 # else
63 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
64 # endif
65 #endif
66 
67 /* internal SWIG method */
68 #ifndef SWIGINTERN
69 # define SWIGINTERN static SWIGUNUSED
70 #endif
71 
72 /* internal inline SWIG method */
73 #ifndef SWIGINTERNINLINE
74 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
75 #endif
76 
77 /* exporting methods */
78 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
79 #  ifndef GCC_HASCLASSVISIBILITY
80 #    define GCC_HASCLASSVISIBILITY
81 #  endif
82 #endif
83 
84 #ifndef SWIGEXPORT
85 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
86 #   if defined(STATIC_LINKED)
87 #     define SWIGEXPORT
88 #   else
89 #     define SWIGEXPORT __declspec(dllexport)
90 #   endif
91 # else
92 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
93 #     define SWIGEXPORT __attribute__ ((visibility("default")))
94 #   else
95 #     define SWIGEXPORT
96 #   endif
97 # endif
98 #endif
99 
100 /* calling conventions for Windows */
101 #ifndef SWIGSTDCALL
102 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
103 #   define SWIGSTDCALL __stdcall
104 # else
105 #   define SWIGSTDCALL
106 # endif
107 #endif
108 
109 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
110 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
111 # define _CRT_SECURE_NO_DEPRECATE
112 #endif
113 
114 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
115 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
116 # define _SCL_SECURE_NO_DEPRECATE
117 #endif
118 
119 
120 
121 #include <stddef.h>
122 #include <stdio.h>
123 #include <stdlib.h>
124 #include <string.h>
125 #include <sys/types.h>
126 
127 
128 
129 typedef long long intgo;
130 typedef unsigned long long uintgo;
131 
132 
133 
134 typedef struct { char *p; intgo n; } _gostring_;
135 typedef struct { void* array; intgo len; intgo cap; } _goslice_;
136 
137 
138 
139 
140 #define swiggo_size_assert_eq(x, y, name) typedef char name[(x-y)*(x-y)*-2+1];
141 #define swiggo_size_assert(t, n) swiggo_size_assert_eq(sizeof(t), n, swiggo_sizeof_##t##_is_not_##n)
142 
143 swiggo_size_assert(char, 1)
144 swiggo_size_assert(short, 2)
145 swiggo_size_assert(int, 4)
146 typedef long long swiggo_long_long;
147 swiggo_size_assert(swiggo_long_long, 8)
148 swiggo_size_assert(float, 4)
149 swiggo_size_assert(double, 8)
150 
151 #ifdef __cplusplus
152 extern "C" {
153 #endif
154 extern void crosscall2(void (*fn)(void *, int), void *, int);
155 extern void _cgo_allocate(void *, int);
156 extern void _cgo_panic(void *, int);
157 #ifdef __cplusplus
158 }
159 #endif
160 
_swig_goallocate(size_t len)161 static void *_swig_goallocate(size_t len) {
162   struct {
163     size_t len;
164     void *ret;
165   } a;
166   a.len = len;
167   crosscall2(_cgo_allocate, &a, (int) sizeof a);
168   return a.ret;
169 }
170 
_swig_gopanic(const char * p)171 static void _swig_gopanic(const char *p) {
172   struct {
173     const char *p;
174   } a;
175   a.p = p;
176   crosscall2(_cgo_panic, &a, (int) sizeof a);
177 }
178 
179 
180 
181 
_swig_makegostring(const char * p,size_t l)182 static _gostring_ _swig_makegostring(const char *p, size_t l) {
183   _gostring_ ret;
184   ret.p = (char*)_swig_goallocate(l + 1);
185   memcpy(ret.p, p, l);
186   ret.n = l;
187   return ret;
188 }
189 
190 #define SWIG_contract_assert(expr, msg) \
191   if (!(expr)) { _swig_gopanic(msg); } else
192 
193 
194 #define SWIG_exception(code, msg) _swig_gopanic(msg)
195 
196 
197 #include "webp/decode.h"
198 #include "webp/encode.h"
199 
200 #ifdef __cplusplus
201 extern "C" {
202 #endif
203 
204 void
_wrap_WebPGetDecoderVersion(void * swig_v)205 _wrap_WebPGetDecoderVersion(void *swig_v)
206 {
207   int result;
208 
209   struct swigargs {
210     long : 0;
211     intgo result;
212   } *swig_a = (struct swigargs *) swig_v;
213 
214 
215   result = (int)WebPGetDecoderVersion();
216   swig_a->result = result;
217 }
218 
219 
220 void
_wrap_wrapped_WebPGetInfo(void * swig_v)221 _wrap_wrapped_WebPGetInfo(void *swig_v)
222 {
223   uint8_t *arg1 = (uint8_t *) 0 ;
224   size_t arg2 ;
225   int *arg3 = (int *) 0 ;
226   int *arg4 = (int *) 0 ;
227   int temp3 ;
228   int temp4 ;
229   int result;
230 
231   struct swigargs {
232     _gostring_ arg1;
233     _goslice_ arg3;
234     _goslice_ arg4;
235     long : 0;
236     intgo result;
237   } *swig_a = (struct swigargs *) swig_v;
238 
239 
240   arg1 = (uint8_t *)swig_a->arg1.p;
241   arg2 = (size_t)swig_a->arg1.n;
242 
243   {
244     if (swig_a->arg3.len == 0) {
245       _swig_gopanic("array must contain at least 1 element");
246     }
247     arg3 = &temp3;
248   }
249   {
250     if (swig_a->arg4.len == 0) {
251       _swig_gopanic("array must contain at least 1 element");
252     }
253     arg4 = &temp4;
254   }
255 
256   result = (int)WebPGetInfo((uint8_t const *)arg1,arg2,arg3,arg4);
257   swig_a->result = result;
258   {
259     int* a = (int *) swig_a->arg3.array;
260     a[0] = temp3;
261   }
262   {
263     int* a = (int *) swig_a->arg4.array;
264     a[0] = temp4;
265   }
266 
267 
268 }
269 
270 
271 #ifdef __cplusplus
272 }
273 #endif
274 
275