-
- // TODO: getExemplars() exists only as a C API, taking a USet.
- // The set API we need to use exists only on UnicodeSet, not on USet.
- // Do a hacky cast, knowing that a USet is really a UnicodeSet in
- // the implementation. Once USet gets the missing API, switch back
- // to using that.
- USet *USetExemplars = NULL;
- ULocaleData *uld = ulocdata_open("zh",&status);
- USetExemplars = uset_open(0, 0);
- USetExemplars = ulocdata_getExemplarSet(uld, USetExemplars, 0, ULOCDATA_ES_STANDARD, &status);
+ LocalULocaleDataPointer uld(ulocdata_open("zh",&status));
+ LocalUSetPointer USetExemplars(ulocdata_getExemplarSet(uld.getAlias(), uset_openEmpty(), 0, ULOCDATA_ES_STANDARD, &status));