Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: source/common/icuplug.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/hash.h ('k') | source/common/icuplugimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/icuplug.cpp
diff --git a/source/common/icuplug.cpp b/source/common/icuplug.cpp
index 2764ea5ee0560fb733f01b7471d12e6a5918e7fb..bca7798e9f789b3c6870d1aa2340ef731a6fcdc3 100644
--- a/source/common/icuplug.cpp
+++ b/source/common/icuplug.cpp
@@ -14,6 +14,11 @@
*/
#include "unicode/icuplug.h"
+
+
+#if UCONFIG_ENABLE_PLUGINS
+
+
#include "icuplugimp.h"
#include "cstring.h"
#include "cmemory.h"
@@ -307,6 +312,9 @@ static void uplug_queryPlug(UPlugData *plug, UErrorCode *status) {
static void uplug_loadPlug(UPlugData *plug, UErrorCode *status) {
+ if(U_FAILURE(*status)) {
+ return;
+ }
if(!plug->awaitingLoad || (plug->level < UPLUG_LEVEL_LOW) ) { /* shouldn't happen. Plugin hasn'tbeen loaded yet.*/
*status = U_INTERNAL_PROGRAM_ERROR;
return;
@@ -352,13 +360,11 @@ static UPlugData *uplug_allocateEmptyPlug(UErrorCode *status)
static UPlugData *uplug_allocatePlug(UPlugEntrypoint *entrypoint, const char *config, void *lib, const char *symName,
UErrorCode *status) {
- UPlugData *plug;
-
+ UPlugData *plug = uplug_allocateEmptyPlug(status);
if(U_FAILURE(*status)) {
return NULL;
}
- plug = uplug_allocateEmptyPlug(status);
if(config!=NULL) {
uprv_strncpy(plug->config, config, UPLUG_NAME_MAX);
} else {
@@ -870,3 +876,7 @@ uplug_init(UErrorCode *status) {
gCurrentLevel = UPLUG_LEVEL_HIGH;
ucln_registerCleanup(UCLN_UPLUG, uplug_cleanup);
}
+
+#endif
+
+
« no previous file with comments | « source/common/hash.h ('k') | source/common/icuplugimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698