[crossfire] safe/common item stack/inventory iteration?
Nicolas Weeger
nicolas.weeger at laposte.net
Sun Jul 8 12:33:03 CDT 2007
> Now this construct is used to cover the case where the current object
> (tmp) goes away - we have a pointer to the next object. Such operations
> are not that uncommon, as the {do some work} block is more likely to
> destroy tmp.
Actually, you can never be sure any object stays valid, short of restarting
the loop :)
Remove is an event a plugin can handle, thus such a plugin could change the
whole object stack.
As for the core of the mail, I guess it's ok to have some shortcut macros for
common things, but IMO there are too many cases depending on the processing
you're doing to be able to refactore usefully.
Nicolas
--
http://nicolas.weeger.free.fr [Petit site d'images, de textes, de code, bref
de l'aléatoire !]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.metalforge.org/pipermail/crossfire/attachments/20070708/106d0db1/attachment.pgp
More information about the crossfire
mailing list