[ http://issues.apache.org/jira/browse/XERCESC-783?page=all ]

Alberto Massari resolved XERCESC-783.
-------------------------------------

    Resolution: Fixed
      Assignee:     (was: Xerces-C Developers Mailing List)

In Xerces 3.0, the DOMUserDataHandler::handle callback specifies 'dst' as a 
non-const DOMNode

> DOMUserDataHandler<_TT>::handle -- dst argument is of type const DOMNode*
> -------------------------------------------------------------------------
>
>                 Key: XERCESC-783
>                 URL: http://issues.apache.org/jira/browse/XERCESC-783
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: 2.1.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: David Reitter
>
> A functional object with a 'handle' function needs to be specified when using
> the setUserData method to store arbitrary data along with a DOMNode. 
> During operation NODE_CLONED, I change 'dst' as follows:
> dst->setUserData(key, new _TT( ( *(_TT *) data )  ), this);
> (_TT is the type of the data, as I have defined a template for that.)
> This operation is not legal (but compiles with GCC3.1, not with 2.95), because
> dst is defined to be "const DOMNode*".
> I don't know whether I'm supposed to do it that way, but if I am, this seems 
> to
> me like a design bug.
> FIX:
> update definition of DOMUserDataHandler::handle.
> ps.:
> My workaround is a cast
>     ((DOMNode*) dst)->setUserData(key, new _TT( ( *(_TT *) data )  ), this);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to