]> git.wh0rd.org - fontconfig.git/blobdiff - doc/fcconfig.fncs
Add FcConfigReference() (#17124)
[fontconfig.git] / doc / fcconfig.fncs
index 16d1000b9a47900612586d435f35703bc38e98dc..3ceab9218828d316459bb87d61a0a839f3c851d8 100644 (file)
 Creates an empty configuration.
 @@
 
+@RET@           FcConfig *
+@FUNC@          FcConfigReference
+@TYPE1@         FcConfig *                      @ARG1@          config
+@PURPOSE@      Increment config reference count
+@DESC@
+Add another reference to <parameter>config</parameter>. Configs are freed only
+when the reference count reaches zero.
+If <parameter>config</parameter> is NULL, the current configuration is used.
+In that case this function will be similar to FcConfigGetCurrent() except that
+it increments the reference count before returning and the user is responsible
+for destroying the configuration when not needed anymore.
+@@
+
 @RET@           void
 @FUNC@          FcConfigDestroy
 @TYPE1@         FcConfig *                      @ARG1@          config
 @PURPOSE@      Destroy a configuration
 @DESC@
-Destroys a configuration and any data associated with it.  Note that calling
-this function with the return from FcConfigGetCurrent will place the library
-in an indeterminate state.
+Decrements the config reference count. If all references are gone, destroys
+the configuration and any data associated with it.
+Note that calling this function with the return from FcConfigGetCurrent will
+cause a new configuration to be created for use as current configuration.
 @@
 
 @RET@           FcBool