michaelrsweet/Mini-XML — Issue #5: Add context to all callbacks
Author: michaelrsweet
Created: 2012-01-01 08:09:10+00:00
State: open
Labels: P4 - Feature

[Originally posted as STR #106 by alonbl]

Continue bug#66.

Another example is the mxmlSetErrorCallback() which has no context assigned. It would be much easier to use if there is ability to set some void* context.

Also, I am not sure I understand why the error callback is thread specific.

This kind of library usually needs no global context. First argument of every function may provide the necessary context.

For the error callback, except of context it would be nice to get a details of the object that caused the error, or have a separate callback for errors during parsing. For example, if I parse 3 XML I want to present a different messages for each [without using globals].

Thanks