yakg 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +27 -19
- data/VERSION +1 -1
- data/lib/yakg.rb +6 -6
- data/spec/spec_helper.rb +1 -3
- data/spec/yakg_spec.rb +13 -13
- data/vendor/gems/README.md +26 -20
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/COPYING +49 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/LICENSE +24 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/README.md +7 -7
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/Rakefile +31 -41
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/ffi.gemspec +7 -6
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/autopointer.rb +24 -14
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/enum.rb +34 -22
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/errno.rb +43 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/ffi.rb +44 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/io.rb +62 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/library.rb +79 -44
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/managedstruct.rb +29 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/aarch64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-darwin/types.conf +126 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform.rb +35 -15
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/pointer.rb +22 -10
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/struct.rb +31 -14
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/struct_layout_builder.rb +46 -30
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/types.rb +24 -11
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/union.rb +43 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/variadic.rb +78 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi.rb +1 -9
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/Benchmark.c +52 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/BoolTest.c +34 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/BufferTest.c +31 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/ClosureTest.c +205 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/EnumTest.c +51 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/FunctionTest.c +70 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/GNUmakefile +149 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/GlobalVariable.c +62 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/LastErrorTest.c +21 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/NumberTest.c +132 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/PointerTest.c +63 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/ReferenceTest.c +23 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/StringTest.c +34 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/StructTest.c +243 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/UnionTest.c +43 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.10/libtest/VariadicTest.c +62 -0
- data/vendor/gems/ruby/2.0.0/specifications/ffi-1.9.10.gemspec +45 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/CHANGELOG +12 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/LICENSE +8 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/README.md +40 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/array.rb +123 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/base.rb +197 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/boolean.rb +25 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/data.rb +42 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/date.rb +32 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/dictionary.rb +114 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/extensions.rb +158 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/null.rb +11 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/number.rb +98 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/string.rb +91 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation/version.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/corefoundation-0.2.0/lib/corefoundation.rb +13 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/COPYING +49 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/LICENSE +24 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/README.md +109 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/Rakefile +210 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/ffi.gemspec +23 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/gen/Rakefile +30 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/autopointer.rb +194 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/buffer.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/callback.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/enum.rb +174 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/errno.rb +43 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/ffi.rb +44 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/io.rb +62 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/library.rb +524 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/managedstruct.rb +84 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/memorypointer.rb +1 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/aarch64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/arm-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/{2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-darwin → 2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-darwin}/types.conf +2 -2
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-freebsd/types.conf +152 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-gnu/types.conf +107 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-linux/types.conf +103 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-windows/types.conf +105 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/ia64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/mips-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/mipsel-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-aix/types.conf +180 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-linux/types.conf +100 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/s390-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/s390x-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-darwin/types.conf +126 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-windows/types.conf +27 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/platform.rb +159 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/pointer.rb +134 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/struct.rb +373 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/struct_layout_builder.rb +227 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/const_generator.rb +229 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/generator.rb +60 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/generator_task.rb +36 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/struct_generator.rb +194 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/tools/types_generator.rb +135 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/types.rb +190 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/union.rb +43 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/variadic.rb +78 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi.rb +20 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/Benchmark.c +52 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/BoolTest.c +34 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/BufferTest.c +31 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/ClosureTest.c +205 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/EnumTest.c +51 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/FunctionTest.c +70 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/GNUmakefile +149 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/GlobalVariable.c +62 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/LastErrorTest.c +21 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/NumberTest.c +132 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/PointerTest.c +63 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/ReferenceTest.c +23 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/StringTest.c +34 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/StructTest.c +243 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/UnionTest.c +43 -0
- data/vendor/gems/ruby/2.1.0/gems/ffi-1.9.10/libtest/VariadicTest.c +62 -0
- data/vendor/gems/ruby/2.1.0/specifications/corefoundation-0.2.0.gemspec +45 -0
- data/vendor/gems/ruby/2.1.0/specifications/ffi-1.9.10.gemspec +49 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/CHANGELOG +12 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/LICENSE +8 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/README.md +40 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/array.rb +123 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/base.rb +197 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/boolean.rb +25 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/data.rb +42 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/date.rb +32 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/dictionary.rb +114 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/extensions.rb +158 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/null.rb +11 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/number.rb +98 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/string.rb +91 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation/version.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/corefoundation-0.2.0/lib/corefoundation.rb +13 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/COPYING +49 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/LICENSE +24 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/README.md +109 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/Rakefile +210 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/ffi.gemspec +23 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/gen/Rakefile +30 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/autopointer.rb +194 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/buffer.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/callback.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/enum.rb +174 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/errno.rb +43 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/ffi.rb +44 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/io.rb +62 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/library.rb +524 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/managedstruct.rb +84 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/memorypointer.rb +1 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/aarch64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/arm-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-darwin/types.conf +100 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-freebsd/types.conf +152 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-gnu/types.conf +107 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-linux/types.conf +103 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-netbsd/types.conf +126 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/i386-windows/types.conf +105 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/ia64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/mips-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/mipsel-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-aix/types.conf +180 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc-linux/types.conf +100 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/s390-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/s390x-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/sparc-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-darwin/types.conf +126 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-linux/types.conf +102 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform/x86_64-windows/types.conf +27 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/platform.rb +159 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/pointer.rb +134 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/struct.rb +373 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/struct_layout_builder.rb +227 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/const_generator.rb +229 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/generator.rb +60 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/generator_task.rb +36 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/struct_generator.rb +194 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/tools/types_generator.rb +135 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/types.rb +190 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/union.rb +43 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/variadic.rb +78 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi.rb +20 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/Benchmark.c +52 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/BoolTest.c +34 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/BufferTest.c +31 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/ClosureTest.c +205 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/EnumTest.c +51 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/FunctionTest.c +70 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/GNUmakefile +149 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/GlobalVariable.c +62 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/LastErrorTest.c +21 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/NumberTest.c +132 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/PointerTest.c +63 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/ReferenceTest.c +23 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/StringTest.c +34 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/StructTest.c +243 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/UnionTest.c +43 -0
- data/vendor/gems/ruby/2.2.0/gems/ffi-1.9.10/libtest/VariadicTest.c +62 -0
- data/vendor/gems/ruby/2.2.0/specifications/corefoundation-0.2.0.gemspec +45 -0
- data/vendor/gems/ruby/2.2.0/specifications/ffi-1.9.10.gemspec +49 -0
- data/yakg.gemspec +3 -3
- metadata +288 -83
- data/vendor/gems/Gemfile +0 -4
- data/vendor/gems/Gemfile.lock +0 -13
- data/vendor/gems/installit.sh +0 -65
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/COPYING +0 -674
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/COPYING.LESSER +0 -165
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/History.txt +0 -1
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/LICENSE +0 -14
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/gen/log +0 -1
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/errno.rb +0 -33
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/ffi.iml +0 -11
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/ffi.rb +0 -33
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/io.rb +0 -52
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/union.rb +0 -32
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/variadic.rb +0 -65
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/specifications/ffi-1.9.0.gemspec +0 -42
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/gen/Rakefile +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/buffer.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/callback.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/memorypointer.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/arm-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-gnu/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-netbsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-openbsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/i386-windows/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/mips-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/s390-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-freebsd/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0/lib/ffi/platform/x86_64-openbsd → ffi-1.9.10/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/const_generator.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/generator.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/generator_task.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/struct_generator.rb +0 -0
- /data/vendor/gems/ruby/2.0.0/gems/{ffi-1.9.0 → ffi-1.9.10}/lib/ffi/tools/types_generator.rb +0 -0
- /data/vendor/gems/ruby/{2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-netbsd → 2.1.0/gems/ffi-1.9.10/lib/ffi/platform/i386-netbsd}/types.conf +0 -0
@@ -0,0 +1,104 @@
|
|
1
|
+
rbx.platform.typedef.__u_char = uchar
|
2
|
+
rbx.platform.typedef.__u_short = ushort
|
3
|
+
rbx.platform.typedef.__u_int = uint
|
4
|
+
rbx.platform.typedef.__u_long = ulong
|
5
|
+
rbx.platform.typedef.__int8_t = char
|
6
|
+
rbx.platform.typedef.__uint8_t = uchar
|
7
|
+
rbx.platform.typedef.__int16_t = short
|
8
|
+
rbx.platform.typedef.__uint16_t = ushort
|
9
|
+
rbx.platform.typedef.__int32_t = int
|
10
|
+
rbx.platform.typedef.__uint32_t = uint
|
11
|
+
rbx.platform.typedef.__int64_t = long
|
12
|
+
rbx.platform.typedef.__uint64_t = ulong
|
13
|
+
rbx.platform.typedef.__quad_t = long
|
14
|
+
rbx.platform.typedef.__u_quad_t = ulong
|
15
|
+
rbx.platform.typedef.__dev_t = ulong
|
16
|
+
rbx.platform.typedef.__uid_t = uint
|
17
|
+
rbx.platform.typedef.__gid_t = uint
|
18
|
+
rbx.platform.typedef.__ino_t = ulong
|
19
|
+
rbx.platform.typedef.__ino64_t = ulong
|
20
|
+
rbx.platform.typedef.__mode_t = uint
|
21
|
+
rbx.platform.typedef.__nlink_t = ulong
|
22
|
+
rbx.platform.typedef.__off_t = long
|
23
|
+
rbx.platform.typedef.__off64_t = long
|
24
|
+
rbx.platform.typedef.__pid_t = int
|
25
|
+
rbx.platform.typedef.__clock_t = long
|
26
|
+
rbx.platform.typedef.__rlim_t = ulong
|
27
|
+
rbx.platform.typedef.__rlim64_t = ulong
|
28
|
+
rbx.platform.typedef.__id_t = uint
|
29
|
+
rbx.platform.typedef.__time_t = long
|
30
|
+
rbx.platform.typedef.__useconds_t = uint
|
31
|
+
rbx.platform.typedef.__suseconds_t = long
|
32
|
+
rbx.platform.typedef.__daddr_t = int
|
33
|
+
rbx.platform.typedef.__key_t = int
|
34
|
+
rbx.platform.typedef.__clockid_t = int
|
35
|
+
rbx.platform.typedef.__timer_t = pointer
|
36
|
+
rbx.platform.typedef.__blksize_t = long
|
37
|
+
rbx.platform.typedef.__blkcnt_t = long
|
38
|
+
rbx.platform.typedef.__blkcnt64_t = long
|
39
|
+
rbx.platform.typedef.__fsblkcnt_t = ulong
|
40
|
+
rbx.platform.typedef.__fsblkcnt64_t = ulong
|
41
|
+
rbx.platform.typedef.__fsfilcnt_t = ulong
|
42
|
+
rbx.platform.typedef.__fsfilcnt64_t = ulong
|
43
|
+
rbx.platform.typedef.__fsword_t = long
|
44
|
+
rbx.platform.typedef.__ssize_t = long
|
45
|
+
rbx.platform.typedef.__syscall_slong_t = long
|
46
|
+
rbx.platform.typedef.__syscall_ulong_t = ulong
|
47
|
+
rbx.platform.typedef.__loff_t = long
|
48
|
+
rbx.platform.typedef.*__qaddr_t = long
|
49
|
+
rbx.platform.typedef.*__caddr_t = char
|
50
|
+
rbx.platform.typedef.__intptr_t = long
|
51
|
+
rbx.platform.typedef.__socklen_t = uint
|
52
|
+
rbx.platform.typedef.u_char = uchar
|
53
|
+
rbx.platform.typedef.u_short = ushort
|
54
|
+
rbx.platform.typedef.u_int = uint
|
55
|
+
rbx.platform.typedef.u_long = ulong
|
56
|
+
rbx.platform.typedef.quad_t = long
|
57
|
+
rbx.platform.typedef.u_quad_t = ulong
|
58
|
+
rbx.platform.typedef.loff_t = long
|
59
|
+
rbx.platform.typedef.ino_t = ulong
|
60
|
+
rbx.platform.typedef.dev_t = ulong
|
61
|
+
rbx.platform.typedef.gid_t = uint
|
62
|
+
rbx.platform.typedef.mode_t = uint
|
63
|
+
rbx.platform.typedef.nlink_t = ulong
|
64
|
+
rbx.platform.typedef.uid_t = uint
|
65
|
+
rbx.platform.typedef.off_t = long
|
66
|
+
rbx.platform.typedef.pid_t = int
|
67
|
+
rbx.platform.typedef.id_t = uint
|
68
|
+
rbx.platform.typedef.ssize_t = long
|
69
|
+
rbx.platform.typedef.daddr_t = int
|
70
|
+
rbx.platform.typedef.key_t = int
|
71
|
+
rbx.platform.typedef.clock_t = long
|
72
|
+
rbx.platform.typedef.time_t = long
|
73
|
+
rbx.platform.typedef.clockid_t = int
|
74
|
+
rbx.platform.typedef.timer_t = pointer
|
75
|
+
rbx.platform.typedef.size_t = ulong
|
76
|
+
rbx.platform.typedef.ulong = ulong
|
77
|
+
rbx.platform.typedef.ushort = ushort
|
78
|
+
rbx.platform.typedef.uint = uint
|
79
|
+
rbx.platform.typedef.int8_t = char
|
80
|
+
rbx.platform.typedef.int16_t = short
|
81
|
+
rbx.platform.typedef.int32_t = int
|
82
|
+
rbx.platform.typedef.int64_t = long_long
|
83
|
+
rbx.platform.typedef.u_int8_t = uchar
|
84
|
+
rbx.platform.typedef.u_int16_t = ushort
|
85
|
+
rbx.platform.typedef.u_int32_t = uint
|
86
|
+
rbx.platform.typedef.u_int64_t = ulong_long
|
87
|
+
rbx.platform.typedef.register_t = long
|
88
|
+
rbx.platform.typedef.__sig_atomic_t = int
|
89
|
+
rbx.platform.typedef.suseconds_t = long
|
90
|
+
rbx.platform.typedef.__fd_mask = long
|
91
|
+
rbx.platform.typedef.fd_mask = long
|
92
|
+
rbx.platform.typedef.blksize_t = long
|
93
|
+
rbx.platform.typedef.blkcnt_t = long
|
94
|
+
rbx.platform.typedef.fsblkcnt_t = ulong
|
95
|
+
rbx.platform.typedef.fsfilcnt_t = ulong
|
96
|
+
rbx.platform.typedef.pthread_t = ulong
|
97
|
+
rbx.platform.typedef.pthread_key_t = uint
|
98
|
+
rbx.platform.typedef.pthread_once_t = int
|
99
|
+
rbx.platform.typedef.socklen_t = uint
|
100
|
+
rbx.platform.typedef.sa_family_t = ushort
|
101
|
+
rbx.platform.typedef.rlim_t = ulong
|
102
|
+
rbx.platform.typedef.__rlimit_resource_t = int
|
103
|
+
rbx.platform.typedef.__rusage_who_t = int
|
104
|
+
rbx.platform.typedef.__priority_which_t = int
|
@@ -0,0 +1,126 @@
|
|
1
|
+
rbx.platform.typedef.__int8_t = char
|
2
|
+
rbx.platform.typedef.__uint8_t = uchar
|
3
|
+
rbx.platform.typedef.__int16_t = short
|
4
|
+
rbx.platform.typedef.__uint16_t = ushort
|
5
|
+
rbx.platform.typedef.__int32_t = int
|
6
|
+
rbx.platform.typedef.__uint32_t = uint
|
7
|
+
rbx.platform.typedef.__int64_t = long_long
|
8
|
+
rbx.platform.typedef.__uint64_t = ulong_long
|
9
|
+
rbx.platform.typedef.__darwin_intptr_t = long
|
10
|
+
rbx.platform.typedef.__darwin_natural_t = uint
|
11
|
+
rbx.platform.typedef.__darwin_ct_rune_t = int
|
12
|
+
rbx.platform.typedef.__darwin_ptrdiff_t = long
|
13
|
+
rbx.platform.typedef.__darwin_size_t = ulong
|
14
|
+
rbx.platform.typedef.__darwin_wchar_t = int
|
15
|
+
rbx.platform.typedef.__darwin_rune_t = int
|
16
|
+
rbx.platform.typedef.__darwin_wint_t = int
|
17
|
+
rbx.platform.typedef.__darwin_clock_t = ulong
|
18
|
+
rbx.platform.typedef.__darwin_socklen_t = uint
|
19
|
+
rbx.platform.typedef.__darwin_ssize_t = long
|
20
|
+
rbx.platform.typedef.__darwin_time_t = long
|
21
|
+
rbx.platform.typedef.int8_t = char
|
22
|
+
rbx.platform.typedef.int16_t = short
|
23
|
+
rbx.platform.typedef.int32_t = int
|
24
|
+
rbx.platform.typedef.int64_t = long_long
|
25
|
+
rbx.platform.typedef.u_int8_t = uchar
|
26
|
+
rbx.platform.typedef.u_int16_t = ushort
|
27
|
+
rbx.platform.typedef.u_int32_t = uint
|
28
|
+
rbx.platform.typedef.u_int64_t = ulong_long
|
29
|
+
rbx.platform.typedef.register_t = long_long
|
30
|
+
rbx.platform.typedef.intptr_t = long
|
31
|
+
rbx.platform.typedef.uintptr_t = ulong
|
32
|
+
rbx.platform.typedef.user_addr_t = ulong_long
|
33
|
+
rbx.platform.typedef.user_size_t = ulong_long
|
34
|
+
rbx.platform.typedef.user_ssize_t = long_long
|
35
|
+
rbx.platform.typedef.user_long_t = long_long
|
36
|
+
rbx.platform.typedef.user_ulong_t = ulong_long
|
37
|
+
rbx.platform.typedef.user_time_t = long_long
|
38
|
+
rbx.platform.typedef.user_off_t = long_long
|
39
|
+
rbx.platform.typedef.syscall_arg_t = ulong_long
|
40
|
+
rbx.platform.typedef.__darwin_blkcnt_t = long_long
|
41
|
+
rbx.platform.typedef.__darwin_blksize_t = int
|
42
|
+
rbx.platform.typedef.__darwin_dev_t = int
|
43
|
+
rbx.platform.typedef.__darwin_fsblkcnt_t = uint
|
44
|
+
rbx.platform.typedef.__darwin_fsfilcnt_t = uint
|
45
|
+
rbx.platform.typedef.__darwin_gid_t = uint
|
46
|
+
rbx.platform.typedef.__darwin_id_t = uint
|
47
|
+
rbx.platform.typedef.__darwin_ino64_t = ulong_long
|
48
|
+
rbx.platform.typedef.__darwin_ino_t = ulong_long
|
49
|
+
rbx.platform.typedef.__darwin_mach_port_name_t = uint
|
50
|
+
rbx.platform.typedef.__darwin_mach_port_t = uint
|
51
|
+
rbx.platform.typedef.__darwin_mode_t = ushort
|
52
|
+
rbx.platform.typedef.__darwin_off_t = long_long
|
53
|
+
rbx.platform.typedef.__darwin_pid_t = int
|
54
|
+
rbx.platform.typedef.__darwin_sigset_t = uint
|
55
|
+
rbx.platform.typedef.__darwin_suseconds_t = int
|
56
|
+
rbx.platform.typedef.__darwin_uid_t = uint
|
57
|
+
rbx.platform.typedef.__darwin_useconds_t = uint
|
58
|
+
rbx.platform.typedef.__darwin_uuid_t[16] = uchar
|
59
|
+
rbx.platform.typedef.__darwin_uuid_string_t[37] = char
|
60
|
+
rbx.platform.typedef.__darwin_pthread_key_t = ulong
|
61
|
+
rbx.platform.typedef.u_char = uchar
|
62
|
+
rbx.platform.typedef.u_short = ushort
|
63
|
+
rbx.platform.typedef.u_int = uint
|
64
|
+
rbx.platform.typedef.u_long = ulong
|
65
|
+
rbx.platform.typedef.ushort = ushort
|
66
|
+
rbx.platform.typedef.uint = uint
|
67
|
+
rbx.platform.typedef.u_quad_t = ulong_long
|
68
|
+
rbx.platform.typedef.quad_t = long_long
|
69
|
+
rbx.platform.typedef.qaddr_t = pointer
|
70
|
+
rbx.platform.typedef.caddr_t = string
|
71
|
+
rbx.platform.typedef.daddr_t = int
|
72
|
+
rbx.platform.typedef.dev_t = int
|
73
|
+
rbx.platform.typedef.fixpt_t = uint
|
74
|
+
rbx.platform.typedef.blkcnt_t = long_long
|
75
|
+
rbx.platform.typedef.blksize_t = int
|
76
|
+
rbx.platform.typedef.gid_t = uint
|
77
|
+
rbx.platform.typedef.in_addr_t = uint
|
78
|
+
rbx.platform.typedef.in_port_t = ushort
|
79
|
+
rbx.platform.typedef.ino_t = ulong_long
|
80
|
+
rbx.platform.typedef.ino64_t = ulong_long
|
81
|
+
rbx.platform.typedef.key_t = int
|
82
|
+
rbx.platform.typedef.mode_t = ushort
|
83
|
+
rbx.platform.typedef.nlink_t = ushort
|
84
|
+
rbx.platform.typedef.id_t = uint
|
85
|
+
rbx.platform.typedef.pid_t = int
|
86
|
+
rbx.platform.typedef.off_t = long_long
|
87
|
+
rbx.platform.typedef.segsz_t = int
|
88
|
+
rbx.platform.typedef.swblk_t = int
|
89
|
+
rbx.platform.typedef.uid_t = uint
|
90
|
+
rbx.platform.typedef.clock_t = ulong
|
91
|
+
rbx.platform.typedef.size_t = ulong
|
92
|
+
rbx.platform.typedef.ssize_t = long
|
93
|
+
rbx.platform.typedef.time_t = long
|
94
|
+
rbx.platform.typedef.useconds_t = uint
|
95
|
+
rbx.platform.typedef.suseconds_t = int
|
96
|
+
rbx.platform.typedef.rsize_t = ulong
|
97
|
+
rbx.platform.typedef.errno_t = int
|
98
|
+
rbx.platform.typedef.fd_mask = int
|
99
|
+
rbx.platform.typedef.pthread_key_t = ulong
|
100
|
+
rbx.platform.typedef.fsblkcnt_t = uint
|
101
|
+
rbx.platform.typedef.fsfilcnt_t = uint
|
102
|
+
rbx.platform.typedef.sa_family_t = uchar
|
103
|
+
rbx.platform.typedef.socklen_t = uint
|
104
|
+
rbx.platform.typedef.uint8_t = uchar
|
105
|
+
rbx.platform.typedef.uint16_t = ushort
|
106
|
+
rbx.platform.typedef.uint32_t = uint
|
107
|
+
rbx.platform.typedef.uint64_t = ulong_long
|
108
|
+
rbx.platform.typedef.int_least8_t = char
|
109
|
+
rbx.platform.typedef.int_least16_t = short
|
110
|
+
rbx.platform.typedef.int_least32_t = int
|
111
|
+
rbx.platform.typedef.int_least64_t = long_long
|
112
|
+
rbx.platform.typedef.uint_least8_t = uchar
|
113
|
+
rbx.platform.typedef.uint_least16_t = ushort
|
114
|
+
rbx.platform.typedef.uint_least32_t = uint
|
115
|
+
rbx.platform.typedef.uint_least64_t = ulong_long
|
116
|
+
rbx.platform.typedef.int_fast8_t = char
|
117
|
+
rbx.platform.typedef.int_fast16_t = short
|
118
|
+
rbx.platform.typedef.int_fast32_t = int
|
119
|
+
rbx.platform.typedef.int_fast64_t = long_long
|
120
|
+
rbx.platform.typedef.uint_fast8_t = uchar
|
121
|
+
rbx.platform.typedef.uint_fast16_t = ushort
|
122
|
+
rbx.platform.typedef.uint_fast32_t = uint
|
123
|
+
rbx.platform.typedef.uint_fast64_t = ulong_long
|
124
|
+
rbx.platform.typedef.intmax_t = long
|
125
|
+
rbx.platform.typedef.uintmax_t = ulong
|
126
|
+
rbx.platform.typedef.rlim_t = ulong_long
|
@@ -0,0 +1,128 @@
|
|
1
|
+
rbx.platform.typedef.__int8_t = char
|
2
|
+
rbx.platform.typedef.__uint8_t = uchar
|
3
|
+
rbx.platform.typedef.__int16_t = short
|
4
|
+
rbx.platform.typedef.__uint16_t = ushort
|
5
|
+
rbx.platform.typedef.__int32_t = int
|
6
|
+
rbx.platform.typedef.__uint32_t = uint
|
7
|
+
rbx.platform.typedef.__int64_t = long_long
|
8
|
+
rbx.platform.typedef.__uint64_t = ulong_long
|
9
|
+
rbx.platform.typedef.__int_least8_t = char
|
10
|
+
rbx.platform.typedef.__uint_least8_t = uchar
|
11
|
+
rbx.platform.typedef.__int_least16_t = short
|
12
|
+
rbx.platform.typedef.__uint_least16_t = ushort
|
13
|
+
rbx.platform.typedef.__int_least32_t = int
|
14
|
+
rbx.platform.typedef.__uint_least32_t = uint
|
15
|
+
rbx.platform.typedef.__int_least64_t = long_long
|
16
|
+
rbx.platform.typedef.__uint_least64_t = ulong_long
|
17
|
+
rbx.platform.typedef.__int_fast8_t = int
|
18
|
+
rbx.platform.typedef.__uint_fast8_t = uint
|
19
|
+
rbx.platform.typedef.__int_fast16_t = int
|
20
|
+
rbx.platform.typedef.__uint_fast16_t = uint
|
21
|
+
rbx.platform.typedef.__int_fast32_t = int
|
22
|
+
rbx.platform.typedef.__uint_fast32_t = uint
|
23
|
+
rbx.platform.typedef.__int_fast64_t = long_long
|
24
|
+
rbx.platform.typedef.__uint_fast64_t = ulong_long
|
25
|
+
rbx.platform.typedef.__intptr_t = long
|
26
|
+
rbx.platform.typedef.__uintptr_t = ulong
|
27
|
+
rbx.platform.typedef.__intmax_t = long_long
|
28
|
+
rbx.platform.typedef.__uintmax_t = ulong_long
|
29
|
+
rbx.platform.typedef.__register_t = int
|
30
|
+
rbx.platform.typedef.__vaddr_t = ulong
|
31
|
+
rbx.platform.typedef.__paddr_t = ulong
|
32
|
+
rbx.platform.typedef.__vsize_t = ulong
|
33
|
+
rbx.platform.typedef.__psize_t = ulong
|
34
|
+
rbx.platform.typedef.__clock_t = int
|
35
|
+
rbx.platform.typedef.__clockid_t = int
|
36
|
+
rbx.platform.typedef.__off_t = long_long
|
37
|
+
rbx.platform.typedef.__ptrdiff_t = long
|
38
|
+
rbx.platform.typedef.__size_t = ulong
|
39
|
+
rbx.platform.typedef.__ssize_t = long
|
40
|
+
rbx.platform.typedef.__time_t = int
|
41
|
+
rbx.platform.typedef.__timer_t = int
|
42
|
+
rbx.platform.typedef.__wchar_t = int
|
43
|
+
rbx.platform.typedef.__wint_t = int
|
44
|
+
rbx.platform.typedef.__rune_t = int
|
45
|
+
rbx.platform.typedef.__wctrans_t = pointer
|
46
|
+
rbx.platform.typedef.__wctype_t = pointer
|
47
|
+
rbx.platform.typedef.__cpuid_t = ulong
|
48
|
+
rbx.platform.typedef.__dev_t = int
|
49
|
+
rbx.platform.typedef.__fixpt_t = uint
|
50
|
+
rbx.platform.typedef.__gid_t = uint
|
51
|
+
rbx.platform.typedef.__id_t = uint
|
52
|
+
rbx.platform.typedef.__in_addr_t = uint
|
53
|
+
rbx.platform.typedef.__in_port_t = ushort
|
54
|
+
rbx.platform.typedef.__ino_t = uint
|
55
|
+
rbx.platform.typedef.__key_t = long
|
56
|
+
rbx.platform.typedef.__mode_t = uint
|
57
|
+
rbx.platform.typedef.__nlink_t = uint
|
58
|
+
rbx.platform.typedef.__pid_t = int
|
59
|
+
rbx.platform.typedef.__rlim_t = ulong_long
|
60
|
+
rbx.platform.typedef.__sa_family_t = uchar
|
61
|
+
rbx.platform.typedef.__segsz_t = int
|
62
|
+
rbx.platform.typedef.__socklen_t = uint
|
63
|
+
rbx.platform.typedef.__swblk_t = int
|
64
|
+
rbx.platform.typedef.__uid_t = uint
|
65
|
+
rbx.platform.typedef.__useconds_t = uint
|
66
|
+
rbx.platform.typedef.__suseconds_t = int
|
67
|
+
rbx.platform.typedef.u_char = uchar
|
68
|
+
rbx.platform.typedef.u_short = ushort
|
69
|
+
rbx.platform.typedef.u_int = uint
|
70
|
+
rbx.platform.typedef.u_long = ulong
|
71
|
+
rbx.platform.typedef.unchar = uchar
|
72
|
+
rbx.platform.typedef.ushort = ushort
|
73
|
+
rbx.platform.typedef.uint = uint
|
74
|
+
rbx.platform.typedef.ulong = ulong
|
75
|
+
rbx.platform.typedef.cpuid_t = ulong
|
76
|
+
rbx.platform.typedef.register_t = int
|
77
|
+
rbx.platform.typedef.int8_t = char
|
78
|
+
rbx.platform.typedef.uint8_t = uchar
|
79
|
+
rbx.platform.typedef.int16_t = short
|
80
|
+
rbx.platform.typedef.uint16_t = ushort
|
81
|
+
rbx.platform.typedef.int32_t = int
|
82
|
+
rbx.platform.typedef.uint32_t = uint
|
83
|
+
rbx.platform.typedef.int64_t = long_long
|
84
|
+
rbx.platform.typedef.uint64_t = ulong_long
|
85
|
+
rbx.platform.typedef.intptr_t = long
|
86
|
+
rbx.platform.typedef.uintptr_t = ulong
|
87
|
+
rbx.platform.typedef.u_int8_t = uchar
|
88
|
+
rbx.platform.typedef.u_int16_t = ushort
|
89
|
+
rbx.platform.typedef.u_int32_t = uint
|
90
|
+
rbx.platform.typedef.u_int64_t = ulong_long
|
91
|
+
rbx.platform.typedef.quad_t = long_long
|
92
|
+
rbx.platform.typedef.u_quad_t = ulong_long
|
93
|
+
rbx.platform.typedef.qaddr_t = pointer
|
94
|
+
rbx.platform.typedef.vaddr_t = ulong
|
95
|
+
rbx.platform.typedef.paddr_t = ulong
|
96
|
+
rbx.platform.typedef.vsize_t = ulong
|
97
|
+
rbx.platform.typedef.psize_t = ulong
|
98
|
+
rbx.platform.typedef.caddr_t = string
|
99
|
+
rbx.platform.typedef.daddr_t = int
|
100
|
+
rbx.platform.typedef.daddr32_t = int
|
101
|
+
rbx.platform.typedef.daddr64_t = long_long
|
102
|
+
rbx.platform.typedef.dev_t = int
|
103
|
+
rbx.platform.typedef.fixpt_t = uint
|
104
|
+
rbx.platform.typedef.gid_t = uint
|
105
|
+
rbx.platform.typedef.id_t = uint
|
106
|
+
rbx.platform.typedef.ino_t = uint
|
107
|
+
rbx.platform.typedef.key_t = long
|
108
|
+
rbx.platform.typedef.mode_t = uint
|
109
|
+
rbx.platform.typedef.nlink_t = uint
|
110
|
+
rbx.platform.typedef.pid_t = int
|
111
|
+
rbx.platform.typedef.rlim_t = ulong_long
|
112
|
+
rbx.platform.typedef.segsz_t = int
|
113
|
+
rbx.platform.typedef.swblk_t = int
|
114
|
+
rbx.platform.typedef.uid_t = uint
|
115
|
+
rbx.platform.typedef.useconds_t = uint
|
116
|
+
rbx.platform.typedef.suseconds_t = int
|
117
|
+
rbx.platform.typedef.in_addr_t = uint
|
118
|
+
rbx.platform.typedef.in_port_t = ushort
|
119
|
+
rbx.platform.typedef.sa_family_t = uchar
|
120
|
+
rbx.platform.typedef.socklen_t = uint
|
121
|
+
rbx.platform.typedef.clock_t = int
|
122
|
+
rbx.platform.typedef.clockid_t = int
|
123
|
+
rbx.platform.typedef.size_t = ulong
|
124
|
+
rbx.platform.typedef.ssize_t = long
|
125
|
+
rbx.platform.typedef.time_t = int
|
126
|
+
rbx.platform.typedef.timer_t = int
|
127
|
+
rbx.platform.typedef.off_t = long_long
|
128
|
+
rbx.platform.typedef.__fd_mask = int
|
@@ -1,23 +1,32 @@
|
|
1
1
|
#
|
2
2
|
# Copyright (C) 2008, 2009 Wayne Meissner
|
3
|
-
# All rights reserved.
|
4
3
|
#
|
5
4
|
# This file is part of ruby-ffi.
|
6
5
|
#
|
7
6
|
# All rights reserved.
|
8
7
|
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# published by the Free Software Foundation.
|
12
|
-
#
|
13
|
-
# This code is distributed in the hope that it will be useful, but WITHOUT
|
14
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
16
|
-
# version 3 for more details.
|
8
|
+
# Redistribution and use in source and binary forms, with or without
|
9
|
+
# modification, are permitted provided that the following conditions are met:
|
17
10
|
#
|
18
|
-
#
|
19
|
-
#
|
11
|
+
# * Redistributions of source code must retain the above copyright notice, this
|
12
|
+
# list of conditions and the following disclaimer.
|
13
|
+
# * Redistributions in binary form must reproduce the above copyright notice
|
14
|
+
# this list of conditions and the following disclaimer in the documentation
|
15
|
+
# and/or other materials provided with the distribution.
|
16
|
+
# * Neither the name of the Ruby FFI project nor the names of its contributors
|
17
|
+
# may be used to endorse or promote products derived from this software
|
18
|
+
# without specific prior written permission.
|
20
19
|
#
|
20
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
24
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.#
|
21
30
|
|
22
31
|
require 'rbconfig'
|
23
32
|
module FFI
|
@@ -33,6 +42,8 @@ module FFI
|
|
33
42
|
"darwin"
|
34
43
|
when /freebsd/
|
35
44
|
"freebsd"
|
45
|
+
when /netbsd/
|
46
|
+
"netbsd"
|
36
47
|
when /openbsd/
|
37
48
|
"openbsd"
|
38
49
|
when /sunos|solaris/
|
@@ -48,6 +59,8 @@ module FFI
|
|
48
59
|
"x86_64"
|
49
60
|
when /i?86|x86|i86pc/
|
50
61
|
"i386"
|
62
|
+
when /ppc64|powerpc64/
|
63
|
+
"powerpc64"
|
51
64
|
when /ppc|powerpc/
|
52
65
|
"powerpc"
|
53
66
|
else
|
@@ -66,19 +79,20 @@ module FFI
|
|
66
79
|
def self.is_os(os)
|
67
80
|
OS == os
|
68
81
|
end
|
69
|
-
|
82
|
+
|
70
83
|
NAME = "#{ARCH}-#{OS}"
|
71
84
|
IS_GNU = defined?(GNU_LIBC)
|
72
85
|
IS_LINUX = is_os("linux")
|
73
86
|
IS_MAC = is_os("darwin")
|
74
87
|
IS_FREEBSD = is_os("freebsd")
|
88
|
+
IS_NETBSD = is_os("netbsd")
|
75
89
|
IS_OPENBSD = is_os("openbsd")
|
90
|
+
IS_SOLARIS = is_os("solaris")
|
76
91
|
IS_WINDOWS = is_os("windows")
|
77
|
-
IS_BSD = IS_MAC || IS_FREEBSD || IS_OPENBSD
|
92
|
+
IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD
|
78
93
|
CONF_DIR = File.join(File.dirname(__FILE__), 'platform', NAME)
|
79
|
-
public
|
80
94
|
|
81
|
-
|
95
|
+
public
|
82
96
|
|
83
97
|
LIBPREFIX = case OS
|
84
98
|
when /windows/
|
@@ -129,6 +143,12 @@ module FFI
|
|
129
143
|
IS_MAC
|
130
144
|
end
|
131
145
|
|
146
|
+
# Test if current OS is Solaris (Sun OS)
|
147
|
+
# @return [Boolean]
|
148
|
+
def self.solaris?
|
149
|
+
IS_SOLARIS
|
150
|
+
end
|
151
|
+
|
132
152
|
# Test if current OS is a unix OS
|
133
153
|
# @return [Boolean]
|
134
154
|
def self.unix?
|
@@ -1,21 +1,33 @@
|
|
1
1
|
#
|
2
2
|
# Copyright (C) 2008, 2009 Wayne Meissner
|
3
3
|
# Copyright (c) 2007, 2008 Evan Phoenix
|
4
|
-
# All rights reserved.
|
5
4
|
#
|
6
5
|
# This file is part of ruby-ffi.
|
7
6
|
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# All rights reserved.
|
8
|
+
#
|
9
|
+
# Redistribution and use in source and binary forms, with or without
|
10
|
+
# modification, are permitted provided that the following conditions are met:
|
11
11
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
12
|
+
# * Redistributions of source code must retain the above copyright notice, this
|
13
|
+
# list of conditions and the following disclaimer.
|
14
|
+
# * Redistributions in binary form must reproduce the above copyright notice
|
15
|
+
# this list of conditions and the following disclaimer in the documentation
|
16
|
+
# and/or other materials provided with the distribution.
|
17
|
+
# * Neither the name of the Ruby FFI project nor the names of its contributors
|
18
|
+
# may be used to endorse or promote products derived from this software
|
19
|
+
# without specific prior written permission.
|
16
20
|
#
|
17
|
-
#
|
18
|
-
#
|
21
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
25
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
26
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
27
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
28
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
29
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
19
31
|
#
|
20
32
|
|
21
33
|
require 'ffi/platform'
|
@@ -3,21 +3,32 @@
|
|
3
3
|
# Copyright (C) 2008, 2009 Andrea Fazzi
|
4
4
|
# Copyright (C) 2008, 2009 Luc Heinrich
|
5
5
|
#
|
6
|
-
# All rights reserved.
|
7
|
-
#
|
8
6
|
# This file is part of ruby-ffi.
|
9
7
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
8
|
+
# All rights reserved.
|
9
|
+
#
|
10
|
+
# Redistribution and use in source and binary forms, with or without
|
11
|
+
# modification, are permitted provided that the following conditions are met:
|
13
12
|
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
13
|
+
# * Redistributions of source code must retain the above copyright notice, this
|
14
|
+
# list of conditions and the following disclaimer.
|
15
|
+
# * Redistributions in binary form must reproduce the above copyright notice
|
16
|
+
# this list of conditions and the following disclaimer in the documentation
|
17
|
+
# and/or other materials provided with the distribution.
|
18
|
+
# * Neither the name of the Ruby FFI project nor the names of its contributors
|
19
|
+
# may be used to endorse or promote products derived from this software
|
20
|
+
# without specific prior written permission.
|
18
21
|
#
|
19
|
-
#
|
20
|
-
#
|
22
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
25
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
26
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
27
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
28
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
29
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
30
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
31
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
21
32
|
#
|
22
33
|
|
23
34
|
require 'ffi/platform'
|
@@ -65,7 +76,7 @@ module FFI
|
|
65
76
|
end
|
66
77
|
|
67
78
|
def put(ptr, value)
|
68
|
-
raise TypeError, "wrong value type (expected #{type.struct_class}" unless value.is_a?(type.struct_class)
|
79
|
+
raise TypeError, "wrong value type (expected #{type.struct_class})" unless value.is_a?(type.struct_class)
|
69
80
|
ptr.slice(self.offset, self.size).__copy_from__(value.pointer, self.size)
|
70
81
|
end
|
71
82
|
end
|
@@ -245,9 +256,15 @@ module FFI
|
|
245
256
|
# :field2 => :pointer,
|
246
257
|
# :field3 => :string
|
247
258
|
# end
|
259
|
+
# @example Creating a layout with pointers to functions
|
260
|
+
# class MyFunctionTable < Struct
|
261
|
+
# layout :function1, callback([:int, :int], :int),
|
262
|
+
# :function2, callback([:pointer], :void),
|
263
|
+
# :field3, :string
|
264
|
+
# end
|
248
265
|
# @note Creating a layout from a hash +spec+ is supported only for Ruby 1.9.
|
249
266
|
def layout(*spec)
|
250
|
-
#
|
267
|
+
#raise RuntimeError, "struct layout already defined for #{self.inspect}" if defined?(@layout)
|
251
268
|
return @layout if spec.size == 0
|
252
269
|
|
253
270
|
builder = StructLayoutBuilder.new
|
@@ -324,7 +341,7 @@ module FFI
|
|
324
341
|
# @raise if Ruby 1.8
|
325
342
|
# Add hash +spec+ to +builder+.
|
326
343
|
def hash_layout(builder, spec)
|
327
|
-
raise "Ruby version not supported" if RUBY_VERSION =~ /1
|
344
|
+
raise "Ruby version not supported" if RUBY_VERSION =~ /1\.8\.*/
|
328
345
|
spec[0].each do |name, type|
|
329
346
|
builder.add name, find_field_type(type), nil
|
330
347
|
end
|