[NeoStats-Devel] NeoStats core list access restrictions
"M" <[email protected]> Wed, 24 Aug 2005 23:01:48 +0100
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Tonights addition of core side map generation represents the final stage in restricting access to core lists for things like users, servers, channels etc to the core and only the core. As such the lists are static to each sub system and the temporary GetxxHash functions used during development of this have been removed. Please do not change this even to provide access to another core subsystem. Each core list now has a list walk function so that code wishing to access information from the lists merely provide a handler and are passed each entry in turn. This means that list access is always performed in a known safe manner in the core so any updates to such areas only need one area of code updating. Where possible, the core also uses this same system for accessing it's own lists for the same reason of maintainance and to test the versatility of the API. The API allows a module to pass a pointer of it's choice to the system which will be passed on to any callback which should give us a great deal of future proofing. Core subsystems other than the list owner should use the list walker. The system should be much simpler to use since you merely write the part that is normally within a list/hash walk loop and that is your handler. There are still a few areas that could be improved in the core but this will be an ongoing investigation and any major change to the API would be postponed to 3.1. Mark.