ffi 1.17.2 → 1.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +25 -0
  4. data/Gemfile +7 -4
  5. data/README.md +1 -0
  6. data/Rakefile +7 -4
  7. data/Steepfile +8 -0
  8. data/ext/ffi_c/DynamicLibrary.c +1 -1
  9. data/ext/ffi_c/Function.c +2 -0
  10. data/ext/ffi_c/MethodHandle.c +4 -2
  11. data/ext/ffi_c/libffi/.ci/Containerfile.ppc64le +12 -0
  12. data/ext/ffi_c/libffi/.ci/build.sh +38 -33
  13. data/ext/ffi_c/libffi/.ci/install.sh +46 -50
  14. data/ext/ffi_c/libffi/.ci/site.exp +6 -0
  15. data/ext/ffi_c/libffi/.gail-labels +44 -0
  16. data/ext/ffi_c/libffi/.github/workflows/build.yml +212 -333
  17. data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +58 -3
  18. data/ext/ffi_c/libffi/.github/workflows/label-new-issue.yaml +15 -0
  19. data/ext/ffi_c/libffi/.github/workflows/tarball.yml +55 -0
  20. data/ext/ffi_c/libffi/LICENSE +1 -1
  21. data/ext/ffi_c/libffi/Makefile.am +17 -13
  22. data/ext/ffi_c/libffi/Makefile.in +37 -30
  23. data/ext/ffi_c/libffi/README.md +22 -3
  24. data/ext/ffi_c/libffi/configure +105 -121
  25. data/ext/ffi_c/libffi/configure.ac +21 -8
  26. data/ext/ffi_c/libffi/configure.host +6 -1
  27. data/ext/ffi_c/libffi/doc/Makefile.in +3 -0
  28. data/ext/ffi_c/libffi/doc/libffi.texi +24 -1
  29. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  30. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -28
  31. data/ext/ffi_c/libffi/include/Makefile.in +3 -0
  32. data/ext/ffi_c/libffi/include/ffi.h.in +19 -1
  33. data/ext/ffi_c/libffi/libffi.map.in +13 -1
  34. data/ext/ffi_c/libffi/libtool-version +1 -1
  35. data/ext/ffi_c/libffi/m4/asmcfi.m4 +28 -11
  36. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +13 -3
  37. data/ext/ffi_c/libffi/man/Makefile.in +3 -0
  38. data/ext/ffi_c/libffi/src/aarch64/sysv.S +7 -1
  39. data/ext/ffi_c/libffi/src/arm/sysv.S +1 -1
  40. data/ext/ffi_c/libffi/src/pa/linux.S +4 -0
  41. data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -0
  42. data/ext/ffi_c/libffi/src/riscv/ffi.c +39 -16
  43. data/ext/ffi_c/libffi/src/riscv/internal.h +7 -0
  44. data/ext/ffi_c/libffi/src/riscv/sysv.S +24 -0
  45. data/ext/ffi_c/libffi/src/tramp.c +6 -1
  46. data/ext/ffi_c/libffi/src/types.c +23 -1
  47. data/ext/ffi_c/libffi/src/{wasm32 → wasm}/ffi.c +157 -54
  48. data/ext/ffi_c/libffi/src/{wasm32 → wasm}/ffitarget.h +17 -0
  49. data/ext/ffi_c/libffi/src/x86/ffitarget.h +0 -3
  50. data/ext/ffi_c/libffi/src/x86/sysv.S +1 -3
  51. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +1 -3
  52. data/ext/ffi_c/libffi/testsuite/Makefile.am +3 -2
  53. data/ext/ffi_c/libffi/testsuite/Makefile.in +6 -2
  54. data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +2 -2
  55. data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +4 -4
  56. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +269 -256
  57. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +1 -1
  58. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +3 -0
  59. data/ext/ffi_c/libffi/testsuite/libffi.call/longjmp.c +60 -0
  60. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +1 -1
  61. data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +1 -2
  62. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +2 -0
  63. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +2 -0
  64. data/ext/ffi_c/libffi/testsuite/libffi.threads/ffitest.h +1 -0
  65. data/ext/ffi_c/libffi/testsuite/libffi.threads/threads.exp +50 -0
  66. data/ext/ffi_c/libffi/testsuite/libffi.threads/tsan.c +74 -0
  67. data/ext/ffi_c/libffi.mk +5 -0
  68. data/ffi.gemspec +4 -5
  69. data/lib/ffi/autopointer.rb +6 -0
  70. data/lib/ffi/compat.rb +11 -0
  71. data/lib/ffi/function.rb +23 -0
  72. data/lib/ffi/library.rb +19 -3
  73. data/lib/ffi/struct_by_reference.rb +1 -1
  74. data/lib/ffi/version.rb +1 -1
  75. data/samples/hello_ractor.rb +9 -1
  76. data/samples/qsort_ractor.rb +9 -1
  77. data/sig/ffi/auto_pointer.rbs +1 -1
  78. data/sig/ffi/errno.rbs +8 -0
  79. data/sig/ffi/platform.rbs +49 -0
  80. data/sig/ffi/struct.rbs +2 -2
  81. data/sig/ffi/struct_by_reference.rbs +1 -1
  82. data/sig/ffi.rbs +4 -1
  83. data.tar.gz.sig +0 -0
  84. metadata +33 -79
  85. metadata.gz.sig +0 -0
  86. data/ext/ffi_c/libffi/.appveyor/site.exp +0 -16
  87. data/ext/ffi_c/libffi/.appveyor.yml +0 -84
  88. data/lib/ffi/tools/types_generator.rb +0 -137
  89. data/rakelib/ffi_gem_helper.rb +0 -65
  90. /data/ext/ffi_c/libffi/{.appveyor → .ci}/unix-noexec.exp +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.2
