jl4rb 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f7cae52ad265d312103b5315bfd6280f2eba84b7745890046d0b5fcd2ae839f
4
- data.tar.gz: 60e322b9e4f36c971156a754750b9b0de176a71556f437e4c2d28fbb30d51108
3
+ metadata.gz: b8b8aade7e2cc0fc2991e6352b94f47a56c7683f818373036afe32b83bb52e28
4
+ data.tar.gz: 781b45f9522acb27f4422e7f6f1cc6879dda966b7f5fee0cd505d21891fd0e2a
5
5
  SHA512:
6
- metadata.gz: aa638b61bf3d4cb80caa430299c7add73f039b55e93c8ebd55bb4d00de4dfdf71bda3b3d08e20b971ba71bb7e7d0958bdb4266ed23b171071ef685f6342e6697
7
- data.tar.gz: 77cc18725d48204aafcd6fea6b8a0b460c5f8e74eb0de206b2e659bcf4f936b6e1a91e98b5ba87e5cc10bc980a3bc54bd426b976cb6093a03b76b7bb4f4f206f
6
+ metadata.gz: daabc722567025b44d986a6f033b1de3ccd31dc16059b889b987eb6fa272d752a6b258eccbb5ce484110e06c2692522c7a7a6c68950da7590eed0bc49dd349e2
7
+ data.tar.gz: a4e322987a2d7f31c9bbb29353aecd0d5acdcda4ceaf11c7170b2aee892f3ec8e39d0265d93ffe345bd047d7c4cc754d3125cdfe43d71b880e401f8bf524314f
data/ext/jl4rb/extconf.rb CHANGED
@@ -15,19 +15,21 @@ end
15
15
  def jl4rb_makefile(incs,libs)
16
16
 
17
17
  jl_share=`julia -e 'print(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia"))'`
18
- $CFLAGS =`julia #{jl_share}/julia-config.jl --cflags`.strip
18
+ $CFLAGS =`julia #{jl_share}/julia-config.jl --cflags`.strip + " -fdeclspec"
19
19
  $LDFLAGS =`julia #{jl_share}/julia-config.jl --ldflags`.strip
20
- $libs =`julia #{jl_share}/julia-config.jl --ldlibs`.strip
20
+ $LIBS = `julia #{jl_share}/julia-config.jl --ldlibs`.strip
21
21
 
22
+ puts [$CFLAGS, $LDFLAGS, $LIBS]
22
23
 
23
24
  header = nil
24
25
 
25
- rb4r_name="jl4rb"
26
- $objs = [rb4r_name+".o"]
26
+ jl4r_name="jl4rb"
27
+ $objs = [jl4r_name+".o"]
27
28
 
28
- dir_config("R4rb")
29
- p ( {:CFLAGS => $CFLAGS, :LDFLAGS => $LDFLAGS, :libs => $libs })
30
- create_makefile(rb4r_name)
29
+ dir_config("jl4rb")
30
+ #
31
+ p ( {:CFLAGS => $CFLAGS, :LDFLAGS => $LDFLAGS, :LIBS => $LIBS })
32
+ create_makefile(jl4r_name)
31
33
  end
32
-
34
+ #p [$prefix_include,$prefix_lib]
33
35
  jl4rb_makefile($prefix_include,$prefix_lib)
data/ext/jl4rb/jl4rb.c CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  **********************************************************************/
6
6
 
7
- #include "julia.h"
8
7
  #include <stdio.h>
9
8
  #include <string.h>
10
9
  #include <math.h>
@@ -17,23 +16,28 @@
17
16
  //#endif
18
17
 
19
18
  //-| next macros already exist in ruby and are undefined here
20
- //#undef T_FLOAT
21
19
  #undef NORETURN
22
20
  #include "ruby.h"
23
21
  #include "ruby/version.h"
22
+ #undef T_FLOAT
23
+ #undef NOINLINE
24
+ #include "julia.h"
24
25
 
25
26
  #define length(a) jl_array_size(a,0)
26
27
 
27
28
  /************* INIT *********************/
28
29
 
29
30
 
30
- VALUE Julia_init()
31
+ VALUE Julia_init(VALUE obj)
31
32
  {
32
- jl_init();
33
+ //jl_init();
34
+ printf("%s %s\n", jl_get_libdir(), jl_get_default_sysimg_path());
35
+ jl_init(); //_with_image("/Applications/Julia-1.6.app/Contents/Resources/julia/bin", "../lib/sys.dylib");
36
+ printf("ok\n");
33
37
  return Qtrue;
34
38
  }
35
39
 
36
- VALUE Julia_exit(VALUE exitcode) {
40
+ VALUE Julia_exit(VALUE obj, VALUE exitcode) {
37
41
  jl_atexit_hook(exitcode);
38
42
  return Qtrue;
39
43
  }
@@ -506,7 +510,7 @@ Init_jl4rb()
506
510
  mJulia = rb_define_module("Julia");
507
511
 
508
512
  rb_define_module_function(mJulia, "initJL", Julia_init, 0);
509
-
513
+
510
514
  rb_define_module_function(mJulia, "exitJL", Julia_exit, 1);
511
515
 
512
516
  rb_define_module_function(mJulia, "evalLine", Julia_eval, 2);
data/jl4rb.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rubygems/package_task'
3
3
 
4
4
  PKG_NAME='jl4rb'
5
- PKG_VERSION='0.2.3'
5
+ PKG_VERSION='0.2.5'
6
6
  PKG_FILES=FileList[
7
7
  'Rakefile','jl4rb.gemspec',
8
8
  'ext/jl4rb/*.c',
data/lib/jl4rb.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'jl4rb.bundle' if File.exists? File.join(File.dirname(__FILE__),'jl4rb.bundle')
2
2
  require 'jl4rb.so' if File.exists? File.join(File.dirname(__FILE__),'jl4rb.so')
3
3
 
4
+ p [:dl, "jl4rb.DLL loaded" ]
4
5
  # loading ruby files
5
6
  require 'jl4rb/jl2rb_init'
6
7
  require 'jl4rb/jl2rb_eval'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jl4rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - CQLS
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-23 00:00:00.000000000 Z
11
+ date: 2022-03-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'R is embedded in ruby with some communication support .
14
14
 
@@ -35,7 +35,7 @@ licenses:
35
35
  - MIT
36
36
  - GPL-2.0
37
37
  metadata: {}
38
- post_install_message:
38
+ post_install_message:
39
39
  rdoc_options: []
40
40
  require_paths:
41
41
  - lib
@@ -52,8 +52,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  requirements:
54
54
  - none
55
- rubygems_version: 3.0.6
56
- signing_key:
55
+ rubygems_version: 3.3.7
56
+ signing_key:
57
57
  specification_version: 4
58
58
  summary: Julia for ruby
59
59
  test_files: []