yakg 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/lib/yakg/backend/dbus-secret-service.rb +5 -0
- data/lib/yakg/backend/macos-keychain.rb +5 -4
- data/lib/yakg/backend/win32-dpapi.rb +150 -0
- data/lib/yakg/backend.rb +3 -0
- data/lib/yakg.rb +11 -2
- data/spec/yakg_spec.rb +4 -0
- data/vendor/gems/.gitignore +1 -0
- data/vendor/gems/README.md +49 -0
- data/vendor/gems/installit.sh +63 -35
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/.require_paths +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING.LESSER +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/History.txt +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/LICENSE +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/README.md +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1 → 1.8/gems/ffi-1.9.0}/Rakefile +2 -1
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/ffi.gemspec +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/Rakefile +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/log +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/autopointer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/buffer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/callback.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/enum.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/errno.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.iml +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/io.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/library.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/managedstruct.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/memorypointer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/arm-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1/lib/ffi/platform/i486-gnu → ffi-1.9.0/lib/ffi/platform/i386-gnu}/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-netbsd/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1/lib/ffi/platform/x86_64-freebsd → ffi-1.9.0/lib/ffi/platform/i386-openbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mips-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-darwin/types.conf +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1 → 1.8/gems/ffi-1.9.0}/lib/ffi/platform/x86_64-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1/lib/ffi/platform/i386-openbsd → ffi-1.9.0/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/{2.0.0/gems/ffi-1.8.1/lib/ffi/platform/x86_64-freebsd → 1.8/gems/ffi-1.9.0/lib/ffi/platform/x86_64-openbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/pointer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct_layout_builder.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/const_generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator_task.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/struct_generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/types_generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/types.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/union.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/variadic.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/ffi-1.9.0/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/1.8/specifications/{ffi-1.8.1.gemspec → ffi-1.9.0.gemspec} +4 -4
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING.LESSER +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/History.txt +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/LICENSE +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/README.md +0 -0
- data/vendor/gems/ruby/{2.0.0/gems/ffi-1.8.1 → 1.9.1/gems/ffi-1.9.0}/Rakefile +2 -1
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/ffi.gemspec +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/Rakefile +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/log +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/autopointer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/buffer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/callback.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/enum.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/errno.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.iml +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/io.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/library.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/managedstruct.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/memorypointer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/arm-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1/lib/ffi/platform/i486-gnu → ffi-1.9.0/lib/ffi/platform/i386-gnu}/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.8/gems/ffi-1.8.1/lib/ffi/platform/x86_64-netbsd → 1.9.1/gems/ffi-1.9.0/lib/ffi/platform/i386-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mips-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.8/gems/ffi-1.8.1/lib/ffi/platform/x86_64-openbsd → 1.9.1/gems/ffi-1.9.0/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/pointer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct_layout_builder.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/const_generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator_task.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/struct_generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/types_generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/types.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/union.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/variadic.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/1.9.1/specifications/corefoundation-0.2.0.gemspec +7 -9
- data/vendor/gems/ruby/1.9.1/specifications/ffi-1.9.0.gemspec +42 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING.LESSER +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/History.txt +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/LICENSE +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/README.md +0 -0
- data/vendor/gems/ruby/{1.8/gems/ffi-1.8.1 → 2.0.0/gems/ffi-1.9.0}/Rakefile +2 -1
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/ffi.gemspec +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/Rakefile +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/log +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/autopointer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/buffer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/callback.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/enum.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/errno.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.iml +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/io.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/library.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/managedstruct.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/memorypointer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/arm-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1/lib/ffi/platform/i486-gnu → ffi-1.9.0/lib/ffi/platform/i386-gnu}/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1 → 2.0.0/gems/ffi-1.9.0}/lib/ffi/platform/i386-netbsd/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-windows/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mips-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-darwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1/lib/ffi/platform/i386-openbsd → 2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/pointer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct_layout_builder.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/const_generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator_task.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/struct_generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/types_generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/types.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/union.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/variadic.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi.rb +0 -0
- 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/corefoundation-0.2.0.gemspec +1 -1
- data/vendor/gems/ruby/2.0.0/specifications/{ffi-1.8.1.gemspec → ffi-1.9.0.gemspec} +4 -4
- metadata +200 -277
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/array_spec.rb +0 -92
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/boolean_spec.rb +0 -24
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/data_spec.rb +0 -30
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/date_spec.rb +0 -25
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/dictionary_spec.rb +0 -81
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/extensions_spec.rb +0 -127
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/null_spec.rb +0 -7
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/number_spec.rb +0 -52
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/spec_helper.rb +0 -10
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/string_spec.rb +0 -48
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/Benchmark.c +0 -52
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/BoolTest.c +0 -31
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/BufferTest.c +0 -31
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/ClosureTest.c +0 -190
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/EnumTest.c +0 -34
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/FunctionTest.c +0 -58
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/GNUmakefile +0 -149
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/GlobalVariable.c +0 -62
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/LastErrorTest.c +0 -21
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/NumberTest.c +0 -132
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/PointerTest.c +0 -63
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/ReferenceTest.c +0 -23
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/StringTest.c +0 -34
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/StructTest.c +0 -240
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/UnionTest.c +0 -43
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/VariadicTest.c +0 -62
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/array_spec.rb +0 -92
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/boolean_spec.rb +0 -24
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/data_spec.rb +0 -30
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/date_spec.rb +0 -25
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/dictionary_spec.rb +0 -81
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/extensions_spec.rb +0 -127
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/null_spec.rb +0 -7
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/number_spec.rb +0 -52
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/spec_helper.rb +0 -10
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/string_spec.rb +0 -48
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/.require_paths +0 -2
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi/platform/x86_64-netbsd/types.conf +0 -126
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi/platform/x86_64-openbsd/types.conf +0 -126
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/Benchmark.c +0 -52
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/BoolTest.c +0 -31
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/BufferTest.c +0 -31
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/ClosureTest.c +0 -190
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/EnumTest.c +0 -34
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/FunctionTest.c +0 -58
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/GNUmakefile +0 -149
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/GlobalVariable.c +0 -62
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/LastErrorTest.c +0 -21
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/NumberTest.c +0 -132
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/PointerTest.c +0 -63
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/ReferenceTest.c +0 -23
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/StringTest.c +0 -34
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/StructTest.c +0 -240
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/UnionTest.c +0 -43
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/VariadicTest.c +0 -62
- data/vendor/gems/ruby/1.9.1/specifications/ffi-1.8.1.gemspec +0 -43
- data/vendor/gems/ruby/2.0.0/build_info/corefoundation-0.2.0.info +0 -1
- data/vendor/gems/ruby/2.0.0/build_info/ffi-1.8.1.info +0 -1
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/array_spec.rb +0 -92
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/boolean_spec.rb +0 -24
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/data_spec.rb +0 -30
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/date_spec.rb +0 -25
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/dictionary_spec.rb +0 -81
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/extensions_spec.rb +0 -127
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/null_spec.rb +0 -7
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/number_spec.rb +0 -52
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/spec_helper.rb +0 -10
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/string_spec.rb +0 -48
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/i386-netbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/i386-openbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/x86_64-netbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/x86_64-openbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/Benchmark.c +0 -52
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/BoolTest.c +0 -31
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/BufferTest.c +0 -31
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/ClosureTest.c +0 -190
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/EnumTest.c +0 -34
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/FunctionTest.c +0 -58
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/GNUmakefile +0 -149
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/GlobalVariable.c +0 -62
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/LastErrorTest.c +0 -21
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/NumberTest.c +0 -132
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/PointerTest.c +0 -63
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/ReferenceTest.c +0 -23
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/StringTest.c +0 -34
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/StructTest.c +0 -240
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/UnionTest.c +0 -43
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/VariadicTest.c +0 -62
@@ -1,23 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <stdint.h>
|
8
|
-
|
9
|
-
#define REF(T) void ref_##T(T arg, T* result) { *result = arg; }
|
10
|
-
#define ADD(T) void ref_add_##T(T arg1, T arg2, T* result) { *result = arg1 + arg2; }
|
11
|
-
#define SUB(T) void ref_sub_##T(T arg1, T arg2, T* result) { *result = arg1 - arg2; }
|
12
|
-
#define MUL(T) void ref_mul_##T(T arg1, T arg2, T* result) { *result = arg1 * arg2; }
|
13
|
-
#define DIV(T) void ref_div_##T(T arg1, T arg2, T* result) { *result = arg1 / arg2; }
|
14
|
-
#define TEST(T) ADD(T) SUB(T) MUL(T) DIV(T) REF(T)
|
15
|
-
|
16
|
-
TEST(int8_t);
|
17
|
-
TEST(int16_t);
|
18
|
-
TEST(int32_t);
|
19
|
-
TEST(int64_t);
|
20
|
-
TEST(float);
|
21
|
-
TEST(double);
|
22
|
-
|
23
|
-
|
@@ -1,34 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <string.h>
|
8
|
-
|
9
|
-
int
|
10
|
-
string_equals(const char* s1, const char* s2)
|
11
|
-
{
|
12
|
-
return strcmp(s1, s2) == 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
void
|
16
|
-
string_set(char* s1, const char* s2)
|
17
|
-
{
|
18
|
-
strcpy(s1, s2);
|
19
|
-
}
|
20
|
-
void
|
21
|
-
string_concat(char* dst, const char* src)
|
22
|
-
{
|
23
|
-
strcat(dst, src);
|
24
|
-
}
|
25
|
-
void
|
26
|
-
string_dummy(char* dummy)
|
27
|
-
{
|
28
|
-
}
|
29
|
-
const char*
|
30
|
-
string_null(void)
|
31
|
-
{
|
32
|
-
return NULL;
|
33
|
-
}
|
34
|
-
|
@@ -1,240 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <stdio.h>
|
8
|
-
#include <stdlib.h>
|
9
|
-
#include <stdbool.h>
|
10
|
-
#include <stdint.h>
|
11
|
-
#include <string.h>
|
12
|
-
#include <stdarg.h>
|
13
|
-
|
14
|
-
typedef char s8;
|
15
|
-
typedef short s16;
|
16
|
-
typedef int s32;
|
17
|
-
typedef long long s64;
|
18
|
-
typedef float f32;
|
19
|
-
typedef double f64;
|
20
|
-
|
21
|
-
typedef struct bugged_struct {
|
22
|
-
unsigned char visible;
|
23
|
-
unsigned int x;
|
24
|
-
unsigned int y;
|
25
|
-
short rx;
|
26
|
-
short ry;
|
27
|
-
unsigned char order;
|
28
|
-
unsigned char size;
|
29
|
-
} bugged_struct_t;
|
30
|
-
|
31
|
-
unsigned int
|
32
|
-
bugged_struct_size() {
|
33
|
-
return sizeof(bugged_struct_t);
|
34
|
-
}
|
35
|
-
|
36
|
-
struct test1 {
|
37
|
-
char b;
|
38
|
-
short s;
|
39
|
-
int i;
|
40
|
-
long long j;
|
41
|
-
long l;
|
42
|
-
float f;
|
43
|
-
double d;
|
44
|
-
char string[32];
|
45
|
-
};
|
46
|
-
|
47
|
-
struct struct_with_array {
|
48
|
-
char c;
|
49
|
-
int a[5];
|
50
|
-
};
|
51
|
-
|
52
|
-
struct nested {
|
53
|
-
int i;
|
54
|
-
};
|
55
|
-
|
56
|
-
struct container {
|
57
|
-
char first;
|
58
|
-
struct nested s;
|
59
|
-
};
|
60
|
-
|
61
|
-
int
|
62
|
-
struct_align_nested_struct(struct container* a) { return a->s.i; }
|
63
|
-
|
64
|
-
void*
|
65
|
-
struct_field_array(struct struct_with_array* s) { return &s->a; }
|
66
|
-
|
67
|
-
struct container*
|
68
|
-
struct_make_container_struct(int i)
|
69
|
-
{
|
70
|
-
static struct container cs;
|
71
|
-
memset(&cs, 0, sizeof(cs));
|
72
|
-
cs.first = 1;
|
73
|
-
cs.s.i = i;
|
74
|
-
return &cs;
|
75
|
-
}
|
76
|
-
|
77
|
-
#define T(x, type) \
|
78
|
-
type struct_field_##type(struct test1* t) { return t->x; } \
|
79
|
-
struct type##_align { char first; type value; }; \
|
80
|
-
type struct_align_##type(struct type##_align* a) { return a->value; }
|
81
|
-
|
82
|
-
T(b, s8);
|
83
|
-
T(s, s16);
|
84
|
-
T(i, s32);
|
85
|
-
T(j, s64);
|
86
|
-
T(f, f32);
|
87
|
-
T(d, f64);
|
88
|
-
T(l, long);
|
89
|
-
|
90
|
-
void
|
91
|
-
struct_set_string(struct test1* t, char* s)
|
92
|
-
{
|
93
|
-
strcpy(t->string, s);
|
94
|
-
}
|
95
|
-
|
96
|
-
struct test1*
|
97
|
-
struct_make_struct(char b, short s, int i, long long ll, float f, double d)
|
98
|
-
{
|
99
|
-
static struct test1 t;
|
100
|
-
memset(&t, 0, sizeof(t));
|
101
|
-
t.b = b;
|
102
|
-
t.s = s;
|
103
|
-
t.i = i;
|
104
|
-
t.j = ll;
|
105
|
-
t.f = f;
|
106
|
-
t.d = d;
|
107
|
-
return &t;
|
108
|
-
}
|
109
|
-
|
110
|
-
typedef int (*add_cb)(int a1, int a2);
|
111
|
-
typedef int (*sub_cb)(int a1, int a2);
|
112
|
-
struct test2 {
|
113
|
-
add_cb add_callback;
|
114
|
-
sub_cb sub_callback;
|
115
|
-
};
|
116
|
-
|
117
|
-
int
|
118
|
-
struct_call_add_cb(struct test2* t, int a1, int a2)
|
119
|
-
{
|
120
|
-
return t->add_callback(a1, a2);
|
121
|
-
}
|
122
|
-
|
123
|
-
int
|
124
|
-
struct_call_sub_cb(struct test2* t, int a1, int a2)
|
125
|
-
{
|
126
|
-
return t->sub_callback(a1, a2);
|
127
|
-
}
|
128
|
-
|
129
|
-
|
130
|
-
struct struct_with_array*
|
131
|
-
struct_make_struct_with_array(int a_0, int a_1, int a_2, int a_3, int a_4)
|
132
|
-
{
|
133
|
-
static struct struct_with_array s;
|
134
|
-
|
135
|
-
memset(&s, 0, sizeof(s));
|
136
|
-
|
137
|
-
s.a[0] = a_0;
|
138
|
-
s.a[1] = a_1;
|
139
|
-
s.a[2] = a_2;
|
140
|
-
s.a[3] = a_3;
|
141
|
-
s.a[4] = a_4;
|
142
|
-
|
143
|
-
return &s;
|
144
|
-
|
145
|
-
}
|
146
|
-
|
147
|
-
struct s8s32 {
|
148
|
-
char s8;
|
149
|
-
int s32;
|
150
|
-
};
|
151
|
-
|
152
|
-
struct s8s32
|
153
|
-
struct_return_s8s32()
|
154
|
-
{
|
155
|
-
struct s8s32 s;
|
156
|
-
s.s8 = 0x7f;
|
157
|
-
s.s32 = 0x12345678;
|
158
|
-
|
159
|
-
return s;
|
160
|
-
}
|
161
|
-
|
162
|
-
struct s8s32
|
163
|
-
struct_s8s32_set(char s8, int s32)
|
164
|
-
{
|
165
|
-
struct s8s32 s;
|
166
|
-
|
167
|
-
s.s8 = s8;
|
168
|
-
s.s32 = s32;
|
169
|
-
|
170
|
-
return s;
|
171
|
-
}
|
172
|
-
|
173
|
-
int
|
174
|
-
struct_s8s32_get_s8(struct s8s32 s)
|
175
|
-
{
|
176
|
-
return s.s8;
|
177
|
-
}
|
178
|
-
|
179
|
-
int
|
180
|
-
struct_s8s32_get_s32(struct s8s32 s)
|
181
|
-
{
|
182
|
-
return s.s32;
|
183
|
-
}
|
184
|
-
|
185
|
-
struct s8s32
|
186
|
-
struct_s8s32_ret_s8s32(struct s8s32 s)
|
187
|
-
{
|
188
|
-
return s;
|
189
|
-
}
|
190
|
-
|
191
|
-
// Pass a struct and an int arg, ensure the int arg is passed correctly
|
192
|
-
int
|
193
|
-
struct_s8s32_s32_ret_s32(struct s8s32 s, int s32)
|
194
|
-
{
|
195
|
-
return s32;
|
196
|
-
}
|
197
|
-
|
198
|
-
// Pass a struct and a long long arg, ensure the long long arg is passed correctly
|
199
|
-
long long
|
200
|
-
struct_s8s32_s64_ret_s64(struct s8s32 s, long long s64)
|
201
|
-
{
|
202
|
-
return s64;
|
203
|
-
}
|
204
|
-
|
205
|
-
// Pass a struct and a long long arg, ensure the long long arg is passed correctly
|
206
|
-
int
|
207
|
-
struct_s32_ptr_s32_s8s32_ret_s32(int s32a, void *ptr, int s32b, struct s8s32 s)
|
208
|
-
{
|
209
|
-
if (ptr != NULL) *(struct s8s32 *) ptr = s;
|
210
|
-
return s.s32;
|
211
|
-
}
|
212
|
-
|
213
|
-
// Pass a char *, copy into buffer length struct
|
214
|
-
struct struct_string {
|
215
|
-
char *bytes;
|
216
|
-
int len;
|
217
|
-
};
|
218
|
-
|
219
|
-
struct struct_string
|
220
|
-
struct_varargs_ret_struct_string(int len, ...)
|
221
|
-
{
|
222
|
-
struct struct_string ss;
|
223
|
-
va_list vl;
|
224
|
-
char* cp = NULL;
|
225
|
-
|
226
|
-
va_start(vl, len);
|
227
|
-
|
228
|
-
ss.len = len;
|
229
|
-
ss.bytes = va_arg(vl, char *);
|
230
|
-
if (ss.bytes != NULL) {
|
231
|
-
cp = malloc(strlen(ss.bytes) + 1);
|
232
|
-
strcpy(cp, ss.bytes);
|
233
|
-
ss.bytes = cp;
|
234
|
-
}
|
235
|
-
|
236
|
-
va_end(vl);
|
237
|
-
|
238
|
-
return ss;
|
239
|
-
}
|
240
|
-
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <stdio.h>
|
8
|
-
#include <stdbool.h>
|
9
|
-
#include <stdint.h>
|
10
|
-
#include <string.h>
|
11
|
-
#include <stdlib.h>
|
12
|
-
|
13
|
-
typedef char s8;
|
14
|
-
typedef short s16;
|
15
|
-
typedef int s32;
|
16
|
-
typedef long long s64;
|
17
|
-
typedef float f32;
|
18
|
-
typedef double f64;
|
19
|
-
|
20
|
-
typedef union union_test {
|
21
|
-
char b;
|
22
|
-
short s;
|
23
|
-
int i;
|
24
|
-
long long j;
|
25
|
-
long l;
|
26
|
-
float f;
|
27
|
-
double d;
|
28
|
-
s8 a[10];
|
29
|
-
} union_test_t;
|
30
|
-
|
31
|
-
#define T(x, type) \
|
32
|
-
type union_align_##type(union_test_t* u) { return u->x; } \
|
33
|
-
union_test_t* union_make_union_with_##type(type value) { static union_test_t u; u.x = value; return &u; }
|
34
|
-
|
35
|
-
T(b, s8);
|
36
|
-
T(s, s16);
|
37
|
-
T(i, s32);
|
38
|
-
T(j, s64);
|
39
|
-
T(f, f32);
|
40
|
-
T(d, f64);
|
41
|
-
T(l, long);
|
42
|
-
|
43
|
-
unsigned int union_size() { return sizeof(union_test_t); }
|
@@ -1,62 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <sys/types.h>
|
8
|
-
#include <stdio.h>
|
9
|
-
#include <stdint.h>
|
10
|
-
#include <string.h>
|
11
|
-
#include <stdarg.h>
|
12
|
-
|
13
|
-
typedef int8_t s8;
|
14
|
-
typedef uint8_t u8;
|
15
|
-
typedef int16_t s16;
|
16
|
-
typedef uint16_t u16;
|
17
|
-
typedef int32_t s32;
|
18
|
-
typedef uint32_t u32;
|
19
|
-
typedef int64_t s64;
|
20
|
-
typedef uint64_t u64;
|
21
|
-
typedef signed long sL;
|
22
|
-
typedef unsigned long uL;
|
23
|
-
typedef float F;
|
24
|
-
typedef double D;
|
25
|
-
|
26
|
-
void pack_varargs(s64* buf, const char* fmt, ...)
|
27
|
-
{
|
28
|
-
va_list ap;
|
29
|
-
int c;
|
30
|
-
double d;
|
31
|
-
va_start(ap, fmt);
|
32
|
-
while ((c = *fmt++)) {
|
33
|
-
switch (c) {
|
34
|
-
case 'c':
|
35
|
-
case 's':
|
36
|
-
case 'i':
|
37
|
-
*buf++ = va_arg(ap, s32);
|
38
|
-
break;
|
39
|
-
case 'l':
|
40
|
-
*buf++ = va_arg(ap, long);
|
41
|
-
break;
|
42
|
-
case 'j':
|
43
|
-
*buf++ = va_arg(ap, s64);
|
44
|
-
break;
|
45
|
-
case 'f':
|
46
|
-
case 'd':
|
47
|
-
d = va_arg(ap, double);
|
48
|
-
memcpy(buf++, &d, sizeof(d));
|
49
|
-
break;
|
50
|
-
case 'C':
|
51
|
-
case 'S':
|
52
|
-
case 'I':
|
53
|
-
*buf++ = va_arg(ap, u32);
|
54
|
-
break;
|
55
|
-
case 'L':
|
56
|
-
*buf++ = va_arg(ap, unsigned long);
|
57
|
-
break;
|
58
|
-
}
|
59
|
-
}
|
60
|
-
va_end(ap);
|
61
|
-
}
|
62
|
-
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{ffi}
|
5
|
-
s.version = "1.8.1"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Wayne Meissner"]
|
9
|
-
s.date = %q{2013-04-23}
|
10
|
-
s.description = %q{Ruby FFI library}
|
11
|
-
s.email = %q{wmeissner@gmail.com}
|
12
|
-
s.extensions = ["ext/ffi_c/extconf.rb"]
|
13
|
-
s.files = ["ffi.gemspec", "History.txt", "LICENSE", "COPYING", "COPYING.LESSER", "README.md", "Rakefile", "ext/ffi_c/AbstractMemory.c", "ext/ffi_c/AbstractMemory.h", "ext/ffi_c/ArrayType.c", "ext/ffi_c/ArrayType.h", "ext/ffi_c/Buffer.c", "ext/ffi_c/Call.c", "ext/ffi_c/Call.h", "ext/ffi_c/ClosurePool.c", "ext/ffi_c/ClosurePool.h", "ext/ffi_c/compat.h", "ext/ffi_c/cruby-ext.iml", "ext/ffi_c/DataConverter.c", "ext/ffi_c/DynamicLibrary.c", "ext/ffi_c/DynamicLibrary.h", "ext/ffi_c/extconf.rb", "ext/ffi_c/ffi.c", "ext/ffi_c/Function.c", "ext/ffi_c/Function.h", "ext/ffi_c/FunctionInfo.c", "ext/ffi_c/LastError.c", "ext/ffi_c/LastError.h", "ext/ffi_c/libffi/acinclude.m4", "ext/ffi_c/libffi/aclocal.m4", "ext/ffi_c/libffi/build-ios.sh", "ext/ffi_c/libffi/ChangeLog", "ext/ffi_c/libffi/ChangeLog.libffi", "ext/ffi_c/libffi/ChangeLog.libgcj", "ext/ffi_c/libffi/ChangeLog.v1", "ext/ffi_c/libffi/compile", "ext/ffi_c/libffi/config.guess", "ext/ffi_c/libffi/config.sub", "ext/ffi_c/libffi/configure", "ext/ffi_c/libffi/configure.ac", "ext/ffi_c/libffi/configure.host", "ext/ffi_c/libffi/depcomp", "ext/ffi_c/libffi/doc/libffi.info", "ext/ffi_c/libffi/doc/libffi.texi", "ext/ffi_c/libffi/doc/stamp-vti", "ext/ffi_c/libffi/doc/version.texi", "ext/ffi_c/libffi/fficonfig.h.in", "ext/ffi_c/libffi/fficonfig.hw", "ext/ffi_c/libffi/include/ffi.h.in", "ext/ffi_c/libffi/include/ffi.h.vc", "ext/ffi_c/libffi/include/ffi.h.vc64", "ext/ffi_c/libffi/include/ffi_common.h", "ext/ffi_c/libffi/include/Makefile.am", "ext/ffi_c/libffi/include/Makefile.in", "ext/ffi_c/libffi/install-sh", "ext/ffi_c/libffi/libffi.pc.in", "ext/ffi_c/libffi/libtool-version", "ext/ffi_c/libffi/LICENSE", "ext/ffi_c/libffi/ltmain.sh", "ext/ffi_c/libffi/m4/ax_cc_maxopt.m4", "ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4", "ext/ffi_c/libffi/m4/ax_check_compiler_flags.m4", "ext/ffi_c/libffi/m4/ax_compiler_vendor.m4", "ext/ffi_c/libffi/m4/ax_configure_args.m4", "ext/ffi_c/libffi/m4/ax_enable_builddir.m4", "ext/ffi_c/libffi/m4/ax_gcc_archflag.m4", "ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4", "ext/ffi_c/libffi/m4/libtool.m4", "ext/ffi_c/libffi/m4/ltoptions.m4", "ext/ffi_c/libffi/m4/ltsugar.m4", "ext/ffi_c/libffi/m4/ltversion.m4", "ext/ffi_c/libffi/m4/lt~obsolete.m4", "ext/ffi_c/libffi/Makefile.am", "ext/ffi_c/libffi/Makefile.in", "ext/ffi_c/libffi/Makefile.vc", "ext/ffi_c/libffi/Makefile.vc64", "ext/ffi_c/libffi/man/ffi.3", "ext/ffi_c/libffi/man/ffi_call.3", "ext/ffi_c/libffi/man/ffi_prep_cif.3", "ext/ffi_c/libffi/man/Makefile.am", "ext/ffi_c/libffi/man/Makefile.in", "ext/ffi_c/libffi/mdate-sh", "ext/ffi_c/libffi/missing", "ext/ffi_c/libffi/msvcc.sh", "ext/ffi_c/libffi/README", "ext/ffi_c/libffi/src/alpha/ffi.c", "ext/ffi_c/libffi/src/alpha/ffitarget.h", "ext/ffi_c/libffi/src/alpha/osf.S", "ext/ffi_c/libffi/src/arm/ffi.c", "ext/ffi_c/libffi/src/arm/ffitarget.h", "ext/ffi_c/libffi/src/arm/gentramp.sh", "ext/ffi_c/libffi/src/arm/sysv.S", "ext/ffi_c/libffi/src/arm/trampoline.S", "ext/ffi_c/libffi/src/avr32/ffi.c", "ext/ffi_c/libffi/src/avr32/ffitarget.h", "ext/ffi_c/libffi/src/avr32/sysv.S", "ext/ffi_c/libffi/src/closures.c", "ext/ffi_c/libffi/src/cris/ffi.c", "ext/ffi_c/libffi/src/cris/ffitarget.h", "ext/ffi_c/libffi/src/cris/sysv.S", "ext/ffi_c/libffi/src/debug.c", "ext/ffi_c/libffi/src/dlmalloc.c", "ext/ffi_c/libffi/src/frv/eabi.S", "ext/ffi_c/libffi/src/frv/ffi.c", "ext/ffi_c/libffi/src/frv/ffitarget.h", "ext/ffi_c/libffi/src/ia64/ffi.c", "ext/ffi_c/libffi/src/ia64/ffitarget.h", "ext/ffi_c/libffi/src/ia64/ia64_flags.h", "ext/ffi_c/libffi/src/ia64/unix.S", "ext/ffi_c/libffi/src/java_raw_api.c", "ext/ffi_c/libffi/src/m32r/ffi.c", "ext/ffi_c/libffi/src/m32r/ffitarget.h", "ext/ffi_c/libffi/src/m32r/sysv.S", "ext/ffi_c/libffi/src/m68k/ffi.c", "ext/ffi_c/libffi/src/m68k/ffitarget.h", "ext/ffi_c/libffi/src/m68k/sysv.S", "ext/ffi_c/libffi/src/mips/ffi.c", "ext/ffi_c/libffi/src/mips/ffitarget.h", "ext/ffi_c/libffi/src/mips/n32.S", "ext/ffi_c/libffi/src/mips/o32.S", "ext/ffi_c/libffi/src/moxie/eabi.S", "ext/ffi_c/libffi/src/moxie/ffi.c", "ext/ffi_c/libffi/src/pa/ffi.c", "ext/ffi_c/libffi/src/pa/ffitarget.h", "ext/ffi_c/libffi/src/pa/hpux32.S", "ext/ffi_c/libffi/src/pa/linux.S", "ext/ffi_c/libffi/src/powerpc/aix.S", "ext/ffi_c/libffi/src/powerpc/aix_closure.S", "ext/ffi_c/libffi/src/powerpc/asm.h", "ext/ffi_c/libffi/src/powerpc/darwin.S", "ext/ffi_c/libffi/src/powerpc/darwin_closure.S", "ext/ffi_c/libffi/src/powerpc/ffi.c", "ext/ffi_c/libffi/src/powerpc/ffi_darwin.c", "ext/ffi_c/libffi/src/powerpc/ffitarget.h", "ext/ffi_c/libffi/src/powerpc/linux64.S", "ext/ffi_c/libffi/src/powerpc/linux64_closure.S", "ext/ffi_c/libffi/src/powerpc/ppc_closure.S", "ext/ffi_c/libffi/src/powerpc/sysv.S", "ext/ffi_c/libffi/src/prep_cif.c", "ext/ffi_c/libffi/src/raw_api.c", "ext/ffi_c/libffi/src/s390/ffi.c", "ext/ffi_c/libffi/src/s390/ffitarget.h", "ext/ffi_c/libffi/src/s390/sysv.S", "ext/ffi_c/libffi/src/sh/ffi.c", "ext/ffi_c/libffi/src/sh/ffitarget.h", "ext/ffi_c/libffi/src/sh/sysv.S", "ext/ffi_c/libffi/src/sh64/ffi.c", "ext/ffi_c/libffi/src/sh64/ffitarget.h", "ext/ffi_c/libffi/src/sh64/sysv.S", "ext/ffi_c/libffi/src/sparc/ffi.c", "ext/ffi_c/libffi/src/sparc/ffitarget.h", "ext/ffi_c/libffi/src/sparc/v8.S", "ext/ffi_c/libffi/src/sparc/v9.S", "ext/ffi_c/libffi/src/types.c", "ext/ffi_c/libffi/src/x86/darwin.S", "ext/ffi_c/libffi/src/x86/darwin64.S", "ext/ffi_c/libffi/src/x86/ffi.c", "ext/ffi_c/libffi/src/x86/ffi64.c", "ext/ffi_c/libffi/src/x86/ffitarget.h", "ext/ffi_c/libffi/src/x86/freebsd.S", "ext/ffi_c/libffi/src/x86/sysv.S", "ext/ffi_c/libffi/src/x86/unix64.S", "ext/ffi_c/libffi/src/x86/win32.S", "ext/ffi_c/libffi/src/x86/win64.S", "ext/ffi_c/libffi/testsuite/config/default.exp", "ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp", "ext/ffi_c/libffi/testsuite/lib/libffi.exp", "ext/ffi_c/libffi/testsuite/lib/target-libpath.exp", "ext/ffi_c/libffi/testsuite/lib/wrapper.exp", "ext/ffi_c/libffi/testsuite/libffi.call/call.exp", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn0.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn1.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn2.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn3.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn4.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn5.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_fn6.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_loc_fn0.c", "ext/ffi_c/libffi/testsuite/libffi.call/closure_stdcall.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_double.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_float.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_schar.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshort.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshortchar.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_uchar.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushort.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushortchar.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_schar.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_sint.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_sshort.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_uint.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c", "ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort.c", "ext/ffi_c/libffi/testsuite/libffi.call/err_bad_abi.c", "ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c", "ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h", "ext/ffi_c/libffi/testsuite/libffi.call/float.c", "ext/ffi_c/libffi/testsuite/libffi.call/float1.c", "ext/ffi_c/libffi/testsuite/libffi.call/float2.c", "ext/ffi_c/libffi/testsuite/libffi.call/float3.c", "ext/ffi_c/libffi/testsuite/libffi.call/float4.c", "ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c", "ext/ffi_c/libffi/testsuite/libffi.call/many.c", "ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c", "ext/ffi_c/libffi/testsuite/libffi.call/negint.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c", "ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c", "ext/ffi_c/libffi/testsuite/libffi.call/problem1.c", "ext/ffi_c/libffi/testsuite/libffi.call/promotion.c", "ext/ffi_c/libffi/testsuite/libffi.call/pyobjc-tc.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_fl.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_fl1.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_fl2.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_fl3.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c", "ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c", "ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c", "ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c", "ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c", "ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c", "ext/ffi_c/libffi/testsuite/libffi.call/strlen.c", "ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct1.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct2.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct3.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct4.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct5.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct6.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct7.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct8.c", "ext/ffi_c/libffi/testsuite/libffi.call/struct9.c", "ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c", "ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h", "ext/ffi_c/libffi/testsuite/libffi.special/special.exp", "ext/ffi_c/libffi/testsuite/libffi.special/unwindtest.cc", "ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc", "ext/ffi_c/libffi/testsuite/Makefile.am", "ext/ffi_c/libffi/testsuite/Makefile.in", "ext/ffi_c/libffi/texinfo.tex", "ext/ffi_c/libffi.bsd.mk", "ext/ffi_c/libffi.darwin.mk", "ext/ffi_c/libffi.gnu.mk", "ext/ffi_c/libffi.mk", "ext/ffi_c/libffi.vc.mk", "ext/ffi_c/libffi.vc64.mk", "ext/ffi_c/LongDouble.c", "ext/ffi_c/LongDouble.h", "ext/ffi_c/MappedType.c", "ext/ffi_c/MappedType.h", "ext/ffi_c/MemoryPointer.c", "ext/ffi_c/MemoryPointer.h", "ext/ffi_c/MethodHandle.c", "ext/ffi_c/MethodHandle.h", "ext/ffi_c/Platform.c", "ext/ffi_c/Platform.h", "ext/ffi_c/Pointer.c", "ext/ffi_c/Pointer.h", "ext/ffi_c/rbffi.h", "ext/ffi_c/rbffi_endian.h", "ext/ffi_c/Struct.c", "ext/ffi_c/Struct.h", "ext/ffi_c/StructByReference.c", "ext/ffi_c/StructByReference.h", "ext/ffi_c/StructByValue.c", "ext/ffi_c/StructByValue.h", "ext/ffi_c/StructLayout.c", "ext/ffi_c/Thread.c", "ext/ffi_c/Thread.h", "ext/ffi_c/Type.c", "ext/ffi_c/Type.h", "ext/ffi_c/Types.c", "ext/ffi_c/Types.h", "ext/ffi_c/Variadic.c", "ext/ffi_c/win32/stdbool.h", "ext/ffi_c/win32/stdint.h", "gen/log", "gen/Rakefile", "lib/ffi/autopointer.rb", "lib/ffi/buffer.rb", "lib/ffi/callback.rb", "lib/ffi/enum.rb", "lib/ffi/errno.rb", "lib/ffi/ffi.iml", "lib/ffi/ffi.rb", "lib/ffi/io.rb", "lib/ffi/library.rb", "lib/ffi/managedstruct.rb", "lib/ffi/memorypointer.rb", "lib/ffi/platform/arm-linux/types.conf", "lib/ffi/platform/i386-cygwin/types.conf", "lib/ffi/platform/i386-darwin/types.conf", "lib/ffi/platform/i386-freebsd/types.conf", "lib/ffi/platform/i386-linux/types.conf", "lib/ffi/platform/i386-netbsd/types.conf", "lib/ffi/platform/i386-openbsd/types.conf", "lib/ffi/platform/i386-solaris/types.conf", "lib/ffi/platform/i386-windows/types.conf", "lib/ffi/platform/i486-gnu/types.conf", "lib/ffi/platform/ia64-linux/types.conf", "lib/ffi/platform/mips-linux/types.conf", "lib/ffi/platform/mipsel-linux/types.conf", "lib/ffi/platform/powerpc-aix/types.conf", "lib/ffi/platform/powerpc-darwin/types.conf", "lib/ffi/platform/powerpc-linux/types.conf", "lib/ffi/platform/s390-linux/types.conf", "lib/ffi/platform/s390x-linux/types.conf", "lib/ffi/platform/sparc-linux/types.conf", "lib/ffi/platform/sparc-solaris/types.conf", "lib/ffi/platform/sparcv9-solaris/types.conf", "lib/ffi/platform/x86_64-darwin/types.conf", "lib/ffi/platform/x86_64-freebsd/types.conf", "lib/ffi/platform/x86_64-linux/types.conf", "lib/ffi/platform/x86_64-netbsd/types.conf", "lib/ffi/platform/x86_64-openbsd/types.conf", "lib/ffi/platform/x86_64-solaris/types.conf", "lib/ffi/platform/x86_64-windows/types.conf", "lib/ffi/platform.rb", "lib/ffi/pointer.rb", "lib/ffi/struct.rb", "lib/ffi/struct_layout_builder.rb", "lib/ffi/tools/const_generator.rb", "lib/ffi/tools/generator.rb", "lib/ffi/tools/generator_task.rb", "lib/ffi/tools/struct_generator.rb", "lib/ffi/tools/types_generator.rb", "lib/ffi/types.rb", "lib/ffi/union.rb", "lib/ffi/variadic.rb", "lib/ffi/version.rb", "lib/ffi.rb", "spec/ffi/async_callback_spec.rb", "spec/ffi/bool_spec.rb", "spec/ffi/buffer_spec.rb", "spec/ffi/callback_spec.rb", "spec/ffi/custom_param_type.rb", "spec/ffi/custom_type_spec.rb", "spec/ffi/dup_spec.rb", "spec/ffi/enum_spec.rb", "spec/ffi/errno_spec.rb", "spec/ffi/ffi_spec.rb", "spec/ffi/function_spec.rb", "spec/ffi/library_spec.rb", "spec/ffi/long_double.rb", "spec/ffi/managed_struct_spec.rb", "spec/ffi/number_spec.rb", "spec/ffi/pointer_spec.rb", "spec/ffi/rbx/attach_function_spec.rb", "spec/ffi/rbx/memory_pointer_spec.rb", "spec/ffi/rbx/spec_helper.rb", "spec/ffi/rbx/struct_spec.rb", "spec/ffi/spec.iml", "spec/ffi/spec_helper.rb", "spec/ffi/string_spec.rb", "spec/ffi/strptr_spec.rb", "spec/ffi/struct_by_ref_spec.rb", "spec/ffi/struct_callback_spec.rb", "spec/ffi/struct_initialize_spec.rb", "spec/ffi/struct_packed_spec.rb", "spec/ffi/struct_spec.rb", "spec/ffi/typedef_spec.rb", "spec/ffi/union_spec.rb", "spec/ffi/variadic_spec.rb", "spec/spec.opts", "libtest/Benchmark.c", "libtest/BoolTest.c", "libtest/BufferTest.c", "libtest/ClosureTest.c", "libtest/EnumTest.c", "libtest/FunctionTest.c", "libtest/GlobalVariable.c", "libtest/GNUmakefile", "libtest/LastErrorTest.c", "libtest/NumberTest.c", "libtest/PointerTest.c", "libtest/ReferenceTest.c", "libtest/StringTest.c", "libtest/StructTest.c", "libtest/UnionTest.c", "libtest/VariadicTest.c"]
|
14
|
-
s.homepage = %q{http://wiki.github.com/ffi/ffi}
|
15
|
-
s.licenses = ["LGPL-3"]
|
16
|
-
s.rdoc_options = ["--exclude=ext/ffi_c/.*\\.o$", "--exclude=ffi_c\\.(bundle|so)$"]
|
17
|
-
s.require_paths = ["lib", "ext/ffi_c"]
|
18
|
-
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
19
|
-
s.rubygems_version = %q{1.3.7}
|
20
|
-
s.summary = %q{Ruby FFI}
|
21
|
-
|
22
|
-
if s.respond_to? :specification_version then
|
23
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
|
-
s.specification_version = 4
|
25
|
-
|
26
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_development_dependency(%q<rake>, [">= 0"])
|
28
|
-
s.add_development_dependency(%q<rake-compiler>, [">= 0.6.0"])
|
29
|
-
s.add_development_dependency(%q<rspec>, [">= 0"])
|
30
|
-
s.add_development_dependency(%q<rubygems-tasks>, [">= 0"])
|
31
|
-
else
|
32
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
33
|
-
s.add_dependency(%q<rake-compiler>, [">= 0.6.0"])
|
34
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
35
|
-
s.add_dependency(%q<rubygems-tasks>, [">= 0"])
|
36
|
-
end
|
37
|
-
else
|
38
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
39
|
-
s.add_dependency(%q<rake-compiler>, [">= 0.6.0"])
|
40
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
41
|
-
s.add_dependency(%q<rubygems-tasks>, [">= 0"])
|
42
|
-
end
|
43
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1,92 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe CF::Array do
|
4
|
-
describe 'mutable' do
|
5
|
-
subject { CF::Array.mutable}
|
6
|
-
|
7
|
-
it { should be_a(CF::Array)}
|
8
|
-
it { should be_mutable}
|
9
|
-
|
10
|
-
describe '[]=' do
|
11
|
-
it 'should raise when trying to store a non cf value' do
|
12
|
-
expect {subject[0] = 123}.to raise_error(TypeError)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe '<<' do
|
17
|
-
it 'should raise when trying to store a non cf value' do
|
18
|
-
expect {subject << 123}.to raise_error(TypeError)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
describe 'immutable' do
|
25
|
-
it 'should raise if all of the array elements are not cf values' do
|
26
|
-
expect {CF::Array.immutable([CF::Boolean::TRUE, 1])}.to raise_error(TypeError)
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'should return an immutable cfarray' do
|
30
|
-
CF::Array.immutable([CF::Boolean::TRUE]).should be_a(CF::Array)
|
31
|
-
end
|
32
|
-
|
33
|
-
context 'with an immutable array' do
|
34
|
-
subject { CF::Array.immutable([CF::Boolean::TRUE, CF::String.from_string('123')])}
|
35
|
-
|
36
|
-
describe '[]=' do
|
37
|
-
it 'should raise TypeError' do
|
38
|
-
expect {subject[0] = CF::Boolean::TRUE}.to raise_error(TypeError)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe '<<' do
|
43
|
-
it 'should raise TypeError' do
|
44
|
-
expect {subject << CF::Boolean::TRUE}.to raise_error(TypeError)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
context "with an array" do
|
51
|
-
subject { CF::Array.immutable([CF::Boolean::TRUE, CF::String.from_string('123')])}
|
52
|
-
|
53
|
-
describe '[]' do
|
54
|
-
it 'should return the typecast value at the index' do
|
55
|
-
subject[1].should be_a(CF::String)
|
56
|
-
subject[1].should == CF::String.from_string('123')
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
|
61
|
-
describe 'length' do
|
62
|
-
it 'should return the count of items in the dictionary' do
|
63
|
-
subject.length.should == 2
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
describe 'to_ruby' do
|
68
|
-
it 'should return the result of calling to ruby on its contents' do
|
69
|
-
subject.to_ruby.should == [true, '123']
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
describe 'each' do
|
74
|
-
it 'should iterate over each value' do
|
75
|
-
values = []
|
76
|
-
subject.each do |v|
|
77
|
-
values << v
|
78
|
-
end
|
79
|
-
values[0].should == CF::Boolean::TRUE
|
80
|
-
values[1].should == CF::String.from_string('123')
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
it 'should be enumerable' do
|
85
|
-
values = {}
|
86
|
-
subject.each_with_index do |value, index|
|
87
|
-
values[index] = value
|
88
|
-
end
|
89
|
-
values.should == {0 => CF::Boolean::TRUE, 1 => CF::String.from_string('123')}
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe CF do
|
4
|
-
|
5
|
-
|
6
|
-
describe CF::Boolean do
|
7
|
-
describe 'value' do
|
8
|
-
it 'should return true for CF::Boolean::TRUE' do
|
9
|
-
CF::Boolean::TRUE.value.should == true
|
10
|
-
end
|
11
|
-
it 'should return false for CF::Boolean::FALSE' do
|
12
|
-
CF::Boolean::FALSE.value.should == false
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe 'to_ruby' do
|
17
|
-
it 'should behave like value' do
|
18
|
-
CF::Boolean::FALSE.to_ruby.should == false
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
|
4
|
-
describe CF::Data do
|
5
|
-
subject {CF::Data.from_string('A CF string')}
|
6
|
-
describe '#to_s' do
|
7
|
-
it 'should return a binary ruby string' do
|
8
|
-
ruby_string = subject.to_s
|
9
|
-
ruby_string.should == 'A CF string'
|
10
|
-
if CF::String::HAS_ENCODING
|
11
|
-
ruby_string.encoding.should == Encoding::ASCII_8BIT
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe '#size' do
|
17
|
-
it 'should return the size in bytes of the cfdata' do
|
18
|
-
subject.size.should == 11
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
describe 'to_ruby' do
|
23
|
-
it 'should behave like to_s' do
|
24
|
-
subject.to_ruby.should == 'A CF string'
|
25
|
-
if 'A CF string'.respond_to? "encoding"
|
26
|
-
subject.to_ruby.encoding.should == Encoding::ASCII_8BIT
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe CF::Date do
|
4
|
-
describe('from_time') do
|
5
|
-
it 'should create a cf date from a time' do
|
6
|
-
CF::Date.from_time(Time.now).should be_a(CF::Date)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe('to_time') do
|
11
|
-
it 'should return a time' do
|
12
|
-
t = CF::Date.from_time(Time.now).to_time
|
13
|
-
t.should be_a(Time)
|
14
|
-
t.should be_within(0.01).of(Time.now)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe 'to_ruby' do
|
19
|
-
it 'should behave like to_time' do
|
20
|
-
t = CF::Date.from_time(Time.now).to_ruby
|
21
|
-
t.should be_a(Time)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|