4
+ version: 1.17.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Meissner
@@ -9,9 +9,9 @@ bindir: bin
9
9
  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encies:
37
- - !ruby/object:Gem::Dependency
38
- name: rake
39
- requirement: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '13.0'
44
- type: :development
45
- prerelease: false
46
- version_requirements: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - "~>"
49
- - !ruby/object:Gem::Version
50
- version: '13.0'
51
- - !ruby/object:Gem::Dependency
52
- name: rake-compiler
53
- requirement: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - "~>"
56
- - !ruby/object:Gem::Version
57
- version: '1.1'
58
- type: :development
59
- prerelease: false
60
- version_requirements: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - "~>"
63
- - !ruby/object:Gem::Version
64
- version: '1.1'
65
- - !ruby/object:Gem::Dependency
66
- name: rake-compiler-dock
67
- requirement: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: '1.0'
72
- type: :development
73
- prerelease: false
74
- version_requirements: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - "~>"
77
- - !ruby/object:Gem::Version
78
- version: '1.0'
79
- - !ruby/object:Gem::Dependency
80
- name: rspec
81
- requirement: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: 2.14.1
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - "~>"
91
- - !ruby/object:Gem::Version
92
- version: 2.14.1
35
+ date: 1980-01-02 00:00:00.000000000 Z
36
+ dependencies: []
93
37
  description: Ruby FFI library
94
38
  email: wmeissner@gmail.com
95
39
  executables: []
@@ -104,6 +48,7 @@ files:
104
48
  - LICENSE.SPECS
105
49
  - README.md
106
50
  - Rakefile
51
+ - Steepfile
107
52
  - ext/ffi_c/AbstractMemory.c
108
53
  - ext/ffi_c/AbstractMemory.h
109
54
  - ext/ffi_c/ArrayType.c
@@ -154,9 +99,7 @@ files:
154
99
  - ext/ffi_c/libffi.vc.mk
155
100
  - ext/ffi_c/libffi.vc64.mk
156
101
  - ext/ffi_c/libffi/.allow-ai-service
157
- - ext/ffi_c/libffi/.appveyor.yml
158
- - ext/ffi_c/libffi/.appveyor/site.exp
159
- - ext/ffi_c/libffi/.appveyor/unix-noexec.exp
102
+ - ext/ffi_c/libffi/.ci/Containerfile.ppc64le
160
103
  - ext/ffi_c/libffi/.ci/ar-lib
161
104
  - ext/ffi_c/libffi/.ci/bfin-sim.exp
