ffi-swig-generator 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.hg/branch +0 -0
  2. data/.hg/branch.cache +0 -0
  3. data/.hg/dirstate +0 -0
  4. data/.hg/hgrc +0 -0
  5. data/.hg/requires +0 -0
  6. data/.hg/store/00changelog.i +0 -0
  7. data/.hg/store/00manifest.i +0 -0
  8. data/.hg/store/data/.hgtags.i +0 -0
  9. data/.hg/store/data/_history.txt.i +0 -0
  10. data/.hg/store/data/_rakefile.i +0 -0
  11. data/.hg/store/data/bin/ffi-gen.i +0 -0
  12. data/.hg/store/data/examples/_rakefile.i +0 -0
  13. data/.hg/store/data/features/support/templates.rb.i +0 -0
  14. data/.hg/store/data/lib/ffi-swig-generator.rb.i +0 -0
  15. data/.hg/store/data/lib/generator/constant.rb.i +0 -0
  16. data/.hg/store/data/lib/generator/enum.rb.i +0 -0
  17. data/.hg/store/data/lib/generator/function.rb.i +0 -0
  18. data/.hg/store/data/lib/generator/struct.rb.i +0 -0
  19. data/.hg/store/data/lib/generator/type.rb.i +0 -0
  20. data/.hg/store/data/spec/spec__helper.rb.i +0 -0
  21. data/.hg/store/undo +0 -0
  22. data/.hg/undo.branch +0 -0
  23. data/.hg/undo.dirstate +0 -0
  24. data/.hgtags +1 -0
  25. data/History.txt +5 -0
  26. data/Rakefile +1 -1
  27. data/bin/ffi-gen +2 -2
  28. data/examples/Rakefile +2 -1
  29. data/examples/generated/libc_wrap.rb +18 -0
  30. data/examples/generated/libc_wrap.xml +597 -0
  31. data/examples/generated/wiiuse_wrap.rb +322 -0
  32. data/examples/generated/wiiuse_wrap.xml +9025 -0
  33. data/features/support/templates.rb +9 -7
  34. data/lib/ffi-swig-generator.rb +11 -49
  35. data/lib/generator/constant.rb +0 -1
  36. data/lib/generator/enum.rb +0 -1
  37. data/lib/generator/function.rb +0 -1
  38. data/lib/generator/struct.rb +1 -2
  39. data/lib/generator/type.rb +0 -1
  40. data/spec/spec_helper.rb +3 -2
  41. metadata +8 -14
data/.hg/branch CHANGED
File without changes
File without changes
Binary file
data/.hg/hgrc CHANGED
File without changes
File without changes
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
File without changes
Binary file
data/.hgtags CHANGED
@@ -1,2 +1,3 @@
1
1
  927f7115acbb93135c01c2c6dc03afea3b5070e3 0_2_1
2
2
  3bc08935a011c28564b5279366284c278eb70c96 0_3_0
3
+ 0a21cc9f1915851057b0525f4705bbcbc190bffb 0_3_1
@@ -1,3 +1,8 @@
1
+ == 0.3.2 / 2009-06-17
2
+
3
+ * Minor enhancements
4
+ * Rework requires and cleanup.
5
+
1
6
  == 0.3.1 / 2009-06-16
2
7
 
3
8
  * Minor enhancements
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ PROJ.name = 'ffi-swig-generator'
22
22
  PROJ.authors = 'Andrea Fazzi'
23
23
  PROJ.email = 'andrea.fazzi@alcacoop.it'
24
24
  PROJ.url = 'http://kenai.com/projects/ruby-ffi/sources/swig-generator/show'
25
- PROJ.version = FFI::Generator::VERSION
25
+ PROJ.version = '0.3.2'
26
26
  PROJ.rubyforge.name = 'ffi-swig-gen'
27
27
 
28
28
  PROJ.readme_file = 'README.rdoc'
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require File.expand_path(
4
- File.join(File.dirname(__FILE__), %w[.. lib ffi-swig-generator]))
3
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
4
+ require 'ffi-swig-generator'
5
5
 
6
6
  FFI::Generator::Application.run
7
7
 
@@ -1,4 +1,5 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib ffi-swig-generator]))
1
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
2
+ require 'ffi-swig-generator'
2
3
 
3
4
  FFI::Generator::Task.new do |task|
4
5
  task.input_fn = 'interfaces/*.i'
