ccsv 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ccsv might be problematic. Click here for more details.

Files changed (6) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +2 -0
  3. data/ccsv.gemspec +2 -2
  4. data/ext/ccsv.c +6 -6
  5. metadata +1 -1
  6. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,2 +1,4 @@
1
1
 
2
+ v0.0.2. Avoid a couple more dispatches.
3
+
2
4
  v0.0.1. First version.
@@ -1,10 +1,10 @@
1
1
 
2
- # Gem::Specification for Ccsv-0.0.1
2
+ # Gem::Specification for Ccsv-0.0.2
3
3
  # Originally generated by Echoe
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{ccsv}
7
- s.version = "0.0.1"
7
+ s.version = "0.0.2"
8
8
  s.date = %q{2007-09-26}
9
9
  s.summary = %q{A pure-C CSV parser.}
10
10
  s.require_paths = ["lib", "ext"]
data/ext/ccsv.c CHANGED
@@ -11,19 +11,19 @@ static VALUE foreach(VALUE self, VALUE filename) {
11
11
 
12
12
  char line[MAX_LENGTH];
13
13
  char *token;
14
- VALUE parsed = rb_ary_new2(2);
15
- ID clear = rb_intern("clear");
14
+ VALUE ary = rb_ary_new();
15
+ int idx;
16
16
 
17
- int i, j;
18
17
  while (fgets(line, sizeof(line), file) != NULL) {
19
18
  token = strtok(line, DELIMITERS);
20
- rb_funcall(parsed, clear, 0);
19
+ idx = 0;
21
20
 
22
21
  while (token != NULL) {
23
- rb_ary_push(parsed, rb_str_new2(token));
22
+ rb_ary_store(ary, idx, rb_str_new(token, strlen(token)));
23
+ idx ++;
24
24
  token = strtok(NULL, DELIMITERS);
25
25
  }
26
- rb_yield(parsed);
26
+ rb_yield(ary);
27
27
  }
28
28
 
29
29
  return Qnil;
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: ccsv
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
6
+ version: 0.0.2
7
7
  date: 2007-09-26 00:00:00 -04:00
8
8
  summary: A pure-C CSV parser.
9
9
  require_paths:
metadata.gz.sig CHANGED
Binary file