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 +4 -4
- data/ext/jl4rb/extconf.rb +9 -7
- data/ext/jl4rb/jl4rb.c +10 -6
- data/jl4rb.gemspec +1 -1
- data/lib/jl4rb.rb +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7d8c278f23b4f87f2700a177c5610297ef6bd754ad520d8c1ea65f023526a0
|
4
|
+
data.tar.gz: f98a8fb67880033fa63ead5f4b5964fd1a7d2f14b4eb69c583c1d0477e6c1a4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
$
|
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
|
-
|
26
|
-
$objs = [
|
26
|
+
jl4r_name="jl4rb"
|
27
|
+
$objs = [jl4r_name+".o"]
|
27
28
|
|
28
|
-
dir_config("
|
29
|
-
|
30
|
-
|
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
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.
|
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:
|
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.
|
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: []
|