Commit Graph

6 Commits

Author SHA1 Message Date
Jonas Kulla c504a383ba MRI-Binding: Optimize RB_ARG_END vaarg guard
It's enough to check this only in debug mode.
Make this an empty define in release mode.
2013-12-20 11:29:12 +01:00
Jonas Kulla 91c5eb1861 MRI-Binding: Fix typo that led to access of freed Color objects
Also fix my moronic variable naming in the InitCopy
functions that let to this mess up in the first place.
2013-12-15 10:18:58 +01:00
Jonas Kulla b7a2ba830c MRI-Binding: Bind #initialize_copy for clonable classes
This replaces the previously directly bound #clone
methods, which weren't really the "the Ruby way".
Rubys default Object#clone will call into our #init_copy
methods instead.

Partly incorporates pull request #3 by /cremno.
2013-10-31 10:13:24 +01:00
Jonas Kulla f067e0eff8 MRI-Binding: Reduce number of object allocations
Previously, wrapped instances of mkxp core classes were
stored as RData ivars inside the actual object. This turned
out to be pointless as RData objects themselves are perfectly
valid objects that can carry ivars and have parent classes.
Therefore, the RData objects are now exposed directly to
the user scripts, effectively halving the amount of object
allocations.
2013-10-30 10:06:24 +01:00
Jonas Kulla 4ff563725b Make 'rb_get_args()' va_arg passing safer by introducing a termination marker
What can I say. I made a pact with the devil, and paid dearly.
Almost a whole day's worth of debugging, actually. Not again.

If this turns out to be slow we can always optimize the critical
parts (with no variable param count) later, or completely remove it.
2013-09-27 04:49:48 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00