z85 0.2 → 0.3
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/z85/z85.c +8 -2
- data/lib/z85/version.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db559c519963849320043f3560f8a7971fed6d07a0cecee132d5286ce9d8a484
|
4
|
+
data.tar.gz: c394a65cefbb48fd7d6954816005bc325a26358a86b6b3eca88dad7e25db8714
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80169c9ecf71b235a45ebe7c0113b13fa699849cc7276f26b3c1e965e0e7a1598b3e4e7bf72b729dbc442862030bdc5046a59c36c8808e4f92a817995a5f9274
|
7
|
+
data.tar.gz: 5797ca4ed1c69a193ac1546434943cfd87400b651721a79ee23dc1120fbcd17bcbaf31ba478b2080768317804f76e01e6954fcd0b05e5ff8133364c4b8bd1924
|
data/ext/z85/z85.c
CHANGED
@@ -87,7 +87,10 @@ static VALUE z85_encode(VALUE _mod, VALUE string)
|
|
87
87
|
}
|
88
88
|
encoded[char_nbr] = 0;
|
89
89
|
|
90
|
-
|
90
|
+
VALUE out = rb_str_export_locale(rb_str_new_cstr(encoded));
|
91
|
+
free(encoded);
|
92
|
+
|
93
|
+
return out;
|
91
94
|
}
|
92
95
|
|
93
96
|
static VALUE z85_decode(VALUE _mod, VALUE string)
|
@@ -116,7 +119,10 @@ static VALUE z85_decode(VALUE _mod, VALUE string)
|
|
116
119
|
}
|
117
120
|
}
|
118
121
|
|
119
|
-
|
122
|
+
VALUE out = rb_str_new((const char*) decoded, decoded_size);
|
123
|
+
free(decoded);
|
124
|
+
|
125
|
+
return out;
|
120
126
|
}
|
121
127
|
|
122
128
|
/* This function has a special name and it is invoked by Ruby to initialize the extension. */
|
data/lib/z85/version.rb
CHANGED