@@ -0,0 +1,18 @@
1
+
2
+ require 'rubygems'
3
+ require 'ffi'
4
+
5
+ module LibC
6
+ extend FFI::Library
7
+ class Timeval < FFI::Struct
8
+ layout(
9
+ :tv_sec, :ulong,
10
+ :tv_usec, :ulong
11
+ )
12
+ end
13
+ attach_function :strlen, [ :string ], :uint
14
+ attach_function :strcat, [ :string, :string ], :string
15
+ attach_function :strcmp, [ :string, :string ], :int
16
+ attach_function :gettimeofday, [ :pointer, :pointer ], :int
17
+
18
+ end
@@ -0,0 +1,597 @@
1
+ <?xml version="1.0" ?>
2
+ <top id="1" addr="b7de29e8" >
3
+ <attributelist id="2" addr="b7de29e8" >
4
+ <attribute name="outfile" value="interfaces/libc_wrap.c" id="3" addr="b7debf38" />
5
+ <attribute name="name" value="libc" id="4" addr="b7debf38" />
6
+ <attribute name="module" value="libc" id="5" addr="b7deac08" />
7
+ <attribute name="inputfile" value="interfaces/libc.i" id="6" addr="b7debf38" />
8
+ <attribute name="classes" value="b7deb138" id="7" addr="b7deb138" />
9
+ <attribute name="infile" value="interfaces/libc.i" id="8" addr="b7debf38" />
10
+ <attribute name="outfile_h" value="interfaces/libc_wrap.h" id="9" addr="b7debf38" />
11
+ </attributelist >
12
+
13
+ <include id="10" addr="b7de9aa8" >
14
+ <attributelist id="11" addr="b7de9aa8" >
15
+ <attribute name="name" value="/usr/local/share/swig/1.3.40//swig.swg" id="12" addr="b7debf38" />
16
+ </attributelist >
17
+
18
+ <include id="13" addr="b7de9ad8" >
19
+ <attributelist id="14" addr="b7de9ad8" >
20
+ <attribute name="name" value="/usr/local/share/swig/1.3.40//swigwarnings.swg" id="15" addr="b7debf38" />
21
+ </attributelist >
22
+
23
+ <include id="16" addr="b7de9b08" >
24
+ <attributelist id="17" addr="b7de9b08" >
25
+ <attribute name="name" value="/usr/local/share/swig/1.3.40//swigwarn.swg" id="18" addr="b7debf38" />
26
+ </attributelist >
27
+
28
+ </include >
29
+ </include >
30
+ <typemap id="19" addr="b7de9c78" >
31
+ <attributelist id="20" addr="b7de9c78" >
32
+ <attribute name="code" value="free($1);" id="21" addr="b7debf38" />
33
+ <attribute name="method" value="newfree" id="22" addr="b7debf38" />
34
+ </attributelist >
35
+
36
+ <typemapitem id="23" addr="b7de9be8" >
37
+ <attributelist id="24" addr="b7de9be8" >
38
+ <parmlist id="25" addr="b7de9c08" >
39
+ <parm id="26">
40
+ <attributelist id="27" addr="b7de9c08" >
41
+ <attribute name="type" value="p.char" id="28" addr="b7debf38" />
42
+ </attributelist >
43
+ </parm >
44
+ </parmlist >
45
+ </attributelist >
46
+
47
+ </typemapitem >
48
+ </typemap >
49
+ <typemap id="29" addr="b7de9d88" >
50
+ <attributelist id="30" addr="b7de9d88" >
51
+ <attribute name="code" value="{&#10; if ($1) free((char *)$1);&#10; if ($input) {&#10; $1 = ($1_type) malloc(strlen((const char *)$input)+1);&#10; strcpy((char *)$1, (const char *)$input);&#10; } else {&#10; $1 = 0;&#10; }&#10;}" id="31" addr="b7debf38" />
52
+ <attribute name="method" value="memberin" id="32" addr="b7debf38" />
53
+ </attributelist >
54
+
55
+ <typemapitem id="33" addr="b7de9d28" >
56
+ <attributelist id="34" addr="b7de9d28" >
57
+ <parmlist id="35" addr="b7de9d48" >
58
+ <parm id="36">
59
+ <attributelist id="37" addr="b7de9d48" >
60
+ <attribute name="type" value="p.char" id="38" addr="b7debf38" />
61
+ </attributelist >
62
+ </parm >
63
+ </parmlist >
64
+ </attributelist >
65
+
66
+ </typemapitem >
67
+ </typemap >
68
+ <typemap id="39" addr="b7de9eb8" >
69
+ <attributelist id="40" addr="b7de9eb8" >
70
+ <kwargs id="41" addr="b7de9db8" >
71
+ <attributelist id="42" addr="b7de9db8" >
72
+ <attribute name="name" value="warning" id="43" addr="b7debf38" />
73
+ <attribute name="value" value="451:Setting a const char * variable may leak memory." id="44" addr="b7debf38" />
74
+ </attributelist >
75
+ <kwargssitem id="45" addr="b7de9dc8" >
76
+ <attributelist id="46" addr="b7de9dc8" >
77
+ </attributelist >
78
+ </kwargssitem >
79
+ <kwargssitem id="47" addr="b7de9de8" >
80
+ <attributelist id="48" addr="b7de9de8" >
81
+ </attributelist >
82
+ </kwargssitem >
83
+ </kwargs >
84
+ <attribute name="code" value="{&#10; if ($input) {&#10; $1 = ($1_type) malloc(strlen((const char *)$input)+1);&#10; strcpy((char *)$1, (const char *)$input);&#10; } else {&#10; $1 = 0;&#10; }&#10;}" id="49" addr="b7debf38" />
85
+ <attribute name="method" value="memberin" id="50" addr="b7debf38" />
86
+ </attributelist >
87
+
88
+ <typemapitem id="51" addr="b7de9e58" >
89
+ <attributelist id="52" addr="b7de9e58" >
90
+ <parmlist id="53" addr="b7de9e78" >
91
+ <parm id="54">
92
+ <attributelist id="55" addr="b7de9e78" >
93
+ <attribute name="type" value="p.q(const).char" id="56" addr="b7debf38" />
94
+ </attributelist >
95
+ </parm >
96
+ </parmlist >
97
+ </attributelist >
98
+
99
+ </typemapitem >
100
+ </typemap >
101
+ <typemap id="57" addr="b7de9fa8" >
102
+ <attributelist id="58" addr="b7de9fa8" >
103
+ <attribute name="code" value="{&#10; if ($1) free((char *)$1);&#10; if ($input) {&#10; $1 = ($1_type) malloc(strlen((const char *)$input)+1);&#10; strcpy((char *)$1, (const char *)$input);&#10; } else {&#10; $1 = 0;&#10; }&#10;}" id="59" addr="b7debf38" />
104
+ <attribute name="method" value="globalin" id="60" addr="b7debf38" />
105
+ </attributelist >
106
+
107
+ <typemapitem id="61" addr="b7de9f48" >
108
+ <attributelist id="62" addr="b7de9f48" >
109
+ <parmlist id="63" addr="b7de9f68" >
110
+ <parm id="64">
111
+ <attributelist id="65" addr="b7de9f68" >
112
+ <attribute name="type" value="p.char" id="66" addr="b7debf38" />
113
+ </attributelist >
114
+ </parm >
115
+ </parmlist >
116
+ </attributelist >
117
+
118
+ </typemapitem >
119
+ </typemap >
120
+ <typemap id="67" addr="b7dea0c8" >
121
+ <attributelist id="68" addr="b7dea0c8" >
122
+ <kwargs id="69" addr="b7de9fd8" >
123
+ <attributelist id="70" addr="b7de9fd8" >
124
+ <attribute name="name" value="warning" id="71" addr="b7debf38" />
125
+ <attribute name="value" value="451:Setting a const char * variable may leak memory." id="72" addr="b7debf38" />
126
+ </attributelist >
127
+ <kwargssitem id="73" addr="b7de9fe8" >
128
+ <attributelist id="74" addr="b7de9fe8" >
129
+ </attributelist >
130
+ </kwargssitem >
131
+ <kwargssitem id="75" addr="b7de9ff8" >
132
+ <attributelist id="76" addr="b7de9ff8" >
133
+ </attributelist >
134
+ </kwargssitem >
135
+ </kwargs >
136
+ <attribute name="code" value="{&#10; if ($input) {&#10; $1 = ($1_type) malloc(strlen((const char *)$input)+1);&#10; strcpy((char *)$1, (const char *)$input);&#10; } else {&#10; $1 = 0;&#10; }&#10;}" id="77" addr="b7debf38" />
137
+ <attribute name="method" value="globalin" id="78" addr="b7debf38" />
138
+ </attributelist >
139
+
140
+ <typemapitem id="79" addr="b7dea068" >
141
+ <attributelist id="80" addr="b7dea068" >
142
+ <parmlist id="81" addr="b7dea088" >
143
+ <parm id="82">
144
+ <attributelist id="83" addr="b7dea088" >
145
+ <attribute name="type" value="p.q(const).char" id="84" addr="b7debf38" />
146
+ </attributelist >
147
+ </parm >
148
+ </parmlist >
149
+ </attributelist >
150
+
151
+ </typemapitem >
152
+ </typemap >
153
+ <typemap id="85" addr="b7dea1d8" >
154
+ <attributelist id="86" addr="b7dea1d8" >
155
+ <attribute name="code" value="{&#10; if($input) {&#10; strncpy((char*)$1, (const char *)$input, $1_dim0-1);&#10; $1[$1_dim0-1] = 0;&#10; } else {&#10; $1[0] = 0;&#10; }&#10;}" id="87" addr="b7debf38" />
156
+ <attribute name="method" value="memberin" id="88" addr="b7debf38" />
157
+ </attributelist >
158
+
159
+ <typemapitem id="89" addr="b7dea178" >
160
+ <attributelist id="90" addr="b7dea178" >
161
+ <parmlist id="91" addr="b7dea198" >
162
+ <parm id="92">
163
+ <attributelist id="93" addr="b7dea198" >
164
+ <attribute name="type" value="a(ANY).char" id="94" addr="b7debf38" />
165
+ </attributelist >
166
+ </parm >
167
+ </parmlist >
168
+ </attributelist >
169
+
170
+ </typemapitem >
171
+ </typemap >
172
+ <typemap id="95" addr="b7dea2d8" >
173
+ <attributelist id="96" addr="b7dea2d8" >
174
+ <attribute name="code" value="{&#10; if($input) {&#10; strncpy((char*)$1, (const char *)$input, $1_dim0-1);&#10; $1[$1_dim0-1] = 0;&#10; } else {&#10; $1[0] = 0;&#10; }&#10;}" id="97" addr="b7debf38" />
175
+ <attribute name="method" value="globalin" id="98" addr="b7debf38" />
176
+ </attributelist >
177
+
178
+ <typemapitem id="99" addr="b7dea278" >
179
+ <attributelist id="100" addr="b7dea278" >
180
+ <parmlist id="101" addr="b7dea298" >
181
+ <parm id="102">
182
+ <attributelist id="103" addr="b7dea298" >
183
+ <attribute name="type" value="a(ANY).char" id="104" addr="b7debf38" />
184
+ </attributelist >
185
+ </parm >
186
+ </parmlist >
187
+ </attributelist >
188
+
189
+ </typemapitem >
190
+ </typemap >
191
+ <typemap id="105" addr="b7dea3b8" >
192
+ <attributelist id="106" addr="b7dea3b8" >
193
+ <attribute name="code" value="{&#10; if ($input) strcpy((char *)$1, (const char *)$input);&#10; else $1[0] = 0;&#10;}" id="107" addr="b7debf38" />
194
+ <attribute name="method" value="memberin" id="108" addr="b7debf38" />
195
+ </attributelist >
196
+
197
+ <typemapitem id="109" addr="b7dea358" >
198
+ <attributelist id="110" addr="b7dea358" >
199
+ <parmlist id="111" addr="b7dea378" >
200
+ <parm id="112">
201
+ <attributelist id="113" addr="b7dea378" >
202
+ <attribute name="type" value="a().char" id="114" addr="b7debf38" />
203
+ </attributelist >
204
+ </parm >
205
+ </parmlist >
206
+ </attributelist >
207
+
208
+ </typemapitem >
209
+ </typemap >
210
+ <typemap id="115" addr="b7dea498" >
211
+ <attributelist id="116" addr="b7dea498" >
212
+ <attribute name="code" value="{&#10; if ($input) strcpy((char *)$1, (const char *)$input);&#10; else $1[0] = 0;&#10;}" id="117" addr="b7debf38" />
213
+ <attribute name="method" value="globalin" id="118" addr="b7debf38" />
214
+ </attributelist >
215
+
216
+ <typemapitem id="119" addr="b7dea438" >
217
+ <attributelist id="120" addr="b7dea438" >
218
+ <parmlist id="121" addr="b7dea458" >
219
+ <parm id="122">
220
+ <attributelist id="123" addr="b7dea458" >
221
+ <attribute name="type" value="a().char" id="124" addr="b7debf38" />
222
+ </attributelist >
223
+ </parm >
224
+ </parmlist >
225
+ </attributelist >
226
+
227
+ </typemapitem >
228
+ </typemap >
229
+ <typemap id="125" addr="b7dea598" >
230
+ <attributelist id="126" addr="b7dea598" >
231
+ <attribute name="code" value="{&#10; size_t ii;&#10; $1_basetype *b = ($1_basetype *) $1;&#10; for (ii = 0; ii &lt; (size_t)$1_size; ii++) b[ii] = *(($1_basetype *) $input + ii);&#10;}" id="127" addr="b7debf38" />
232
+ <attribute name="method" value="memberin" id="128" addr="b7debf38" />
233
+ </attributelist >
234
+
235
+ <typemapitem id="129" addr="b7dea538" >
236
+ <attributelist id="130" addr="b7dea538" >
237
+ <parmlist id="131" addr="b7dea558" >
238
+ <parm id="132">
239
+ <attributelist id="133" addr="b7dea558" >
240
+ <attribute name="type" value="a(ANY).SWIGTYPE" id="134" addr="b7debf38" />
241
+ </attributelist >
242
+ </parm >
243
+ </parmlist >
244
+ </attributelist >
245
+
246
+ </typemapitem >
247
+ </typemap >
248
+ <typemap id="135" addr="b7dea698" >
249
+ <attributelist id="136" addr="b7dea698" >
250
+ <attribute name="code" value="{&#10; size_t ii;&#10; $1_basetype *b = ($1_basetype *) $1;&#10; for (ii = 0; ii &lt; (size_t)$1_size; ii++) b[ii] = *(($1_basetype *) $input + ii);&#10;}" id="137" addr="b7debf38" />
251
+ <attribute name="method" value="globalin" id="138" addr="b7debf38" />
252
+ </attributelist >
253
+
254
+ <typemapitem id="139" addr="b7dea638" >
255
+ <attributelist id="140" addr="b7dea638" >
256
+ <parmlist id="141" addr="b7dea658" >
257
+ <parm id="142">
258
+ <attributelist id="143" addr="b7dea658" >
259
+ <attribute name="type" value="a(ANY).SWIGTYPE" id="144" addr="b7debf38" />
260
+ </attributelist >
261
+ </parm >
262
+ </parmlist >
263
+ </attributelist >
264
+
265
+ </typemapitem >
266
+ </typemap >
267
+ <typemap id="145" addr="b7dea7b8" >
268
+ <attributelist id="146" addr="b7dea7b8" >
269
+ <attribute name="code" value="{&#10; $basetype (*inp)[$1_dim1] = ($basetype (*)[$1_dim1])($input);&#10; $basetype (*dest)[$1_dim1] = ($basetype (*)[$1_dim1])($1);&#10; size_t ii = 0;&#10; for (; ii &lt; $1_dim0; ++ii) {&#10; $basetype *ip = inp[ii];&#10; $basetype *dp = dest[ii];&#10; size_t jj = 0;&#10; for (; jj &lt; $1_dim1; ++jj) dp[jj] = ip[jj];&#10; }&#10;}" id="147" addr="b7debf38" />
270
+ <attribute name="method" value="memberin" id="148" addr="b7debf38" />
271
+ </attributelist >
272
+
273
+ <typemapitem id="149" addr="b7dea728" >
274
+ <attributelist id="150" addr="b7dea728" >
275
+ <parmlist id="151" addr="b7dea778" >
276
+ <parm id="152">
277
+ <attributelist id="153" addr="b7dea778" >
278
+ <attribute name="type" value="a(ANY).a(ANY).SWIGTYPE" id="154" addr="b7debf38" />
279
+ </attributelist >
280
+ </parm >
281
+ </parmlist >
282
+ </attributelist >
283
+
284
+ </typemapitem >
285
+ </typemap >
286
+ <typemap id="155" addr="b7dea8d8" >
287
+ <attributelist id="156" addr="b7dea8d8" >
288
+ <attribute name="code" value="{&#10; $basetype (*inp)[$1_dim1] = ($basetype (*)[$1_dim1])($input);&#10; $basetype (*dest)[$1_dim1] = ($basetype (*)[$1_dim1])($1);&#10; size_t ii = 0;&#10; for (; ii &lt; $1_dim0; ++ii) {&#10; $basetype *ip = inp[ii];&#10; $basetype *dp = dest[ii];&#10; size_t jj = 0;&#10; for (; jj &lt; $1_dim1; ++jj) dp[jj] = ip[jj];&#10; }&#10;}" id="157" addr="b7debf38" />
289
+ <attribute name="method" value="globalin" id="158" addr="b7debf38" />
290
+ </attributelist >
291
+
292
+ <typemapitem id="159" addr="b7dea848" >
293
+ <attributelist id="160" addr="b7dea848" >
294
+ <parmlist id="161" addr="b7dea898" >
295
+ <parm id="162">
296
+ <attributelist id="163" addr="b7dea898" >
297
+ <attribute name="type" value="a(ANY).a(ANY).SWIGTYPE" id="164" addr="b7debf38" />
298
+ </attributelist >
299
+ </parm >
300
+ </parmlist >
301
+ </attributelist >
302
+
303
+ </typemapitem >
304
+ </typemap >
305
+ <typemap id="165" addr="b7deaad8" >
306
+ <attributelist id="166" addr="b7deaad8" >
307
+ <kwargs id="167" addr="b7dea918" >
308
+ <attributelist id="168" addr="b7dea918" >
309
+ <attribute name="name" value="numinputs" id="169" addr="b7debf38" />
310
+ <attribute name="value" value="0" id="170" addr="b7debf38" />
311
+ </attributelist >
312
+ <kwargssitem id="171" addr="b7dea928" >
313
+ <attributelist id="172" addr="b7dea928" >
314
+ </attributelist >
315
+ </kwargssitem >
316
+ <kwargssitem id="173" addr="b7dea938" >
317
+ <attributelist id="174" addr="b7dea938" >
318
+ </attributelist >
319
+ </kwargssitem >
320
+ </kwargs >
321
+ <attribute name="code" value="" id="175" addr="b7debf38" />
322
+ <attribute name="method" value="in" id="176" addr="b7debf38" />
323
+ </attributelist >
324
+
325
+ <typemapitem id="177" addr="b7dea9b8" >
326
+ <attributelist id="178" addr="b7dea9b8" >
327
+ <parmlist id="179" addr="b7dea9d8" >
328
+ <parm id="180">
329
+ <attributelist id="181" addr="b7dea9d8" >
330
+ <attribute name="name" value="VARARGS_SENTINEL" id="182" addr="b7debf38" />
331
+ <attribute name="type" value="p.SWIGTYPE" id="183" addr="b7debf38" />
332
+ </attributelist >
333
+ </parm >
334
+ </parmlist >
335
+ </attributelist >
336
+
337
+ </typemapitem >
338
+ <typemapitem id="184" addr="b7deaa68" >
339
+ <attributelist id="185" addr="b7deaa68" >
340
+ <parmlist id="186" addr="b7deaa88" >
341
+ <parm id="187">
342
+ <attributelist id="188" addr="b7deaa88" >
343
+ <attribute name="name" value="VARARGS_SENTINEL" id="189" addr="b7debf38" />
344
+ <attribute name="type" value="SWIGTYPE" id="190" addr="b7debf38" />
345
+ </attributelist >
346
+ </parm >
347
+ </parmlist >
348
+ </attributelist >
349
+
350
+ </typemapitem >
351
+ </typemap >
352
+ <insert id="191" addr="b7deab18" >
353
+ <attributelist id="192" addr="b7deab18" >
354
+ <attribute name="code" value="/* -----------------------------------------------------------------------------&#10; * This section contains generic SWIG labels for method/variable&#10; * declarations/attributes, and other compiler dependent labels.&#10; * ----------------------------------------------------------------------------- */&#10;&#10;/* template workaround for compilers that cannot correctly implement the C++ standard */&#10;#ifndef SWIGTEMPLATEDISAMBIGUATOR&#10;# if defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt;= 0x560)&#10;# define SWIGTEMPLATEDISAMBIGUATOR template&#10;# elif defined(__HP_aCC)&#10;/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */&#10;/* If we find a maximum version that requires this, the test would be __HP_aCC &lt;= 35500 for A.03.55 */&#10;# define SWIGTEMPLATEDISAMBIGUATOR template&#10;# else&#10;# define SWIGTEMPLATEDISAMBIGUATOR&#10;# endif&#10;#endif&#10;&#10;/* inline attribute */&#10;#ifndef SWIGINLINE&#10;# if defined(__cplusplus) || (defined(__GNUC__) &amp;&amp; !defined(__STRICT_ANSI__))&#10;# define SWIGINLINE inline&#10;# else&#10;# define SWIGINLINE&#10;# endif&#10;#endif&#10;&#10;/* attribute recognised by some compilers to avoid 'unused' warnings */&#10;#ifndef SWIGUNUSED&#10;# if defined(__GNUC__)&#10;# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ >= 4))&#10;# define SWIGUNUSED __attribute__ ((__unused__)) &#10;# else&#10;# define SWIGUNUSED&#10;# endif&#10;# elif defined(__ICC)&#10;# define SWIGUNUSED __attribute__ ((__unused__)) &#10;# else&#10;# define SWIGUNUSED &#10;# endif&#10;#endif&#10;&#10;#ifndef SWIG_MSC_UNSUPPRESS_4505&#10;# if defined(_MSC_VER)&#10;# pragma warning(disable : 4505) /* unreferenced local function has been removed */&#10;# endif &#10;#endif&#10;&#10;#ifndef SWIGUNUSEDPARM&#10;# ifdef __cplusplus&#10;# define SWIGUNUSEDPARM(p)&#10;# else&#10;# define SWIGUNUSEDPARM(p) p SWIGUNUSED &#10;# endif&#10;#endif&#10;&#10;/* internal SWIG method */&#10;#ifndef SWIGINTERN&#10;# define SWIGINTERN static SWIGUNUSED&#10;#endif&#10;&#10;/* internal inline SWIG method */&#10;#ifndef SWIGINTERNINLINE&#10;# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE&#10;#endif&#10;&#10;/* exporting methods */&#10;#if (__GNUC__ >= 4) || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ >= 4)&#10;# ifndef GCC_HASCLASSVISIBILITY&#10;# define GCC_HASCLASSVISIBILITY&#10;# endif&#10;#endif&#10;&#10;#ifndef SWIGEXPORT&#10;# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)&#10;# if defined(STATIC_LINKED)&#10;# define SWIGEXPORT&#10;# else&#10;# define SWIGEXPORT __declspec(dllexport)&#10;# endif&#10;# else&#10;# if defined(__GNUC__) &amp;&amp; defined(GCC_HASCLASSVISIBILITY)&#10;# define SWIGEXPORT __attribute__ ((visibility(&quot;default&quot;)))&#10;# else&#10;# define SWIGEXPORT&#10;# endif&#10;# endif&#10;#endif&#10;&#10;/* calling conventions for Windows */&#10;#ifndef SWIGSTDCALL&#10;# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)&#10;# define SWIGSTDCALL __stdcall&#10;# else&#10;# define SWIGSTDCALL&#10;# endif &#10;#endif&#10;&#10;/* Deal with Microsoft's attempt at deprecating C standard runtime functions */&#10;#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_CRT_SECURE_NO_DEPRECATE)&#10;# define _CRT_SECURE_NO_DEPRECATE&#10;#endif&#10;&#10;/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */&#10;#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_SCL_SECURE_NO_DEPRECATE)&#10;# define _SCL_SECURE_NO_DEPRECATE&#10;#endif&#10;&#10;" id="193" addr="b7debf38" />
355
+ <attribute name="section" value="runtime" id="194" addr="b7debf38" />
356
+ </attributelist >
357
+
358
+ </insert >
359
+ </include >
360
+ <include id="195" addr="b7deabe8" >
361
+ <attributelist id="196" addr="b7deabe8" >
362
+ <attribute name="name" value="interfaces/libc.i" id="197" addr="b7debf38" />
363
+ <attribute name="module" value="" id="198" addr="b7deac38" />
364
+ <attribute name="options" value="b7deab98" id="199" addr="b7deab98" />
365
+ </attributelist >
366
+
367
+ <module id="200" addr="b7deac08" >
368
+ <attributelist id="201" addr="b7deac08" >
369
+ <attribute name="name" value="libc" id="202" addr="b7debf38" />
370
+ </attributelist >
371
+
372
+ </module >
373
+ <insert id="203" addr="b7deac58" >
374
+ <attributelist id="204" addr="b7deac58" >
375
+ <attribute name="code" value="&#10;require 'rubygems'&#10;require 'ffi'&#10;&#10;module LibC&#10; extend FFI::Library&#10;" id="205" addr="b7debf38" />
376
+ </attributelist >
377
+
378
+ </insert >
379
+ <cdecl id="206" addr="b7deacd8" >
380
+ <attributelist id="207" addr="b7deacd8" >
381
+ <attribute name="sym_name" value="size_t" id="208" addr="b7debf38" />
382
+ <attribute name="name" value="size_t" id="209" addr="b7debf38" />
383
+ <attribute name="decl" value="" id="210" addr="b7debf38" />
384
+ <attribute name="storage" value="typedef" id="211" addr="b7debf38" />
385
+ <attribute name="kind" value="typedef" id="212" addr="b7debf38" />
386
+ <attribute name="type" value="unsigned int" id="213" addr="b7debf38" />
387
+ <attribute name="sym_symtab" value="b7de23d8" id="214" addr="b7de23d8" />
388
+ <attribute name="sym_overname" value="__SWIG_0" id="215" addr="b7debf38" />
389
+ </attributelist >
390
+
391
+ </cdecl >
392
+ <class id="216" addr="b7deae28" >
393
+ <attributelist id="217" addr="b7deae28" >
394
+ <attribute name="name" value="timeval" id="218" addr="b7debf38" />
395
+ <attribute name="sym_symtab" value="b7de23d8" id="219" addr="b7de23d8" />
396
+ <attribute name="symtab" value="b7deaea8" id="220" addr="b7deaea8" />
397
+ <attribute name="allows_typedef" value="1" id="221" addr="b7debf38" />
398
+ <attribute name="typepass_visit" value="1" id="222" addr="b7debf38" />
399
+ <attribute name="allocate_visit" value="1" id="223" addr="b7debf38" />
400
+ <attribute name="kind" value="struct" id="224" addr="b7debf38" />
401
+ <attribute name="sym_name" value="timeval" id="225" addr="b7debf38" />
402
+ <attribute name="allocate_default_constructor" value="1" id="226" addr="b7debf38" />
403
+ <attribute name="allocate_default_destructor" value="1" id="227" addr="b7debf38" />
404
+ <attribute name="allocate_copy_constructor" value="1" id="228" addr="b7debf38" />
405
+ <attribute name="module" value="libc" id="229" addr="b7deac08" />
406
+ <attribute name="sym_overname" value="__SWIG_0" id="230" addr="b7debf38" />
407
+ <typescope id="231" addr="b7debab8" >
408
+ <attributelist id="232" addr="b7debab8" >
409
+ <attribute name="name" value="timeval" id="233" addr="b7debf38" />
410
+ <typetab id="234" addr="b7debac8" >
411
+ <attributelist id="235" addr="b7debac8" >
412
+ </attributelist >
413
+ </typetab >
414
+ <attribute name="parent" value="b7de2458" id="236" addr="b7de2458" />
415
+ <attribute name="qname" value="timeval" id="237" addr="b7debf38" />
416
+ <attribute name="symtab" value="b7deaea8" id="238" addr="b7deaea8" />
417
+ </attributelist >
418
+ <typescopesitem id="239" addr="b7deba88" >
419
+ <attributelist id="240" addr="b7deba88" >
420
+ </attributelist >
421
+ </typescopesitem >
422
+ <typescopesitem id="241" addr="b7debac8" >
423
+ <attributelist id="242" addr="b7debac8" >
424
+ </attributelist >
425
+ </typescopesitem >
426
+ <typescopesitem id="243" addr="b7de2458" >
427
+ <attributelist id="244" addr="b7de2458" >
428
+ <attribute name="name" value="" id="245" addr="b7debf38" />
429
+ <typetab id="246" addr="b7de2488" >
430
+ <attributelist id="247" addr="b7de2488" >
431
+ <attribute name="struct timeval" value="struct timeval" id="248" addr="b7debf38" />
432
+ <attribute name="size_t" value="unsigned int" id="249" addr="b7debf38" />
433
+ </attributelist >
434
+ <typetabsitem id="250" addr="b7deba48" >
435
+ <attributelist id="251" addr="b7deba48" >
436
+ </attributelist >
437
+ </typetabsitem >
438
+ <typetabsitem id="252" addr="b7deb9c8" >
439
+ <attributelist id="253" addr="b7deb9c8" >
440
+ </attributelist >
441
+ </typetabsitem >
442
+ </typetab >
443
+ </attributelist >
444
+ </typescopesitem >
445
+ <typescopesitem id="254" addr="b7debad8" >
446
+ <attributelist id="255" addr="b7debad8" >
447
+ </attributelist >
448
+ </typescopesitem >
449
+ <typescopesitem id="256" addr="b7deaea8" >
450
+ <attributelist id="257" addr="b7deaea8" >
451
+ <attribute name="name" value="timeval" id="258" addr="b7debf38" />
452
+ <attribute name="csymtab" value="b7deaec8" id="259" addr="b7deaec8" />
453
+ <attribute name="symtab" value="b7deae98" id="260" addr="b7deae98" />
454
+ </attributelist >
455
+ </typescopesitem >
456
+ </typescope >
457
+ </attributelist >
458
+
459
+ <cdecl id="261" addr="b7deaf58" >
460
+ <attributelist id="262" addr="b7deaf58" >
461
+ <attribute name="ismember" value="1" id="263" addr="b7debf38" />
462
+ <attribute name="sym_name" value="tv_sec" id="264" addr="b7debf38" />
463
+ <attribute name="name" value="tv_sec" id="265" addr="b7debf38" />
464
+ <attribute name="decl" value="" id="266" addr="b7debf38" />
465
+ <attribute name="access" value="public" id="267" addr="b7debf38" />
466
+ <attribute name="kind" value="variable" id="268" addr="b7debf38" />
467
+ <attribute name="type" value="unsigned long" id="269" addr="b7debf38" />
468
+ <attribute name="sym_symtab" value="b7deaea8" id="270" addr="b7deaea8" />
469
+ <attribute name="sym_overname" value="__SWIG_0" id="271" addr="b7debf38" />
470
+ </attributelist >
471
+
472
+ </cdecl >
473
+ <cdecl id="272" addr="b7deb0a8" >
474
+ <attributelist id="273" addr="b7deb0a8" >
475
+ <attribute name="ismember" value="1" id="274" addr="b7debf38" />
476
+ <attribute name="sym_name" value="tv_usec" id="275" addr="b7debf38" />
477
+ <attribute name="name" value="tv_usec" id="276" addr="b7debf38" />
478
+ <attribute name="decl" value="" id="277" addr="b7debf38" />
479
+ <attribute name="access" value="public" id="278" addr="b7debf38" />
480
+ <attribute name="kind" value="variable" id="279" addr="b7debf38" />
481
+ <attribute name="type" value="unsigned long" id="280" addr="b7debf38" />
482
+ <attribute name="sym_symtab" value="b7deaea8" id="281" addr="b7deaea8" />
483
+ <attribute name="sym_overname" value="__SWIG_0" id="282" addr="b7debf38" />
484
+ </attributelist >
485
+
486
+ </cdecl >
487
+ </class >
488
+ <cdecl id="283" addr="b7deb268" >
489
+ <attributelist id="284" addr="b7deb268" >
490
+ <attribute name="sym_name" value="strlen" id="285" addr="b7debf38" />
491
+ <attribute name="name" value="strlen" id="286" addr="b7debf38" />
492
+ <attribute name="decl" value="f(p.q(const).char)." id="287" addr="b7debf38" />
493
+ <parmlist id="288" addr="b7deb218" >
494
+ <parm id="289">
495
+ <attributelist id="290" addr="b7deb218" >
496
+ <attribute name="name" value="s" id="291" addr="b7debf38" />
497
+ <attribute name="type" value="p.q(const).char" id="292" addr="b7debf38" />
498
+ <attribute name="compactdefargs" value="1" id="293" addr="b7debf38" />
499
+ </attributelist >
500
+ </parm >
501
+ </parmlist >
502
+ <attribute name="kind" value="function" id="294" addr="b7debf38" />
503
+ <attribute name="type" value="size_t" id="295" addr="b7debf38" />
504
+ <attribute name="sym_symtab" value="b7de23d8" id="296" addr="b7de23d8" />
505
+ <attribute name="sym_overname" value="__SWIG_0" id="297" addr="b7debf38" />
506
+ </attributelist >
507
+
508
+ </cdecl >
509
+ <cdecl id="298" addr="b7deb468" >
510
+ <attributelist id="299" addr="b7deb468" >
511
+ <attribute name="sym_name" value="strcat" id="300" addr="b7debf38" />
512
+ <attribute name="name" value="strcat" id="301" addr="b7debf38" />
513
+ <attribute name="decl" value="f(p.char,p.q(const).char).p." id="302" addr="b7debf38" />
514
+ <parmlist id="303" addr="b7deb388" >
515
+ <parm id="304">
516
+ <attributelist id="305" addr="b7deb388" >
517
+ <attribute name="name" value="to" id="306" addr="b7debf38" />
518
+ <attribute name="type" value="p.char" id="307" addr="b7debf38" />
519
+ <attribute name="compactdefargs" value="1" id="308" addr="b7debf38" />
520
+ </attributelist >
521
+ </parm >
522
+ <parm id="309">
523
+ <attributelist id="310" addr="b7deb428" >
524
+ <attribute name="name" value="from" id="311" addr="b7debf38" />
525
+ <attribute name="type" value="p.q(const).char" id="312" addr="b7debf38" />
526
+ </attributelist >
527
+ </parm >
528
+ </parmlist >
529
+ <attribute name="kind" value="function" id="313" addr="b7debf38" />
530
+ <attribute name="type" value="char" id="314" addr="b7debf38" />
531
+ <attribute name="sym_symtab" value="b7de23d8" id="315" addr="b7de23d8" />
532
+ <attribute name="sym_overname" value="__SWIG_0" id="316" addr="b7debf38" />
533
+ </attributelist >
534
+
535
+ </cdecl >
536
+ <cdecl id="317" addr="b7deb668" >
537
+ <attributelist id="318" addr="b7deb668" >
538
+ <attribute name="sym_name" value="strcmp" id="319" addr="b7debf38" />
539
+ <attribute name="name" value="strcmp" id="320" addr="b7debf38" />
540
+ <attribute name="decl" value="f(p.q(const).char,p.q(const).char)." id="321" addr="b7debf38" />
541
+ <parmlist id="322" addr="b7deb578" >
542
+ <parm id="323">
543
+ <attributelist id="324" addr="b7deb578" >
544
+ <attribute name="name" value="s1" id="325" addr="b7debf38" />
545
+ <attribute name="type" value="p.q(const).char" id="326" addr="b7debf38" />
546
+ <attribute name="compactdefargs" value="1" id="327" addr="b7debf38" />
547
+ </attributelist >
548
+ </parm >
549
+ <parm id="328">
550
+ <attributelist id="329" addr="b7deb618" >
551
+ <attribute name="name" value="s2" id="330" addr="b7debf38" />
552
+ <attribute name="type" value="p.q(const).char" id="331" addr="b7debf38" />
553
+ </attributelist >
554
+ </parm >
555
+ </parmlist >
556
+ <attribute name="kind" value="function" id="332" addr="b7debf38" />
557
+ <attribute name="type" value="int" id="333" addr="b7debf38" />
558
+ <attribute name="sym_symtab" value="b7de23d8" id="334" addr="b7de23d8" />
559
+ <attribute name="sym_overname" value="__SWIG_0" id="335" addr="b7debf38" />
560
+ </attributelist >
561
+
562
+ </cdecl >
563
+ <cdecl id="336" addr="b7deb868" >
564
+ <attributelist id="337" addr="b7deb868" >
565
+ <attribute name="sym_name" value="gettimeofday" id="338" addr="b7debf38" />
566
+ <attribute name="name" value="gettimeofday" id="339" addr="b7debf38" />
567
+ <attribute name="decl" value="f(p.struct timeval,p.struct timezone)." id="340" addr="b7debf38" />
568
+ <parmlist id="341" addr="b7deb778" >
569
+ <parm id="342">
570
+ <attributelist id="343" addr="b7deb778" >
571
+ <attribute name="name" value="tp" id="344" addr="b7debf38" />
572
+ <attribute name="type" value="p.struct timeval" id="345" addr="b7debf38" />
573
+ <attribute name="compactdefargs" value="1" id="346" addr="b7debf38" />
574
+ </attributelist >
575
+ </parm >
576
+ <parm id="347">
577
+ <attributelist id="348" addr="b7deb818" >
578
+ <attribute name="name" value="tzp" id="349" addr="b7debf38" />
579
+ <attribute name="type" value="p.struct timezone" id="350" addr="b7debf38" />
580
+ </attributelist >
581
+ </parm >
582
+ </parmlist >
583
+ <attribute name="kind" value="function" id="351" addr="b7debf38" />
584
+ <attribute name="type" value="int" id="352" addr="b7debf38" />
585
+ <attribute name="sym_symtab" value="b7de23d8" id="353" addr="b7de23d8" />
586
+ <attribute name="sym_overname" value="__SWIG_0" id="354" addr="b7debf38" />
587
+ </attributelist >
588
+
589
+ </cdecl >
590
+ <insert id="355" addr="b7deb8e8" >
591
+ <attributelist id="356" addr="b7deb8e8" >
592
+ <attribute name="code" value="&#10;end&#10;" id="357" addr="b7debf38" />
593
+ </attributelist >
594
+
595
+ </insert >
596
+ </include >
597
+ </top >