ffi 1.1.5-x86-mingw32 → 1.1.6.pre2-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/AbstractMemory.c +0 -5
- data/ext/ffi_c/Call.c +1 -4
- data/ext/ffi_c/MappedType.c +0 -1
- data/ext/ffi_c/MemoryPointer.c +0 -7
- data/ext/ffi_c/MethodHandle.c +3 -0
- data/ext/ffi_c/StructLayout.c +1 -1
- data/ext/ffi_c/Variadic.c +4 -2
- data/ext/ffi_c/extconf.rb +7 -6
- data/ext/ffi_c/libffi.mk +1 -1
- data/ext/ffi_c/rbffi_endian.h +10 -1
- data/lib/1.8/ffi_c.so +0 -0
- data/lib/1.9/ffi_c.so +0 -0
- metadata +12 -8
data/Rakefile
CHANGED
@@ -77,7 +77,7 @@ PROJ.name = 'ffi'
|
|
77
77
|
PROJ.authors = 'Wayne Meissner'
|
78
78
|
PROJ.email = 'wmeissner@gmail.com'
|
79
79
|
PROJ.url = 'http://wiki.github.com/ffi/ffi'
|
80
|
-
PROJ.version = '1.1.
|
80
|
+
PROJ.version = '1.1.6.pre2'
|
81
81
|
PROJ.rubyforge.name = 'ffi'
|
82
82
|
PROJ.readme_file = 'README.rdoc'
|
83
83
|
|
data/ext/ffi_c/AbstractMemory.c
CHANGED
@@ -431,11 +431,6 @@ memory_put_string(VALUE self, VALUE offset, VALUE str)
|
|
431
431
|
|
432
432
|
checkWrite(ptr);
|
433
433
|
checkBounds(ptr, off, len + 1);
|
434
|
-
|
435
|
-
if (rb_safe_level() >= 1 && OBJ_TAINTED(str)) {
|
436
|
-
rb_raise(rb_eSecurityError, "Writing unsafe string to memory");
|
437
|
-
return Qnil;
|
438
|
-
}
|
439
434
|
|
440
435
|
memcpy(ptr->address + off, RSTRING_PTR(str), len);
|
441
436
|
*((char *) ptr->address + off + len) = '\0';
|
data/ext/ffi_c/Call.c
CHANGED
@@ -377,10 +377,7 @@ getPointer(VALUE value, int type)
|
|
377
377
|
return memory != NULL ? memory->address : NULL;
|
378
378
|
|
379
379
|
} else if (type == T_STRING) {
|
380
|
-
|
381
|
-
if (rb_safe_level() >= 1 && OBJ_TAINTED(value)) {
|
382
|
-
rb_raise(rb_eSecurityError, "Unsafe string parameter");
|
383
|
-
}
|
380
|
+
|
384
381
|
return StringValuePtr(value);
|
385
382
|
|
386
383
|
} else if (type == T_NIL) {
|
data/ext/ffi_c/MappedType.c
CHANGED
data/ext/ffi_c/MemoryPointer.c
CHANGED
@@ -38,7 +38,6 @@ typedef int bool;
|
|
38
38
|
|
39
39
|
|
40
40
|
static VALUE memptr_allocate(VALUE klass);
|
41
|
-
static void memptr_mark(Pointer* ptr);
|
42
41
|
static void memptr_release(Pointer* ptr);
|
43
42
|
static VALUE memptr_malloc(VALUE self, long size, long count, bool clear);
|
44
43
|
static VALUE memptr_free(VALUE self);
|
@@ -137,12 +136,6 @@ memptr_release(Pointer* ptr)
|
|
137
136
|
xfree(ptr);
|
138
137
|
}
|
139
138
|
|
140
|
-
static void
|
141
|
-
memptr_mark(Pointer* ptr)
|
142
|
-
{
|
143
|
-
rb_gc_mark(ptr->rbParent);
|
144
|
-
}
|
145
|
-
|
146
139
|
static VALUE
|
147
140
|
memptr_s_from_string(VALUE klass, VALUE to_str)
|
148
141
|
{
|
data/ext/ffi_c/MethodHandle.c
CHANGED
@@ -330,7 +330,10 @@ trampoline_size(void)
|
|
330
330
|
void
|
331
331
|
rbffi_MethodHandle_Init(VALUE module)
|
332
332
|
{
|
333
|
+
#ifndef CUSTOM_TRAMPOLINE
|
333
334
|
ffi_status ffiStatus;
|
335
|
+
#endif
|
336
|
+
|
334
337
|
defaultClosurePool = rbffi_ClosurePool_New((int) trampoline_size(), prep_trampoline, NULL);
|
335
338
|
|
336
339
|
#if defined(CUSTOM_TRAMPOLINE)
|
data/ext/ffi_c/StructLayout.c
CHANGED
@@ -432,7 +432,7 @@ struct_layout_union_bang(VALUE self)
|
|
432
432
|
return Qnil;
|
433
433
|
}
|
434
434
|
|
435
|
-
count = (int) layout->size / t->size;
|
435
|
+
count = (int) layout->size / (int) t->size;
|
436
436
|
xfree(layout->ffiTypes);
|
437
437
|
layout->ffiTypes = xcalloc(count + 1, sizeof(ffi_type *));
|
438
438
|
layout->base.ffiType->elements = layout->ffiTypes;
|
data/ext/ffi_c/Variadic.c
CHANGED
@@ -94,8 +94,10 @@ variadic_initialize(VALUE self, VALUE rbFunction, VALUE rbParameterTypes, VALUE
|
|
94
94
|
VALUE retval = Qnil;
|
95
95
|
VALUE convention = Qnil;
|
96
96
|
VALUE fixed = Qnil;
|
97
|
-
|
98
|
-
|
97
|
+
#if defined(_WIN32) || defined(__WIN32__)
|
98
|
+
VALUE rbConventionStr;
|
99
|
+
#endif
|
100
|
+
int i;
|
99
101
|
|
100
102
|
Check_Type(options, T_HASH);
|
101
103
|
convention = rb_hash_aref(options, ID2SYM(rb_intern("convention")));
|
data/ext/ffi_c/extconf.rb
CHANGED
@@ -4,7 +4,12 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
|
|
4
4
|
require 'mkmf'
|
5
5
|
require 'rbconfig'
|
6
6
|
dir_config("ffi_c")
|
7
|
-
|
7
|
+
|
8
|
+
# recent versions of ruby add restrictive ansi and warning flags on a whim - kill them all
|
9
|
+
$warnflags = ''
|
10
|
+
$CFLAGS.gsub!(/-ansi/, '')
|
11
|
+
$CFLAGS.gsub!(/-std=[^\s]+/, '')
|
12
|
+
|
8
13
|
if ENV['RUBY_CC_VERSION'].nil? && (pkg_config("libffi") ||
|
9
14
|
have_header("ffi.h") ||
|
10
15
|
find_header("ffi.h", "/usr/local/include", "/usr/include/ffi"))
|
@@ -30,11 +35,7 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
|
|
30
35
|
|
31
36
|
$CFLAGS << " -mwin32 " if RbConfig::CONFIG['host_os'] =~ /cygwin/
|
32
37
|
$LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if RbConfig::CONFIG['host_os'] =~ /mswin/
|
33
|
-
|
34
|
-
if (ENV['CC'] || RbConfig::MAKEFILE_CONFIG['CC']) =~ /gcc/
|
35
|
-
# $CFLAGS << " -Wno-declaration-after-statement "
|
36
|
-
end
|
37
|
-
|
38
|
+
|
38
39
|
create_makefile("ffi_c")
|
39
40
|
unless libffi_ok
|
40
41
|
File.open("Makefile", "a") do |mf|
|
data/ext/ffi_c/libffi.mk
CHANGED
data/ext/ffi_c/rbffi_endian.h
CHANGED
@@ -8,7 +8,16 @@
|
|
8
8
|
#include <sys/types.h>
|
9
9
|
|
10
10
|
#if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || defined(__GLIBC__)
|
11
|
-
#
|
11
|
+
# include <endian.h>
|
12
|
+
# if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
|
13
|
+
# define LITTLE_ENDIAN __LITTLE_ENDIAN
|
14
|
+
# endif
|
15
|
+
# if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
|
16
|
+
# define BIG_ENDIAN __BIG_ENDIAN
|
17
|
+
# endif
|
18
|
+
# if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
|
19
|
+
# define BYTE_ORDER __BYTE_ORDER
|
20
|
+
# endif
|
12
21
|
#endif
|
13
22
|
|
14
23
|
#ifdef __sun
|
data/lib/1.8/ffi_c.so
CHANGED
Binary file
|
data/lib/1.9/ffi_c.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 68069361
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
|
9
|
+
- 6
|
10
|
+
- pre
|
11
|
+
- 2
|
12
|
+
version: 1.1.6.pre2
|
11
13
|
platform: x86-mingw32
|
12
14
|
authors:
|
13
15
|
- Wayne Meissner
|
@@ -485,12 +487,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
485
487
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
486
488
|
none: false
|
487
489
|
requirements:
|
488
|
-
- - "
|
490
|
+
- - ">"
|
489
491
|
- !ruby/object:Gem::Version
|
490
|
-
hash:
|
492
|
+
hash: 25
|
491
493
|
segments:
|
492
|
-
-
|
493
|
-
|
494
|
+
- 1
|
495
|
+
- 3
|
496
|
+
- 1
|
497
|
+
version: 1.3.1
|
494
498
|
requirements: []
|
495
499
|
|
496
500
|
rubyforge_project: ffi
|