162
105
  - ext/ffi_c/libffi/.ci/build-cross-in-container.sh
@@ -170,11 +113,15 @@ files:
170
113
  - ext/ffi_c/libffi/.ci/or1k-sim.exp
171
114
  - ext/ffi_c/libffi/.ci/powerpc-eabisim.exp
172
115
  - ext/ffi_c/libffi/.ci/site.exp
116
+ - ext/ffi_c/libffi/.ci/unix-noexec.exp
173
117
  - ext/ffi_c/libffi/.ci/wine-sim.exp
118
+ - ext/ffi_c/libffi/.gail-labels
174
119
  - ext/ffi_c/libffi/.gitattributes
175
120
  - ext/ffi_c/libffi/.github/issue_template.md
176
121
  - ext/ffi_c/libffi/.github/workflows/build.yml
177
122
  - ext/ffi_c/libffi/.github/workflows/emscripten.yml
123
+ - ext/ffi_c/libffi/.github/workflows/label-new-issue.yaml
124
+ - ext/ffi_c/libffi/.github/workflows/tarball.yml
178
125
  - ext/ffi_c/libffi/.gitignore
179
126
  - ext/ffi_c/libffi/ChangeLog.old
180
127
  - ext/ffi_c/libffi/LICENSE
@@ -335,6 +282,7 @@ files:
335
282
  - ext/ffi_c/libffi/src/raw_api.c
336
283
  - ext/ffi_c/libffi/src/riscv/ffi.c
337
284
  - ext/ffi_c/libffi/src/riscv/ffitarget.h
285
+ - ext/ffi_c/libffi/src/riscv/internal.h
338
286
  - ext/ffi_c/libffi/src/riscv/sysv.S
339
287
  - ext/ffi_c/libffi/src/s390/ffi.c
340
288
  - ext/ffi_c/libffi/src/s390/ffitarget.h
@@ -360,8 +308,8 @@ files:
360
308
  - ext/ffi_c/libffi/src/vax/elfbsd.S
361
309
  - ext/ffi_c/libffi/src/vax/ffi.c
362
310
  - ext/ffi_c/libffi/src/vax/ffitarget.h
363
- - ext/ffi_c/libffi/src/wasm32/ffi.c
364
- - ext/ffi_c/libffi/src/wasm32/ffitarget.h
311
+ - ext/ffi_c/libffi/src/wasm/ffi.c
312
+ - ext/ffi_c/libffi/src/wasm/ffitarget.h
365
313
  - ext/ffi_c/libffi/src/x86/asmnames.h
366
314
  - ext/ffi_c/libffi/src/x86/ffi.c
367
315
  - ext/ffi_c/libffi/src/x86/ffi64.c
@@ -413,6 +361,7 @@ files:
413
361
  - ext/ffi_c/libffi/testsuite/libffi.call/float3.c
414
362
  - ext/ffi_c/libffi/testsuite/libffi.call/float4.c
415
363
  - ext/ffi_c/libffi/testsuite/libffi.call/float_va.c
364
+ - ext/ffi_c/libffi/testsuite/libffi.call/longjmp.c
416
365
  - ext/ffi_c/libffi/testsuite/libffi.call/many.c
417
366
  - ext/ffi_c/libffi/testsuite/libffi.call/many2.c
418
367
  - ext/ffi_c/libffi/testsuite/libffi.call/many_double.c
@@ -618,6 +567,9 @@ files:
618
567
  - ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h
619
568
  - ext/ffi_c/libffi/testsuite/libffi.go/go.exp
620
569
  - ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h
570
+ - ext/ffi_c/libffi/testsuite/libffi.threads/ffitest.h
571
+ - ext/ffi_c/libffi/testsuite/libffi.threads/threads.exp
572
+ - ext/ffi_c/libffi/testsuite/libffi.threads/tsan.c
621
573
  - ext/ffi_c/rbffi.h
622
574
  - ext/ffi_c/rbffi_endian.h
623
575
  - ffi.gemspec
@@ -706,12 +658,10 @@ files:
706
658
  - lib/ffi/tools/generator.rb
707
659
  - lib/ffi/tools/generator_task.rb
708
660
  - lib/ffi/tools/struct_generator.rb
