← Back to team overview

zorba-coders team mailing list archive

Re: [Merge] lp:~zorba-coders/zorba/new-jsoniq-update into lp:zorba

 

Hi Matthias,

I am not sure I understand what you are suggesting.

The reason for non-const is that temporary parse nodes (in that case a lookup expression node) use regular pointers that they own to child parse nodes, i.e., the destructor deletes the object pointed to at the end. However, these child parse nodes are still used by the final parsenodes (the updating expression nodes).

So one has to release these pointers (set them to NULL) to avoid that destruction.

With a unique pointer to temporary parsenodes released after the creation of the final parsenode, there would still be the problem that the temporary parsenodes would delete parsenodes that are actually used by the final parsenodes.

However, I will now attempt to simplify the external API to address this, and provide release functions instead.

Does it make sense?



Does it make sense?

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq-update/+merge/185295
Your team Zorba Coders is subscribed to branch lp:zorba.


References