collapstring 0.1.0 → 0.1.1
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/.travis.yml +8 -0
- data/README.md +2 -0
- data/collapstring.gemspec +1 -1
- data/ext/collapstring/collapstring.c +3 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03a8814bc6af917198c2393d569e98a552d6910c
|
4
|
+
data.tar.gz: b96b78aa478999d80459f5133c593b71eba45d3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623cf4ca0cb67345252ef94145f99ace9e0d1f3a8d7b930591c5ce256313ad18678a7248acb80f69da7c24a6cc03997844ad7570c20ead83b516b236f40255d7
|
7
|
+
data.tar.gz: ce496dc563b643cf92270eb1ec575edee2de758181343452859b91332c919b89a40b4e6c47d12647a261e6f2b6695f26e92f816d2ebf6e90c75bc3eadec0c474
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/collapstring.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift lib unless $LOAD_PATH.include? lib
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'collapstring'
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.1'
|
8
8
|
spec.authors = ['Pierre Carrier']
|
9
9
|
spec.email = ['pierre@gcarrier.fr']
|
10
10
|
spec.description = 'Collapse quoted strings in strings'
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#include <assert.h>
|
2
2
|
#include <ruby.h>
|
3
|
+
#include <stddef.h>
|
3
4
|
|
4
5
|
typedef enum {
|
5
6
|
C_S_OUT,
|
@@ -17,10 +18,10 @@ static VALUE collapstring_collapse_bang(VALUE self, VALUE src)
|
|
17
18
|
char *str = RSTRING_PTR(src);
|
18
19
|
const size_t len = RSTRING_LEN(src);
|
19
20
|
|
20
|
-
size_t dst_idx = 0;
|
21
|
+
size_t dst_idx = 0, src_idx = 0;
|
21
22
|
collapse_state state = C_S_OUT;
|
22
23
|
|
23
|
-
for (
|
24
|
+
for (; src_idx < len; src_idx++) {
|
24
25
|
const char cur = str[src_idx];
|
25
26
|
switch (cur) {
|
26
27
|
case '\"':
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collapstring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Carrier
|
@@ -60,6 +60,7 @@ extensions:
|
|
60
60
|
- ext/collapstring/extconf.rb
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- .travis.yml
|
63
64
|
- Gemfile
|
64
65
|
- LICENSE.txt
|
65
66
|
- README.md
|