I just did something that should have been done a long time ago -- made all of SPRepr's data fields private.
This shouldn't have affected anything, but it turns out a lot of code still was poking at the fields directly. I replaced direct accesses with calls to the appropriate accessors.
In the process I moved most of the "real" functionality into SPRepr member functions; the sp_repr_* functions remain as thin wrappers for the moment.
For reference:
old-style direct access .... becomes: repr->parent repr->parent() or sp_repr_parent(repr)
repr->next repr->next() or sp_repr_next(repr)
repr->children repr->firstChild() or sp_repr_children()
repr->doc repr->document()
Long-term, SPRepr will become a public interface (abstract) class in repr.h, the current SPRepr will become SPReprImpl or similar, and the wrapper sp_repr_* functions will become inline, then go away entirely.
-mental
participants (1)
-
MenTaLguY