ffi 1.0.3 → 1.0.4

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 CHANGED
@@ -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.3'
78
+ PROJ.version = '1.0.4'
79
79
  PROJ.rubyforge.name = 'ffi'
80
80
  PROJ.readme_file = 'README.rdoc'
81
81
 
@@ -2,27 +2,19 @@
2
2
  * Copyright (c) 2009, Wayne Meissner
3
3
  * All rights reserved.
4
4
  *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
5
+ * This file is part of ruby-ffi.
7
6
  *
8
- * * Redistributions of source code must retain the above copyright notice, this
9
- * list of conditions and the following disclaimer.
10
- * * Redistributions in binary form must reproduce the above copyright notice
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
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
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.
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
- VALUE rbConventionStr = rb_funcall2(rbConvention, rb_intern("to_s"), 0, NULL);
162
- fnInfo->abi = (rbConvention != Qnil && strcmp(StringValueCStr(rbConventionStr), "stdcall") == 0)
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;
@@ -23,6 +23,7 @@
23
23
  #ifndef _WIN32
24
24
  # include <pthread.h>
25
25
  # include <errno.h>
26
+ # include <signal.h>
26
27
  #endif
27
28
  #include <fcntl.h>
28
29
  #include "Thread.h"
@@ -27,6 +27,7 @@ create_header
27
27
 
28
28
  $CFLAGS << " -mwin32 " if RbConfig::CONFIG['host_os'] =~ /cygwin/
29
29
  #$CFLAGS << " -Werror -Wunused -Wformat -Wimplicit -Wreturn-type "
30
+ $CFLAGS << " -Wno-declaration-after-statement "
30
31
 
31
32
  create_makefile("ffi_c")
32
33
  unless libffi_ok
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 4
9
+ version: 1.0.4
5
10
  platform: ruby
6
11
  authors:
7
12
  - Wayne Meissner
@@ -14,14 +19,34 @@ default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rake
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 8
31
+ - 7
23
32
  version: 0.8.7
24
- version:
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: bones
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 3
45
+ - 4
46
+ - 7
47
+ version: 3.4.7
48
+ type: :development
49
+ version_requirements: *id002
25
50
  description: |-
26
51
  Ruby-FFI is a ruby extension for programmatically loading dynamic
27
52
  libraries, binding functions within them, and calling those functions
@@ -422,21 +447,25 @@ require_paths:
422
447
  - lib
423
448
  - ext
424
449
  required_ruby_version: !ruby/object:Gem::Requirement
450
+ none: false
425
451
  requirements:
426
452
  - - ">="
427
453
  - !ruby/object:Gem::Version
454
+ segments:
455
+ - 0
428
456
  version: "0"
429
- version:
430
457
  required_rubygems_version: !ruby/object:Gem::Requirement
458
+ none: false
431
459
  requirements:
432
460
  - - ">="
433
461
  - !ruby/object:Gem::Version
462
+ segments:
463
+ - 0
434
464
  version: "0"
435
- version:
436
465
  requirements: []
437
466
 
438
467
  rubyforge_project: ffi
439
- rubygems_version: 1.3.5
468
+ rubygems_version: 1.3.7
440
469
  signing_key:
441
470
  specification_version: 3
442
471
  summary: Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling those functions from Ruby code