ffi 1.0.3-x86-mingw32 → 1.0.4-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 +1 -1
- data/ext/ffi_c/FunctionInfo.c +16 -21
- data/ext/ffi_c/Thread.c +1 -0
- data/ext/ffi_c/extconf.rb +1 -0
- data/lib/ffi_c.so +0 -0
- metadata +2 -2
data/Rakefile
CHANGED
data/ext/ffi_c/FunctionInfo.c
CHANGED
@@ -2,27 +2,19 @@
|
|
2
2
|
* Copyright (c) 2009, Wayne Meissner
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
|
-
*
|
6
|
-
* modification, are permitted provided that the following conditions are met:
|
5
|
+
* This file is part of ruby-ffi.
|
7
6
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
* this list of conditions and the following disclaimer in the documentation
|
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.
|
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.
|
15
10
|
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
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.
|
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/>.
|
26
18
|
*/
|
27
19
|
|
28
20
|
#include <sys/param.h>
|
@@ -98,6 +90,9 @@ fntype_initialize(int argc, VALUE* argv, VALUE self)
|
|
98
90
|
ffi_status status;
|
99
91
|
VALUE rbReturnType = Qnil, rbParamTypes = Qnil, rbOptions = Qnil;
|
100
92
|
VALUE rbEnums = Qnil, rbConvention = Qnil, rbBlocking = Qnil;
|
93
|
+
#if defined(_WIN32) || defined(__WIN32__)
|
94
|
+
VALUE rbConventionStr;
|
95
|
+
#endif
|
101
96
|
int i, nargs;
|
102
97
|
|
103
98
|
nargs = rb_scan_args(argc, argv, "21", &rbReturnType, &rbParamTypes, &rbOptions);
|
@@ -158,8 +153,8 @@ fntype_initialize(int argc, VALUE* argv, VALUE self)
|
|
158
153
|
|
159
154
|
|
160
155
|
#if defined(_WIN32) || defined(__WIN32__)
|
161
|
-
|
162
|
-
fnInfo->abi = (
|
156
|
+
rbConventionStr = (rbConvention != Qnil) ? rb_funcall2(rbConvention, rb_intern("to_s"), 0, NULL) : Qnil;
|
157
|
+
fnInfo->abi = (rbConventionStr != Qnil && strcmp(StringValueCStr(rbConventionStr), "stdcall") == 0)
|
163
158
|
? FFI_STDCALL : FFI_DEFAULT_ABI;
|
164
159
|
#else
|
165
160
|
fnInfo->abi = FFI_DEFAULT_ABI;
|
data/ext/ffi_c/Thread.c
CHANGED
data/ext/ffi_c/extconf.rb
CHANGED
data/lib/ffi_c.so
CHANGED
Binary file
|