Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals #183

Merged
merged 219 commits into from
Oct 1, 2018
Merged

ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals #183

merged 219 commits into from
Oct 1, 2018

Conversation

pedberg-icu
Copy link
Contributor

@pedberg-icu pedberg-icu commented Sep 30, 2018

Mostly just adjusting comments as noted below; the only real change is in unumberformatter.h (last item):

  • Mark some @internal as "(private)"
  • Comment some #endifs with what they are ending
  • Delete @stable tags for some private methods
  • Add #ifndef U_HIDE_INTERNAL_API/U_HIDE_DEPRECATED_API in unumberformatter.h
Checklist

srl295 and others added 30 commits July 18, 2018 11:46
…ash while executing. (#12)

Fix the `icucheck.bat` script (used to run the ICU4C tests on Windows) so that it handles the case where a test crashes while executing.
… conversion from the scripts. Also add some comments for others, and use the diff helpers for better diffs.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Originally ICU-20030
- Updated javac/javadoc source and target Java version to 1.7.
- Eclipse projects to use execution environment JavaSE-1.7.
- Replaced java6.bootclasspath with java7.bootclasspath.
- Removed pre-Java 7 conditional build targets.
- Deleted stylesheet for JDK6 build.
Previously, some developers accidentally introduced Java 7 Objects class utility methods. At that time, we once added Java 6 compatible implementation in com.ibm.icu.impl.Utility class. Now, we use Java 7 as the minimum supported Java version, so we can use Java 7 Objects class and methods.

There are some extra changes dropping generics type from constructor. For example from `ArrayList<String> output = new ArrayList<String>();` to `ArrayList<String> output = new ArrayList<>();`. The updated syntax is allowed since Java 7. We have eclipse project configured to normalize such expression, therefore, files touched by this commit were automatically updated. These changes are not directly related to Java 7 Objects method replacement.
Previously, ULocale had to work on Java 6, therefore, Java 7 specific Locale methods needed to be invoked by reflection. For the next release, we can directly call Java 7 Locale APIs, so rather complicated reflection implementation were replaced with simple API calls.
ICU-13829 Languagematcher: Fixes straightforward code issues.
* ICU-20033: add a README.md

- add a basic README.md linking to icu4c and icu4j

PR-URL: #11
…uest #16 from jefgen/jefgen/20005

ICU-20005 Clean-up and update the .gitattributes file
…ogus if OOM occurs. (#14)

ICU-20034 ICU4C the Locale class's assignment operator should set the locale to "bogus" if an OOM error occurs when attempting to copy data over from the other locale.
Also need to check strdup, as that calls malloc and it can fail too.
…tToBogus when out-of-memory (OOM) failure occurs. (#15)
- PluralRules class doesn't handle out-of-memory (OOM) errors in some code paths.
- The clone and assignment operator (operator=) methods of construction don't take an error code  parameter, meaning that if an OOM error occurs during the constructor, it will not reported back to the caller, and the caller has no way to know that the object is in a half-constructed state.
- Using an internal status variable for these above cases.
- Changes to the various PluralRules helper classes to check for OOM as well.
- Using nullptr instead NULL.
- Using LocalPointer instead of raw new/delete in some cases.
- Need to set mRules to nullptr, otherwise we can end up with double deletes in the failure case. (Thanks to Andy for the review).
- Using default member initializers for class members to avoid dangling pointers. Also allows for using default constructors too.
…19)

ICU-20041 ICU4C NumberingSystem class doesn't handle out-of-memory (OOM) failures.

- Not all code paths in the NumberingSystem class check for OOM failures. This can lead to crashes in some cases as null pointers will be dereferenced without any checks.
- Change to use nullptr instead of NULL.
- Don't stomp on OOM errors when attempting to load resources. We should report back OOM to the caller.
- Use LocalPointer in order simplify the code and for automatic clean-up of memory.
- Use LocalUResourceBundlePointer as well to help simply things even more.
…ug config (#28)

For builds using Cygwin and MSVC with Debug configuration, '.dll' and '.lib' binaries has 'd' suffix.

Doing the same for builds using MinGW and MinGW64, based on the code from MSVC toolchain.

Task-number: ICU-13138
- There are a few locations in the RBNF class that don't check for out-of-memory (OOM) failures.
- Using LocalPointer to clean up the manual deletes.
- Change to use nullptr instead of NULL.
- A few minor typo fixes as well.
Both the number of installed locales and the name of the last locale
change with updates to and customizations of CLDR/ICU data so test
expectations on these values will cause bogus test failures.
ICU-20036 CurrencyPluralInfo class doesn't always check/handle OOM errors.

Changes include:
- Using LocalPointer instead of raw new/delete, in order to make the code cleaner.
- Using nullptr instead of NULL.
- Inspired by Andy's review feedback PluralRules changes, this change sets fPluralRules and fLocale to nullptr in the assignment operator in order to prevent possible double deletes in the failure case.
- More consistent about not checking for nullptr when calling delete.
- Using LocalUResourceBundlePointer in order to simply the code and not need manual deletes.
- Reduce memory usage by using the same LocalUResourceBundle with .getAlias() instead of allocating new ones.
At the moment, CLDR pseudolocale region codes don't have display names.
As long as that is so, ICU must not require them to exist in order to
not cause bogus test failures when building with pseudolocales.
* ICU-20003: add a PR template
Create a GItHub PR template
* ICU-13685 - add a @Preview tag in Doxygen

* Change @internal to @Preview for existing tech preview sites

ICU-13685
pedberg-icu and others added 20 commits September 21, 2018 14:11
ICU-20119 Integrate CLDR release-34-alpha2, adjust code & test, update MeasureUnit
* ICU-20119 Update and fixes for the following BRS tasks:
 - Update urename.h
 - Test uconfig.h variations

* ICU-20119 Updates copyright scanner script exclusions: don't scan ./git/*.

* ICU-20119 Changes in reply to comments for pull requst #165.
…169)

otherwise includes entry points that should not be included.
uloc_forLanguageTag has a few mapping tables to map grandfathered
language tags and deprecated language subtags to their preferred or
modern values.

Update them based on the latest version of the IANA
language subtag registry. [1]

Five grandfathered tags without a preferred value are still mapped to
what ICU has mapped them to for backward compatibility until the
wisdom of continuing to do so is reviewed.

In addition, map redundant language tags to their preferred values
regardless of whether they're followed by other subtags or not. (e.g.
zh-yue vs zh-yue-u-co-pinyin) .

Similary, ja-latn-hepburn-heploc is mapped to ja-latn-alaic97 (the
variant subtag 'hepburn-helploc' with the prefix 'ja-latn' has the
preferred value, 'alaic97') .

Update the mapping for deprecated language subtags (e.g. 'jw' to
'jv' and a bunch of 3-letter language codes).

Add a new table for deprecated region subtags to map them to their
modern values. (e.g. 'DD' to 'DE').

Add a new test case for deprecated language and region mapping and
a few more cases for updated grandfathered and redundant tag mapping.

[1]
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
…177)

check was needed in the test cases to prevent a segmentation fault.
@pedberg-icu pedberg-icu merged commit bcd0a41 into unicode-org:master Oct 1, 2018
@pedberg-icu pedberg-icu deleted the icu4c63rc-guardConditionals branch October 1, 2018 04:24
@sffc
Copy link
Member

sffc commented Oct 1, 2018

It looks like @pedberg-icu's workspace is still not configured correctly. Looking at git flow, it seems like there is an automatic merge from the old head to the branch.

Pull requests with 219 commits are harmful, in part because they confuse Jira. This pull request is linked to every issue in the 219 commits.

Peter, can you run git checkout master followed by git log and confirm that master, origin/master, and upstream/master are all pointing to the same sha? Also make sure that you don't have any local branches that are hanging onto the old head. If necessary, upstream/master is the source of truth, and you should reset local master or force-push to origin/master to get them in sync.

@pedberg-icu
Copy link
Contributor Author

pedberg-icu commented Oct 2, 2018 via email

@pedberg-icu
Copy link
Contributor Author

pedberg-icu commented Oct 2, 2018 via email

@pedberg-icu
Copy link
Contributor Author

pedberg-icu commented Oct 3, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.