Sha256: 1330cfba23d6b25f768a714b68379036cbb3340fa358643951ff10dbc63b67c0

Contents?: true

Size: 334 Bytes

Versions: 44

Compression:

Stored size: 334 Bytes

Contents

# Demonstration program for FFI functionality.
#
# Basic demo of nested struct. Works in MRI, YARV, and JRuby. Does not work
# in Rubinius.
#
require 'ffi'

module LibTest
  class Foo < FFI::Struct
    layout :a, :int, :b, :int
  end

  class Bar < FFI::Struct
    layout :f, Foo, :g, :int
  end
end
puts LibTest::Bar.members.inspect

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
gir_ffi-0.7.6 examples/demo_ffi_nested_struct.rb
gir_ffi-0.7.5 examples/demo_ffi_nested_struct.rb
gir_ffi-0.7.4 examples/demo_ffi_nested_struct.rb
gir_ffi-0.7.3 examples/demo_ffi_nested_struct.rb
gir_ffi-0.7.2 examples/demo_ffi_nested_struct.rb
gir_ffi-0.7.1 examples/demo_ffi_nested_struct.rb
gir_ffi-0.7.0 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.7 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.6 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.5 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.4 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.3 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.2 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.1 examples/demo_ffi_nested_struct.rb
gir_ffi-0.6.0 examples/demo_ffi_nested_struct.rb
gir_ffi-0.5.2 examples/demo_ffi_nested_struct.rb
gir_ffi-0.5.1 examples/demo_ffi_nested_struct.rb
gir_ffi-0.5.0 examples/demo_ffi_nested_struct.rb
gir_ffi-0.4.3 examples/demo_ffi_nested_struct.rb
gir_ffi-0.4.2 examples/demo_ffi_nested_struct.rb