Permalink
Browse files

Lots of refactorings to reduce the number of const and symbol lookups

  • Loading branch information...
olabini committed Jul 25, 2009
1 parent 5c41f2f commit 21522eca02b6d05fecaec328e035f9dcba16c232
Showing with 149 additions and 85 deletions.
  1. +2 −1 ext/ruby/src/java/YechtService.java
  2. +147 −84 ext/ruby/src/java/org/yecht/ruby/YechtYAML.java
@@ -38,7 +38,7 @@ public boolean basicLoad(final Ruby runtime) throws IOException {
cParser.addReadWriteAttribute(ctx, "resolver");
cParser.addReadWriteAttribute(ctx, "input");
- RubyClass cNode = rb_yecht.defineClassUnder("Node", runtime.getObject(), runtime.getObject().getAllocator());
+ RubyClass cNode = rb_yecht.defineClassUnder("Node", runtime.getObject(), YechtYAML.Node.Allocator);
cNode.defineAnnotatedMethods(YechtYAML.Node.class);
cNode.addReadWriteAttribute(ctx, "emitter");
cNode.addReadWriteAttribute(ctx, "resolver");
@@ -90,6 +90,7 @@ public boolean basicLoad(final Ruby runtime) throws IOException {
cEmitter.addReadWriteAttribute(ctx, "level");
oGenericResolver.dataWrapStruct(new YechtYAML.GenericResolver.Extra(runtime));
+ rb_yaml.dataWrapStruct(new YechtYAML.YAMLExtra(runtime));
return true;
}
Oops, something went wrong.

0 comments on commit 21522ec

Please sign in to comment.