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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 535dd6e004b4672718bee0de32af238bf211ac05
4
- data.tar.gz: 250a691e86b6d657367f5d87a4d5afc1fd50db92
3
+ metadata.gz: a60bcb8f835f212dfa31412ffd9b0f8b18b93547
4
+ data.tar.gz: 776d930e1daaa00edfd610eb1b63ae34630c6b3c
5
5
  SHA512:
6
- metadata.gz: bd7cbbb3e4bfc41800554f3865ac23e90840d9d975e4e96d3a83bc27de89d41d2f5512586468f410a38b6b2df5b3a85eb891107c27cee53961651cf45c9deda1
7
- data.tar.gz: 0098133c51b78a2406f668fc1557a2333d6f0a890262591f9a78c010732cd2c40688a57e15c904efa3b17307d505e3cd5b175520c7252d767748964afbc5d878
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
 
@@ -1,3 +1,3 @@
1
1
  class Puzzle
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
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.1
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-02 00:00:00.000000000 Z
11
+ date: 2015-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake