libpuzzle 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libpuzzle.c +7 -7
- data/lib/puzzle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a60bcb8f835f212dfa31412ffd9b0f8b18b93547
|
4
|
+
data.tar.gz: 776d930e1daaa00edfd610eb1b63ae34630c6b3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cfccdfe5c3e144e30d6da7ace4f8176790af245f2dc0ad3825e503782f2c0668f0998070e44121ed5458cbc5fcd29ca07f65e7b80c4198b09ad30f88d3480db
|
7
|
+
data.tar.gz: 6059175ec5e1ff44bf86b99b390b0d5f8afb27df58e1c87e6150620e17b79564528272b8536578b23b7987e3b9b912297ac2fae2d5babbf5a983323e85a3f3dc
|
data/ext/libpuzzle.c
CHANGED
@@ -9,12 +9,12 @@ typedef struct Puzzle{
|
|
9
9
|
PuzzleCvec vector;
|
10
10
|
} Puzzle;
|
11
11
|
|
12
|
-
void free_puzzle(Puzzle *puzzle){
|
12
|
+
static void free_puzzle(Puzzle *puzzle){
|
13
13
|
puzzle_free_context(&puzzle->context);
|
14
14
|
puzzle_free_cvec(&puzzle->context, &puzzle->vector);
|
15
15
|
}
|
16
16
|
|
17
|
-
VALUE new(VALUE klass, VALUE file_path){
|
17
|
+
static VALUE new(VALUE klass, VALUE file_path){
|
18
18
|
Puzzle *puzzle;
|
19
19
|
VALUE ret = Data_Make_Struct(klass, Puzzle, 0, free_puzzle, puzzle);
|
20
20
|
puzzle_init_context(&puzzle->context);
|
@@ -29,7 +29,7 @@ VALUE new(VALUE klass, VALUE file_path){
|
|
29
29
|
return ret;
|
30
30
|
}
|
31
31
|
|
32
|
-
double _distance(VALUE p1, VALUE p2){
|
32
|
+
static double _distance(VALUE p1, VALUE p2){
|
33
33
|
Puzzle *puzzle_1, *puzzle_2;
|
34
34
|
Data_Get_Struct(p1, Puzzle, puzzle_1);
|
35
35
|
Data_Get_Struct(p2, Puzzle, puzzle_2);
|
@@ -38,15 +38,15 @@ double _distance(VALUE p1, VALUE p2){
|
|
38
38
|
return dist;
|
39
39
|
}
|
40
40
|
|
41
|
-
VALUE distance(VALUE p1, VALUE p2){
|
41
|
+
static VALUE distance(VALUE p1, VALUE p2){
|
42
42
|
return rb_float_new(_distance(p1, p2));
|
43
43
|
}
|
44
44
|
|
45
|
-
VALUE equal(VALUE p1, VALUE p2){
|
45
|
+
static VALUE equal(VALUE p1, VALUE p2){
|
46
46
|
return _distance(p1, p2) < 0.6 ? Qtrue : Qfalse;
|
47
47
|
}
|
48
48
|
|
49
|
-
VALUE compress(VALUE self){
|
49
|
+
static VALUE compress(VALUE self){
|
50
50
|
Puzzle *puzzle;
|
51
51
|
PuzzleCompressedCvec c_cvec;
|
52
52
|
Data_Get_Struct(self, Puzzle, puzzle);
|
@@ -58,7 +58,7 @@ VALUE compress(VALUE self){
|
|
58
58
|
return ret;
|
59
59
|
}
|
60
60
|
|
61
|
-
VALUE uncompress(VALUE klass, VALUE compressed_string){
|
61
|
+
static VALUE uncompress(VALUE klass, VALUE compressed_string){
|
62
62
|
Puzzle *puzzle;
|
63
63
|
PuzzleCompressedCvec c_cvec;
|
64
64
|
|
data/lib/puzzle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libpuzzle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jian Weihang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|