Hi everybody, esp. Steve,
as there seemingly hasn't been much development on Io lately, I thought
it might be a good time to kindly ask for inclusion of the following
patches:
1. IoObject_dealloc(): pass address of free'd object to listeners
instead of NULL
This is a bugfix. Deallocation listeners where passed a NULL value
as an argument when instead they should at least know which object
was deallocated.
2. Add IoState_addValueIfNecessary_ and modify IOCLONE to use it
Currently, when calling IoState_retain_ on an object from inside
its clone function, terrible things happen: IoState_retain will
add the object to the garbage collector. IOCLONE will call
IoState_addValue_ which will add it again, putting it inside the
garbage collector's white list. This makes the object subject to
collection!
This patch will make IoState_addValue_ detect if the object has
already been registered with the garbage collector.
3. "Tagless" functions as used by Object can be added with
IoObject_addTaglessMethodTable_
This patch adds the notion of "tagless" functions.
Currently, "Object" is the only Io object which doesn't complain
when its methods are called on an object with another "tag", or
type. This makes them every object's base functionality.
The patch opens the possibility to create other objects offering
such base functionality.
Easiest way to apply is with git-am *.patch
If you're unhappy with the way these changes were done, I will gladly
change them to suit your needs. It is very important for me to get these
changes (or equivalent ones) into the tree, as currently I am forced to
maintain a fork of Io for my game.
Cheers,
Jonas
.