visualize_helper 0.0.10.35 → 0.0.10.36

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: d4d63db7c253c734accbfaf226fd0252019044f0
4
- data.tar.gz: 9369123d379d8e1a8a7182cf9d3ebffcd272616c
3
+ metadata.gz: 456169916820789ddefcb47c47f19f20448caffd
4
+ data.tar.gz: 964c6af00c4b22c77d5f5e4f5055683e7261ce87
5
5
  SHA512:
6
- metadata.gz: e4ba09283d42e8617f6fcf96451e281693be6bb05fd4dc6972b7dc5469a5bdfd53b453a0da669054ae262dabfcf4ec81e7c3e78a10068d3f84d017d3822de7d0
7
- data.tar.gz: 8020baa5505faba8503a6519327a4617ff62add832a8c5ad451f274750d0503b6fe36030096f162b9cac80dcc3dc430ec4d394d619d212deacb49e3be972dbd1
6
+ metadata.gz: 57f7cf913c2f10971eca8fb51eab2960046e9e0cb8a5dd5e021f6b89a1d70b4c57e6d14a47d1136940448d0625957cac878efbf8ab1f958c81e726c8eac067ed
7
+ data.tar.gz: 672f2ba3cd558ec57c6718b77ae199709dec8f55c9fc67f8de7fb8e7233e13b9142efb2f1fbbd123dfff678d55c6f16b537760e8d503887fc13c875bef9b5e41
@@ -34,8 +34,9 @@ static VALUE uniq(VALUE sorted_array){
34
34
  //initialize variables for compare
35
35
  char* previous;
36
36
  char* current;
37
+ int i;
37
38
 
38
- for( int i = 0; i < RARRAY_LEN(sorted_array); i++){
39
+ for( i = 0; i < RARRAY_LEN(sorted_array); i++){
39
40
  VALUE current_temp = rb_ary_entry(sorted_array,i);
40
41
  current = StringValuePtr(current_temp);
41
42
  // initial case, when there is no previous
@@ -65,11 +66,12 @@ static char* join(VALUE strings){
65
66
  int string_total_size = 0;
66
67
  VALUE string_temp;
67
68
  VALUE result;
69
+ int i;
68
70
 
69
71
 
70
72
 
71
73
  // calculate the exact size of malloc
72
- for ( int i = 0; i < strings_size; i++) {
74
+ for ( i = 0; i < strings_size; i++) {
73
75
  string_temp = rb_ary_entry(strings,i);
74
76
  string_total_size += strlen(StringValuePtr(string_temp));
75
77
  }
@@ -81,7 +83,7 @@ static char* join(VALUE strings){
81
83
  sprintf(joined,"%s", StringValuePtr(string_temp));
82
84
 
83
85
 
84
- for (int i = 1 ; i < strings_size; i++) {
86
+ for (i = 1 ; i < strings_size; i++) {
85
87
 
86
88
  string_temp = rb_ary_entry(strings,i);
87
89
  sprintf(joined,"%s,%s", joined, StringValuePtr(string_temp));
@@ -100,8 +102,9 @@ static VALUE sort_uniq(VALUE strings, int unique)
100
102
  {
101
103
  int strings_size = RARRAY_LEN(strings);
102
104
  const char *input[strings_size];
105
+ int i;
103
106
 
104
- for (int i = 0; i< strings_size; i++){
107
+ for (i = 0; i< strings_size; i++){
105
108
  VALUE string = rb_ary_entry(strings,i);
106
109
  input[i] = StringValuePtr(string);
107
110
  }
@@ -112,7 +115,7 @@ static VALUE sort_uniq(VALUE strings, int unique)
112
115
 
113
116
  // Transform the result input into a ruby array
114
117
  VALUE resultado = rb_ary_new();
115
- for (int i=0; i<stringLen; ++i) {
118
+ for (i=0; i<stringLen; ++i) {
116
119
  rb_ary_push(resultado,rb_str_new2(input[i]));
117
120
  }
118
121
 
@@ -1,3 +1,3 @@
1
1
  module VisualizeHelper
2
- VERSION = "0.0.10.35"
2
+ VERSION = "0.0.10.36"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visualize_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10.35
4
+ version: 0.0.10.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Ottoni Santiago Machado de Faria