ffi 1.0.4-x86-mingw32 → 1.0.5-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ffi might be problematic. Click here for more details.
- data/Rakefile +2 -2
- data/ext/ffi_c/AbstractMemory.c +1 -1
- data/ext/ffi_c/ArrayType.c +11 -19
- data/ext/ffi_c/ArrayType.h +11 -19
- data/ext/ffi_c/Buffer.c +2 -0
- data/ext/ffi_c/Call.h +12 -19
- data/ext/ffi_c/ClosurePool.h +19 -0
- data/ext/ffi_c/DynamicLibrary.h +18 -0
- data/ext/ffi_c/Function.c +12 -13
- data/ext/ffi_c/Function.h +12 -19
- data/ext/ffi_c/LastError.c +12 -19
- data/ext/ffi_c/LastError.h +20 -0
- data/ext/ffi_c/MappedType.c +12 -19
- data/ext/ffi_c/MappedType.h +12 -19
- data/ext/ffi_c/MemoryPointer.c +1 -0
- data/ext/ffi_c/MemoryPointer.h +23 -3
- data/ext/ffi_c/MethodHandle.h +15 -22
- data/ext/ffi_c/Platform.c +36 -9
- data/ext/ffi_c/Platform.h +23 -3
- data/ext/ffi_c/Pointer.c +2 -0
- data/ext/ffi_c/Pointer.h +11 -19
- data/ext/ffi_c/Struct.c +12 -19
- data/ext/ffi_c/Struct.h +11 -19
- data/ext/ffi_c/StructByValue.c +13 -19
- data/ext/ffi_c/StructByValue.h +12 -19
- data/ext/ffi_c/StructLayout.c +12 -19
- data/ext/ffi_c/Thread.c +36 -10
- data/ext/ffi_c/Thread.h +14 -5
- data/ext/ffi_c/Type.c +1 -0
- data/ext/ffi_c/Types.c +12 -19
- data/ext/ffi_c/Types.h +11 -19
- data/ext/ffi_c/Variadic.c +1 -1
- data/ext/ffi_c/compat.h +13 -19
- data/ext/ffi_c/endian.h +1 -0
- data/ext/ffi_c/extconf.rb +3 -1
- data/ext/ffi_c/ffi.c +12 -19
- data/ext/ffi_c/rbffi.h +23 -3
- data/lib/1.8/ffi_c.so +0 -0
- data/lib/1.9/ffi_c.so +0 -0
- data/lib/ffi/tools/const_generator.rb +1 -1
- data/spec/ffi/async_callback_spec.rb +35 -12
- data/spec/ffi/bool_spec.rb +16 -0
- data/spec/ffi/buffer_spec.rb +34 -21
- data/spec/ffi/callback_spec.rb +16 -0
- data/spec/ffi/custom_param_type.rb +16 -0
- data/spec/ffi/custom_type_spec.rb +16 -0
- data/spec/ffi/enum_spec.rb +16 -0
- data/spec/ffi/errno_spec.rb +16 -0
- data/spec/ffi/ffi_spec.rb +16 -0
- data/spec/ffi/library_spec.rb +16 -0
- data/spec/ffi/managed_struct_spec.rb +16 -0
- data/spec/ffi/number_spec.rb +16 -0
- data/spec/ffi/strptr_spec.rb +16 -0
- data/spec/ffi/struct_callback_spec.rb +16 -0
- data/spec/ffi/struct_initialize_spec.rb +1 -0
- data/spec/ffi/struct_packed_spec.rb +16 -0
- data/spec/ffi/struct_spec.rb +16 -0
- data/spec/ffi/typedef_spec.rb +16 -0
- data/spec/ffi/union_spec.rb +16 -0
- data/spec/ffi/variadic_spec.rb +16 -0
- data/tasks/extension.rake +1 -1
- metadata +11 -24
- data/lib/ffi_c.so +0 -0
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ USE_RAKE_COMPILER = (RUBY_PLATFORM =~ /java/) ? false : true
|
|
5
5
|
if USE_RAKE_COMPILER
|
6
6
|
gem 'rake-compiler', '>=0.6.0'
|
7
7
|
require 'rake/extensiontask'
|
8
|
-
ENV['RUBY_CC_VERSION'] = '1.9.2'
|
8
|
+
ENV['RUBY_CC_VERSION'] = '1.8.7:1.9.2'
|
9
9
|
end
|
10
10
|
|
11
11
|
require 'date'
|
@@ -75,7 +75,7 @@ PROJ.name = 'ffi'
|
|
75
75
|
PROJ.authors = 'Wayne Meissner'
|
76
76
|
PROJ.email = 'wmeissner@gmail.com'
|
77
77
|
PROJ.url = 'http://wiki.github.com/ffi/ffi'
|
78
|
-
PROJ.version = '1.0.
|
78
|
+
PROJ.version = '1.0.5'
|
79
79
|
PROJ.rubyforge.name = 'ffi'
|
80
80
|
PROJ.readme_file = 'README.rdoc'
|
81
81
|
|
data/ext/ffi_c/AbstractMemory.c
CHANGED
data/ext/ffi_c/ArrayType.c
CHANGED
@@ -3,27 +3,19 @@
|
|
3
3
|
*
|
4
4
|
* All rights reserved.
|
5
5
|
*
|
6
|
-
*
|
7
|
-
* modification, are permitted provided that the following conditions are met:
|
6
|
+
* This file is part of ruby-ffi.
|
8
7
|
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* this list of conditions and the following disclaimer in the documentation
|
13
|
-
* and/or other materials provided with the distribution.
|
14
|
-
* * The name of the author or authors may not be used to endorse or promote
|
15
|
-
* products derived from this software without specific prior written permission.
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
16
11
|
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
25
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
27
19
|
*/
|
28
20
|
|
29
21
|
#include <ruby.h>
|
data/ext/ffi_c/ArrayType.h
CHANGED
@@ -3,27 +3,19 @@
|
|
3
3
|
*
|
4
4
|
* All rights reserved.
|
5
5
|
*
|
6
|
-
*
|
7
|
-
* modification, are permitted provided that the following conditions are met:
|
6
|
+
* This file is part of ruby-ffi.
|
8
7
|
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* this list of conditions and the following disclaimer in the documentation
|
13
|
-
* and/or other materials provided with the distribution.
|
14
|
-
* * The name of the author or authors may not be used to endorse or promote
|
15
|
-
* products derived from this software without specific prior written permission.
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
16
11
|
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
25
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
27
19
|
*/
|
28
20
|
|
29
21
|
#ifndef RBFFI_ARRAYTYPE_H
|
data/ext/ffi_c/Buffer.c
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
#include <limits.h>
|
24
24
|
#include <ruby.h>
|
25
25
|
#include "rbffi.h"
|
26
|
+
#include "endian.h"
|
26
27
|
#include "AbstractMemory.h"
|
27
28
|
|
28
29
|
typedef struct Buffer {
|
@@ -240,3 +241,4 @@ rbffi_Buffer_Init(VALUE moduleFFI)
|
|
240
241
|
rb_define_method(BufferClass, "+", buffer_plus, 1);
|
241
242
|
rb_define_method(BufferClass, "slice", buffer_slice, 2);
|
242
243
|
}
|
244
|
+
|
data/ext/ffi_c/Call.h
CHANGED
@@ -3,29 +3,22 @@
|
|
3
3
|
* Copyright (c) 2009, Luc Heinrich <luc@honk-honk.com>
|
4
4
|
* Copyright (c) 2009, Mike Dalessio <mike.dalessio@gmail.com>
|
5
5
|
* Copyright (c) 2009, Aman Gupta.
|
6
|
+
*
|
6
7
|
* All rights reserved.
|
7
8
|
*
|
8
|
-
*
|
9
|
-
*
|
9
|
+
* This file is part of ruby-ffi.
|
10
|
+
*
|
11
|
+
* This code is free software: you can redistribute it and/or modify it under
|
12
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
13
|
+
* published by the Free Software Foundation.
|
10
14
|
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
* * The name of the author or authors may not be used to endorse or promote
|
17
|
-
* products derived from this software without specific prior written permission.
|
15
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
16
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
18
|
+
* version 3 for more details.
|
18
19
|
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
23
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
24
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
25
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
26
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
27
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
20
|
+
* You should have received a copy of the GNU Lesser General Public License
|
21
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
29
22
|
*/
|
30
23
|
|
31
24
|
#ifndef RBFFI_INVOKE_H
|
data/ext/ffi_c/ClosurePool.h
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2009, 2010 Wayne Meissner
|
3
|
+
* All rights reserved.
|
4
|
+
*
|
5
|
+
* This file is part of ruby-ffi.
|
6
|
+
*
|
7
|
+
* This code is free software: you can redistribute it and/or modify it under
|
8
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
9
|
+
* published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
14
|
+
* version 3 for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
*/
|
19
|
+
|
1
20
|
#ifndef RUBYFFI_CLOSUREPOOL_H
|
2
21
|
#define RUBYFFI_CLOSUREPOOL_H
|
3
22
|
|
data/ext/ffi_c/DynamicLibrary.h
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2008-2010 Wayne Meissner
|
3
|
+
* All rights reserved.
|
4
|
+
*
|
5
|
+
* This file is part of ruby-ffi.
|
6
|
+
*
|
7
|
+
* This code is free software: you can redistribute it and/or modify it under
|
8
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
9
|
+
* published by the Free Software Foundation.
|
10
|
+
*
|
11
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
14
|
+
* version 3 for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
*/
|
1
19
|
|
2
20
|
#ifndef _LIBRARY_H
|
3
21
|
#define _LIBRARY_H
|
data/ext/ffi_c/Function.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) 2009
|
3
|
-
|
2
|
+
* Copyright (c) 2009-2011 Wayne Meissner
|
3
|
+
*
|
4
4
|
* All rights reserved.
|
5
5
|
*
|
6
6
|
* This file is part of ruby-ffi.
|
@@ -69,17 +69,16 @@ static void callback_invoke(ffi_cif* cif, void* retval, void** parameters, void*
|
|
69
69
|
static bool callback_prep(void* ctx, void* code, Closure* closure, char* errmsg, size_t errmsgsize);
|
70
70
|
static void* callback_with_gvl(void* data);
|
71
71
|
|
72
|
-
#
|
72
|
+
#if !defined(_WIN32) || defined(HAVE_RB_THREAD_BLOCKING_REGION)
|
73
|
+
# define DEFER_ASYNC_CALLBACK 1
|
74
|
+
#endif
|
75
|
+
|
73
76
|
|
74
77
|
#if defined(DEFER_ASYNC_CALLBACK)
|
75
78
|
static VALUE async_cb_event(void *);
|
76
79
|
static VALUE async_cb_call(void *);
|
77
80
|
#endif
|
78
81
|
|
79
|
-
#ifdef HAVE_RUBY_THREAD_HAS_GVL_P
|
80
|
-
extern int ruby_thread_has_gvl_p(void);
|
81
|
-
#endif
|
82
|
-
|
83
82
|
#ifdef HAVE_RB_THREAD_CALL_WITH_GVL
|
84
83
|
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
|
85
84
|
#endif
|
@@ -268,12 +267,12 @@ function_init(VALUE self, VALUE rbFunctionInfo, VALUE rbProc)
|
|
268
267
|
}
|
269
268
|
|
270
269
|
#if defined(DEFER_ASYNC_CALLBACK)
|
271
|
-
# if !defined(HAVE_RB_THREAD_BLOCKING_REGION)
|
272
|
-
pipe(async_cb_pipe);
|
273
|
-
fcntl(async_cb_pipe[0], F_SETFL, fcntl(async_cb_pipe[0], F_GETFL) | O_NONBLOCK);
|
274
|
-
fcntl(async_cb_pipe[1], F_SETFL, fcntl(async_cb_pipe[1], F_GETFL) | O_NONBLOCK);
|
275
|
-
# endif
|
276
270
|
if (async_cb_thread == Qnil) {
|
271
|
+
#if !defined(HAVE_RB_THREAD_BLOCKING_REGION)
|
272
|
+
pipe(async_cb_pipe);
|
273
|
+
fcntl(async_cb_pipe[0], F_SETFL, fcntl(async_cb_pipe[0], F_GETFL) | O_NONBLOCK);
|
274
|
+
fcntl(async_cb_pipe[1], F_SETFL, fcntl(async_cb_pipe[1], F_GETFL) | O_NONBLOCK);
|
275
|
+
#endif
|
277
276
|
async_cb_thread = rb_thread_create(async_cb_event, NULL);
|
278
277
|
}
|
279
278
|
|
@@ -832,7 +831,7 @@ rbffi_Function_Init(VALUE moduleFFI)
|
|
832
831
|
id_cb_ref = rb_intern("@__ffi_callback__");
|
833
832
|
id_to_native = rb_intern("to_native");
|
834
833
|
id_from_native = rb_intern("from_native");
|
835
|
-
#
|
834
|
+
#if defined(_WIN32) && defined(HAVE_RB_THREAD_BLOCKING_REGION)
|
836
835
|
InitializeCriticalSection(&async_cb_lock);
|
837
836
|
async_cb_cond = CreateEvent(NULL, FALSE, FALSE, NULL);
|
838
837
|
#endif
|
data/ext/ffi_c/Function.h
CHANGED
@@ -1,28 +1,21 @@
|
|
1
1
|
/*
|
2
2
|
* Copyright (c) 2009, Wayne Meissner
|
3
|
+
*
|
3
4
|
* All rights reserved.
|
4
5
|
*
|
5
|
-
*
|
6
|
-
*
|
6
|
+
* This file is part of ruby-ffi.
|
7
|
+
*
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
7
11
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* and/or other materials provided with the distribution.
|
13
|
-
* * The name of the author or authors may not be used to endorse or promote
|
14
|
-
* products derived from this software without specific prior written permission.
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
15
16
|
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
20
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
21
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
22
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
23
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
24
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
25
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
26
19
|
*/
|
27
20
|
|
28
21
|
#ifndef RBFFI_FUNCTION_H
|
data/ext/ffi_c/LastError.c
CHANGED
@@ -3,27 +3,19 @@
|
|
3
3
|
*
|
4
4
|
* All rights reserved.
|
5
5
|
*
|
6
|
-
*
|
7
|
-
* modification, are permitted provided that the following conditions are met:
|
6
|
+
* This file is part of ruby-ffi.
|
8
7
|
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* this list of conditions and the following disclaimer in the documentation
|
13
|
-
* and/or other materials provided with the distribution.
|
14
|
-
* * The name of the author or authors may not be used to endorse or promote
|
15
|
-
* products derived from this software without specific prior written permission.
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
16
11
|
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
25
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
27
19
|
*/
|
28
20
|
|
29
21
|
#include <sys/param.h>
|
@@ -157,3 +149,4 @@ rbffi_LastError_Init(VALUE moduleFFI)
|
|
157
149
|
id_thread_data = rb_intern("ffi_thread_local_data");
|
158
150
|
#endif /* USE_PTHREAD_LOCAL */
|
159
151
|
}
|
152
|
+
|
data/ext/ffi_c/LastError.h
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2008, 2009, Wayne Meissner
|
3
|
+
*
|
4
|
+
* All rights reserved.
|
5
|
+
*
|
6
|
+
* This file is part of ruby-ffi.
|
7
|
+
*
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
11
|
+
*
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
*/
|
20
|
+
|
1
21
|
#ifndef RBFFI_LASTERROR_H
|
2
22
|
#define RBFFI_LASTERROR_H
|
3
23
|
|
data/ext/ffi_c/MappedType.c
CHANGED
@@ -1,28 +1,21 @@
|
|
1
1
|
/*
|
2
2
|
* Copyright (c) 2010, Wayne Meissner
|
3
|
+
*
|
3
4
|
* All rights reserved.
|
4
5
|
*
|
5
|
-
*
|
6
|
-
*
|
6
|
+
* This file is part of ruby-ffi.
|
7
|
+
*
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
7
11
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* and/or other materials provided with the distribution.
|
13
|
-
* * The name of the author or authors may not be used to endorse or promote
|
14
|
-
* products derived from this software without specific prior written permission.
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
15
16
|
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
20
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
21
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
22
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
23
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
24
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
25
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
26
19
|
*/
|
27
20
|
|
28
21
|
#include <ruby.h>
|
data/ext/ffi_c/MappedType.h
CHANGED
@@ -1,28 +1,21 @@
|
|
1
1
|
/*
|
2
2
|
* Copyright (c) 2010, Wayne Meissner
|
3
|
+
*
|
3
4
|
* All rights reserved.
|
4
5
|
*
|
5
|
-
*
|
6
|
-
*
|
6
|
+
* This file is part of ruby-ffi.
|
7
|
+
*
|
8
|
+
* This code is free software: you can redistribute it and/or modify it under
|
9
|
+
* the terms of the GNU Lesser General Public License version 3 only, as
|
10
|
+
* published by the Free Software Foundation.
|
7
11
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* and/or other materials provided with the distribution.
|
13
|
-
* * The name of the author or authors may not be used to endorse or promote
|
14
|
-
* products derived from this software without specific prior written permission.
|
12
|
+
* This code is distributed in the hope that it will be useful, but WITHOUT
|
13
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
15
|
+
* version 3 for more details.
|
15
16
|
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
20
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
21
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
22
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
23
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
24
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
25
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
18
|
+
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
|
26
19
|
*/
|
27
20
|
|
28
21
|
#ifndef RBFFI_MAPPEDTYPE_H
|