From b5bcf61fe789e66df2de609ec246cb7e4d326180 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 1 Nov 2019 14:43:42 +0900 Subject: Use FcConfigReference/Destroy appropriately instead of FcConfigGetCurrent This may improves to be MT-safe. Reported at https://bugs.chromium.org/p/chromium/issues/detail?id=1004254 --- doc/fcconfig.fncs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs index 82769d5..e709b54 100644 --- a/doc/fcconfig.fncs +++ b/doc/fcconfig.fncs @@ -174,6 +174,10 @@ Returns one of the two sets of fonts from the configuration as specified by set. This font set is owned by the library and must not be modified or freed. If config is NULL, the current configuration is used. + +This function isn't MT-safe. FcConfigReference must be called +before using this and then FcConfigDestroy when +the return value is no longer referenced. @@ @RET@ FcBlanks * @@ -407,6 +411,10 @@ parse error, semantic error or allocation failure. Otherwise returns FcTrue. Obtains the system root directory in 'config' if available. All files (including file properties in patterns) obtained from this 'config' are relative to this system root directory. + +This function isn't MT-safe. FcConfigReference must be called +before using this and then FcConfigDestroy when +the return value is no longer referenced. @SINCE@ 2.10.92 @@ @@ -433,6 +441,10 @@ When setting this on the current config this causes changing current config @PURPOSE@ Initialize the iterator @DESC@ Initialize 'iter' with the first iterator in the config file information list. + +This function isn't MT-safe. FcConfigReference must be called +before using this and then FcConfigDestroy when the relevant +values are no longer referenced. @SINCE@ 2.12.91 @@ @@ -444,6 +456,10 @@ Initialize 'iter' with the first iterator in the config file information list. @DESC@ Set 'iter' to point to the next node in the config file information list. If there is no next node, FcFalse is returned. + +This function isn't MT-safe. FcConfigReference must be called +before using FcConfigFileInfoIterInit and then +FcConfigDestroy when the relevant values are no longer referenced. @SINCE@ 2.12.91 @@ @@ -459,5 +475,9 @@ If there is no next node, FcFalse is returned. Obtain the filename, the description and the flag whether it is enabled or not for 'iter' where points to current configuration file information. If the iterator is invalid, FcFalse is returned. + +This function isn't MT-safe. FcConfigReference must be called +before using FcConfigFileInfoIterInit and then +FcConfigDestroy when the relevant values are no longer referenced. @SINCE@ 2.12.91 @@ -- cgit v1.2.1