jl4rb 0.2.3 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f7cae52ad265d312103b5315bfd6280f2eba84b7745890046d0b5fcd2ae839f
4
- data.tar.gz: 60e322b9e4f36c971156a754750b9b0de176a71556f437e4c2d28fbb30d51108
3
+ metadata.gz: 6f7d8c278f23b4f87f2700a177c5610297ef6bd754ad520d8c1ea65f023526a0
4
+ data.tar.gz: f98a8fb67880033fa63ead5f4b5964fd1a7d2f14b4eb69c583c1d0477e6c1a4e
5
5
  SHA512:
6
- metadata.gz: aa638b61bf3d4cb80caa430299c7add73f039b55e93c8ebd55bb4d00de4dfdf71bda3b3d08e20b971ba71bb7e7d0958bdb4266ed23b171071ef685f6342e6697
7
- data.tar.gz: 77cc18725d48204aafcd6fea6b8a0b460c5f8e74eb0de206b2e659bcf4f936b6e1a91e98b5ba87e5cc10bc980a3bc54bd426b976cb6093a03b76b7bb4f4f206f
6
+ metadata.gz: 0670f911e25c3f7870eec253484b19fe0d3b4a11ac02dc660066c849004b45597b23f25e9cd8c928376c2b050b9d8035ade8b85fb688ff45bcdc6aec1662934b
7
+ data.tar.gz: db54081f92832f6d132ff8c1402b8c56fdddc25c95a5259aacb01d2a7ebc36510e58309a0ac597bfc77657ee422391fd2df40407a6dc715139b51278d4ee8232
data/ext/jl4rb/extconf.rb CHANGED
@@ -17,17 +17,19 @@ def jl4rb_makefile(incs,libs)
17
17
  jl_share=`julia -e 'print(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia"))'`
18
18
  $CFLAGS =`julia #{jl_share}/julia-config.jl --cflags`.strip
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.4'
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.4
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: 2021-09-09 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.2.22
56
+ signing_key:
57
57
  specification_version: 4
58
58
  summary: Julia for ruby
59
59
  test_files: []