MRuby-Binding: Reduce number of object allocations

This is the same change as f067e0eff8,
applied to the mruby backend.
This commit is contained in:
Jonas Kulla 2014-08-09 10:38:42 +02:00
parent bdcf1503bd
commit 0ab543fd75
11 changed files with 28 additions and 63 deletions
binding-mruby

View file

@ -32,7 +32,7 @@ MRB_METHOD(spriteInitialize)
{
Sprite *s = viewportElementInitialize<Sprite>(mrb, self);
setPrivateData(mrb, self, s, SpriteType);
setPrivateData(self, s, SpriteType);
/* Wrap property objects */
s->setSrcRect(new Rect);