[Vortex] Patch: Use "const" appropriately in API; add logging mutex
jens at mooseyard.com
Tue Dec 18 00:09:18 CET 2007
This patch for Vortex 1.0.12 does two things:
(1) Makes the public API use "const char*" correctly, by adding a
bunch of "const" keywords. The exceptions are parameters where Vortex
may modify or free the string passed in, and return values where the
client is expected to free the pointer.
(This should not cause any compatibility issues for client code, as a
parameter that had a "const" added still accepts any value that it
used to accept.
I did not add "const" keywords in callback declarations, since adding
those _would_ break client code at compile time.)
(2) Wraps a mutex around _vortex_log_common, so that multiple threads
won't log to stdout simultaneously and get their messages tangled up.
I was finding the logging output very hard to read without this.
(The mutex is only created if logging is enabled, and only used while
printing log messages, so it shouldn't have any effect on normal
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 35901 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20071217/6e694cfe/attachment-0001.obj
More information about the Vortex