diff --git a/expat/doc/reference.html b/expat/doc/reference.html index 26db5a63..17af6e74 100644 --- a/expat/doc/reference.html +++ b/expat/doc/reference.html @@ -1808,10 +1808,11 @@ struct XML_cp {

Sets a handler for element declarations in a DTD. The handler gets called with the name of the element in the declaration and a pointer -to a structure that contains the element model. It is the -application's responsibility to free this data structure using -XML_FreeContentModel.

+to a structure that contains the element model. It's the user code's +responsibility to free model when finished with it. See +XML_FreeContentModel. +There is no need to free the model from the handler, it can be kept +around and freed at a later stage.

The model argument is the root of a tree of XML_Content nodes. If type equals diff --git a/expat/lib/expat.h b/expat/lib/expat.h index 46a0e1bc..c92f017c 100644 --- a/expat/lib/expat.h +++ b/expat/lib/expat.h @@ -174,8 +174,10 @@ struct XML_cp { }; /* This is called for an element declaration. See above for - description of the model argument. It's the caller's responsibility - to free model when finished with it. + description of the model argument. It's the user code's responsibility + to free model when finished with it. See XML_FreeContentModel. + There is no need to free the model from the handler, it can be kept + around and freed at a later stage. */ typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData, const XML_Char *name,