]> granicus.if.org Git - icu/commitdiff
ICU-10815 Regex error handling, minor cleanups.
authorAndy Heninger <andy.heninger@gmail.com>
Tue, 2 Sep 2014 21:39:18 +0000 (21:39 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Tue, 2 Sep 2014 21:39:18 +0000 (21:39 +0000)
X-SVN-Rev: 36306

icu4c/source/i18n/rematch.cpp
icu4c/source/i18n/unicode/regex.h

index 667cb84f69ccd532e33d9fce6bd95bab1755e165..4389985e9ed7d0e0a4033801f8ea39af3f800626 100644 (file)
@@ -557,6 +557,23 @@ int32_t RegexMatcher::end(int32_t group, UErrorCode &err) const {
     return (int32_t)end64(group, err);
 }
 
+//--------------------------------------------------------------------------------
+//
+//   findProgressInterrupt  This function is called once for each advance in the target
+//                          string from the find() function, and calls the user progress callback
+//                          function if there is one installed.
+//
+//         Return:  TRUE if the find operation is to be terminated.
+//                  FALSE if the find operation is to continue running.
+//
+//--------------------------------------------------------------------------------
+UBool RegexMatcher::findProgressInterrupt(int64_t pos, UErrorCode &status) {
+    if (fFindProgressCallbackFn && !(*fFindProgressCallbackFn)(fFindProgressCallbackContext, pos)) {
+        status = U_REGEX_STOPPED_BY_CALLER;
+        return TRUE;
+    }
+    return FALSE;
+}
 
 //--------------------------------------------------------------------------------
 //
@@ -2621,24 +2638,6 @@ void RegexMatcher::IncrementTime(UErrorCode &status) {
     }
 }
 
-//--------------------------------------------------------------------------------
-//
-//   findProgressInterrupt  This function is called once for each advance in the target
-//                          string from the find() function, and calls the user progress callback
-//                          function if there is one installed.
-//
-//         Return:  TRUE if the find operation is to be terminated.
-//                  FALSE if the find operation is to continue running.
-//
-//--------------------------------------------------------------------------------
-UBool RegexMatcher::findProgressInterrupt(int64_t pos, UErrorCode &status) {
-    if (fFindProgressCallbackFn && !(*fFindProgressCallbackFn)(fFindProgressCallbackContext, pos)) {
-        status = U_REGEX_STOPPED_BY_CALLER;
-        return TRUE;
-    }
-    return FALSE;
-}
-
 //--------------------------------------------------------------------------------
 //
 //   StateSave
index 950088e192b040ca6b71f063352921f7d7b3b073..ed3b062ca39b74c9fa6d860279a4f62fc62f7e16 100644 (file)
@@ -812,7 +812,7 @@ public:
     *     position may not be valid with the altered input string.</p>
     *  @param   status  A reference to a UErrorCode to receive any errors.
     *  @return  TRUE if a match is found.
-    *  @stable @internal
+    *  @internal
     */
     virtual UBool find(UErrorCode &status);