709
- - lib/ffi/tools/types_generator.rb
710
661
  - lib/ffi/types.rb
711
662
  - lib/ffi/union.rb
712
663
  - lib/ffi/variadic.rb
713
664
  - lib/ffi/version.rb
714
- - rakelib/ffi_gem_helper.rb
715
665
  - samples/getlogin.rb
716
666
  - samples/getpid.rb
717
667
  - samples/gettimeofday.rb
@@ -728,9 +678,11 @@ files:
728
678
  - sig/ffi/data_converter.rbs
729
679
  - sig/ffi/dynamic_library.rbs
730
680
  - sig/ffi/enum.rbs
681
+ - sig/ffi/errno.rbs
731
682
  - sig/ffi/function.rbs
732
683
  - sig/ffi/library.rbs
733
684
  - sig/ffi/native_type.rbs
685
+ - sig/ffi/platform.rbs
734
686
  - sig/ffi/pointer.rbs
735
687
  - sig/ffi/struct.rbs
736
688
  - sig/ffi/struct_by_reference.rbs
@@ -748,6 +700,8 @@ metadata:
748
700
  wiki_uri: https://github.com/ffi/ffi/wiki
749
701
  source_code_uri: https://github.com/ffi/ffi/
750
702
  mailing_list_uri: http://groups.google.com/group/ruby-ffi
703
+ rubygems_mfa_required: 'true'
704
+ msys2_mingw_dependencies: libffi
751
705
  rdoc_options:
752
706
  - "--exclude=ext/ffi_c/.*\\.o$"
753
707
  - "--exclude=ffi_c\\.(bundle|so)$"
@@ -764,7 +718,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
764
718
  - !ruby/object:Gem::Version
765
719
  version: '0'
766
720
  requirements: []
767
- rubygems_version: 3.6.2
721
+ rubygems_version: 4.0.3
768
722
  specification_version: 4
769
723
  summary: Ruby FFI
770
724
  test_files: []
