]> granicus.if.org Git - icu/commit
ICU-21662 Improve UVector error handling.
authorAndy Heninger <andy.heninger@gmail.com>
Thu, 2 Sep 2021 23:09:04 +0000 (16:09 -0700)
committerAndy Heninger <andy.heninger@gmail.com>
Thu, 9 Sep 2021 00:24:52 +0000 (17:24 -0700)
commit0ec329c6e17539d7662942be09204a1d4190761e
treef70253c4b49119ee867f11c658aa1963aa854a8b
parente03dce66effc836eb6d81edc100c2cff17f1c33a
ICU-21662 Improve UVector error handling.

This is the next installment of UVector error handling cleanup. It includes:

- Revise UStack to follow the conventions of UVector, to leave the stack
  unmodified when there is an incoming error code. And, for stacks with a
  deleter function, to delete the incoming object if it cannot be
  succesfully pushed.

 - Review all useage of UStack in ICU; adjust call sites as needed.

 - Review all uses of UVector::addElementX() in the implementation of
   - Regular Expressions
   - Break Iteration
   - toolutil/xmlparser

   changing to the updated functions, and adjusting call sites as needed.
icu4c/source/common/brkeng.cpp
icu4c/source/common/rbbinode.cpp
icu4c/source/common/rbbiscan.cpp
icu4c/source/common/rbbisetb.cpp
icu4c/source/common/rbbitblb.cpp
icu4c/source/common/uvector.h
icu4c/source/i18n/regexcmp.cpp
icu4c/source/i18n/repattrn.cpp
icu4c/source/test/intltest/rbbimonkeytest.cpp
icu4c/source/test/intltest/rbbitst.cpp
icu4c/source/tools/toolutil/xmlparser.cpp