Skip to content

Commit

Permalink
Small change to global var and allocating it to Ruby.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgonyea committed Oct 11, 2010
1 parent cc17ec2 commit 6e4dc8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.o
*.bundle
Makefile
8 changes: 4 additions & 4 deletions rb_fraction.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ void fraction_free(Fraction *fraction) {
}

VALUE fraction_allocate(VALUE klass) {
Fraction *fraction = [[Fraction alloc] init];
frac = [[Fraction alloc] init];

[fraction setDenominator:Qnil];
[fraction setNumerator:Qnil];
[frac setDenominator:Qnil];
[frac setNumerator:Qnil];

return Data_Wrap_Struct(klass, fraction_mark, fraction_free, fraction);
return Data_Wrap_Struct(klass, fraction_mark, fraction_free, frac);
}

VALUE fraction_initialize(VALUE self) {
Expand Down

0 comments on commit 6e4dc8e

Please sign in to comment.