metadata.gz.sig CHANGED
Binary file
@@ -1,16 +0,0 @@
1
- # Copyright (C) 2021 Anthony Green
2
-
3
- lappend boards_dir $::env(SITEDIR)
4
-
5
- verbose "Global Config File: target_triplet is $target_triplet" 1
6
- global target_list
7
-
8
- case "$target_triplet" in {
9
- { "aarch*cygwin*" } {
10
- set target_list "unix-noexec"
11
- }
12
- { "arm*cygwin*" } {
13
- set target_list "unix-noexec"
14
- }
15
- }
16
-
@@ -1,84 +0,0 @@
1
- shallow_clone: true
2
-
3
- # We're currently only testing libffi built with Microsoft's
4
- # tools.
5
- # This matrix should be expanded to include at least:
6
- # 32- and 64-bit gcc/cygwin
7
- # 32- and 64-bit gcc/mingw
8
- # 32- and 64-bit clang/mingw
9
- # and perhaps more.
10
-
11
- image: Visual Studio 2017
12
- platform:
13
- - x64
14
- - x86
15
- - arm
16
- - arm64
17
-
18
- configuration:
19
- - Debug
20
- - Release
21
-
22
- environment:
23
- global:
24
- CYG_ROOT: C:/cygwin64
25
- CYG_CACHE: C:/cygwin64/var/cache/setup
26
- CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
27
- VSVER: 15
28
- matrix:
29
- - SHARED_ARG: "--enable-shared --disable-static"
30
- - SHARED_ARG: "--enable-static --disable-shared"
31
-
32
- install:
33
- - ps: >-
34
- If ($env:Platform -Match "x86") {
35
- $env:VCVARS_PLATFORM="x86"
36
- $env:BUILD="i686-pc-cygwin"
37
- $env:HOST="i686-pc-cygwin"
38
- $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh"
39
- $env:SRC_ARCHITECTURE="x86"
40
- } ElseIf ($env:Platform -Match "arm64") {
41
- $env:VCVARS_PLATFORM="x86_arm64"
42
- $env:BUILD="i686-pc-cygwin"
43
- $env:HOST="aarch64-w64-cygwin"
44
- $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm64"
45
- $env:SRC_ARCHITECTURE="aarch64"
46
- } ElseIf ($env:Platform -Match "arm") {
47
- $env:VCVARS_PLATFORM="x86_arm"
48
- $env:BUILD="i686-pc-cygwin"
49
- $env:HOST="arm-w32-cygwin"
50
- $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -marm"
51
- $env:SRC_ARCHITECTURE="arm"
52
- } Else {
53
- $env:VCVARS_PLATFORM="amd64"
54
- $env:BUILD="x86_64-w64-cygwin"
55
- $env:HOST="x86_64-w64-cygwin"
56
- $env:MSVCC="/cygdrive/c/projects/libffi/msvcc.sh -m64"
57
- $env:SRC_ARCHITECTURE="x86"
58
- }
59
- If ($env:Configuration -Match "Debug") {
60
- $env:DEBUG_ARG="--enable-debug"
61
- } Else {
62
- $env:DEBUG_ARG="--disable-debug"
63
- }
64
- - 'appveyor DownloadFile https://cygwin.com/setup-x86_64.exe -FileName setup.exe'
65
- - 'setup.exe -qgnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu -P autoconf -P automake -P libtool'
66
- - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
67
- - echo call VsDevCmd to set VS150COMNTOOLS
68
- - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
69
- - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
70
- - echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
71
- - call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
72
-
73
- build_script:
74
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; ./autogen.sh)"
75
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; ./configure CC='%MSVCC%' CXX='%MSVCC%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST $DEBUG_ARG $SHARED_ARG)"
76
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include)"
77
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; make)"
78
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp $HOST/.libs/libffi.lib $HOST/testsuite/libffi-8.lib || true)"
79
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/ || true)"
80
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; TERM=none make check RUNTESTFLAGS='-v -v -v -v --target '$HOST DEJAGNU=$PWD/.appveyor/site.exp SITEDIR=$PWD/.appveyor)"
81
-
82
-
83
- on_finish:
84
- - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cat `find ./ -name libffi.log`)"
@@ -1,137 +0,0 @@
1
- require 'tempfile'
2
-
3
- module FFI
4
-
5
- # @private
6
- class TypesGenerator
7
-
8
- ##
9
- # Maps different C types to the C type representations we use
10
-
11
- TYPE_MAP = {
12
- "char" => :char,
13
- "signed char" => :char,
14
- "__signed char" => :char,
15
- "unsigned char" => :uchar,
16
-
17
- "short" => :short,
18
- "signed short" => :short,
19
- "signed short int" => :short,
20
- "unsigned short" => :ushort,
21
- "unsigned short int" => :ushort,
22
-
23
- "int" => :int,
24
- "signed int" => :int,
25
- "unsigned int" => :uint,
26
-
27
- "long" => :long,
28
- "long int" => :long,
29
- "signed long" => :long,
30
- "signed long int" => :long,
31
- "unsigned long" => :ulong,
32
- "unsigned long int" => :ulong,
33
- "long unsigned int" => :ulong,
34
-
35
- "long long" => :long_long,
36
- "long long int" => :long_long,
37
- "signed long long" => :long_long,
38
- "signed long long int" => :long_long,
39
- "unsigned long long" => :ulong_long,
40
- "unsigned long long int" => :ulong_long,
41
-
42
- "char *" => :string,
43
- "void *" => :pointer,
44
- }
45
-
46
- def self.generate(options = {})
47
- typedefs = nil
48
- Tempfile.open 'ffi_types_generator' do |io|
49
- io.puts <<-C
50
- #include <stdint.h>
51
- #include <stddef.h>
52
- #include <sys/types.h>
53
- #if !(defined(WIN32))
54
- #include <sys/socket.h>
55
- #include <netinet/in.h>
56
- #include <sys/resource.h>
57
- #endif
58
- C
59
-
60
- io.close
61
- cc = ENV['CC'] || 'gcc'
62
- cmd = "#{cc} -E -x c #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c"
63
- if options[:input]
64
- typedefs = File.read(options[:input])
65
- elsif options[:remote]
66
- typedefs = `ssh #{options[:remote]} #{cmd} - < #{io.path}`
67
- else
68
- typedefs = `#{cmd} #{io.path}`
69
- end
70
- end
71
-
72
- code = []
73
-
74
- typedefs.each_line do |type|
75
- # We only care about single line typedef
76
- next unless type =~ /typedef/
77
- # Ignore unions or structs
78
- next if type =~ /union|struct/
79
-
80
- # strip off the starting typedef and ending ;
81
- type.gsub!(/^(.*typedef\s*)/, "")
82
- type.gsub!(/\s*;\s*$/, "")
83
-
84
- parts = type.split(/\s+/)
85
- def_type = parts.join(" ")
86
-
87
- # GCC does mapping with __attribute__ stuf, also see
88
- # http://hal.cs.berkeley.edu/cil/cil016.html section 16.2.7. Problem
89
- # with this is that the __attribute__ stuff can either occur before or
90
- # after the new type that is defined...
91
- if type =~ /__attribute__/
92
- if parts.last =~ /__QI__|__HI__|__SI__|__DI__|__word__/
93
-
94
- # In this case, the new type is BEFORE __attribute__ we need to
95
- # find the final_type as the type before the part that starts with
96
- # __attribute__
97
- final_type = ""
98
- parts.each do |p|
99
- break if p =~ /__attribute__/
100
- final_type = p
101
- end
102
- else
103
- final_type = parts.pop
104
- end
105
-
106
- def_type = case type
107
- when /__QI__/ then "char"
108
- when /__HI__/ then "short"
109
- when /__SI__/ then "int"
110
- when /__DI__/ then "long long"
111
- when /__word__/ then "long"
112
- else "int"
113
- end
114
-
115
- def_type = "unsigned #{def_type}" if type =~ /unsigned/
116
- else
117
- final_type = parts.pop
118
- def_type = parts.join(" ")
119
- end
120
-
121
- if type = TYPE_MAP[def_type]
122
- code << "rbx.platform.typedef.#{final_type} = #{type}"
123
- TYPE_MAP[final_type] = TYPE_MAP[def_type]
124
- else
125
- # Fallback to an ordinary pointer if we don't know the type
126
- if def_type =~ /\*/
127
- code << "rbx.platform.typedef.#{final_type} = pointer"
128
- TYPE_MAP[final_type] = :pointer
129
- end
130
- end
131
- end
132
-
133
- code.sort.join("\n")
134
- end
135
- end
136
- end
137
-
@@ -1,65 +0,0 @@
1
- require 'bundler'
2
- require 'bundler/gem_helper'
3
-
4
- class FfiGemHelper < Bundler::GemHelper
5
- attr_accessor :cross_platforms
6
-
7
- def install
8
- super
9
-
10
- task "release:guard_clean" => ["release:update_history"]
11
-
12
- task "release:update_history" do
13
- update_history
14
- end
15
-
16
- task "release:rubygem_push" => ["gem:native", "gem:java"]
17
- end
18
-
19
- def hfile
20
- "CHANGELOG.md"
21
- end
22
-
23
- def headline
24
- '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
25
- end
26
-
27
- def reldate
28
- Time.now.strftime("%Y-%m-%d")
29
- end
30
-
31
- def update_history
32
- hin = File.read(hfile)
33
- hout = hin.sub(/#{headline}/) do
34
- raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
35
- $1 + $2 + $3 + reldate + $5
36
- end
37
- if hout != hin
38
- Bundler.ui.confirm "Updating #{hfile} for release."
39
- File.write(hfile, hout)
40
- Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
41
- end
42
- end
43
-
44
- def tag_version
45
- Bundler.ui.confirm "Tag release with annotation:"
46
- m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
47
- Bundler.ui.info(m[:annotation].gsub(/^/, " "))
48
- IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
49
- fd.write m[:annotation]
50
- end
51
- yield if block_given?
52
- rescue
53
- Bundler.ui.error "Untagging #{version_tag} due to error."
54
- sh_with_code "git tag -d #{version_tag}"
55
- raise
56
- end
57
-
58
- def rubygem_push(path)
59
- cross_platforms.each do |ruby_platform|
60
- super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
61
- end
62
- super(path.gsub(/\.gem\z/, "-java.gem"))
63
- super(path)
64
- end
65
- end