Merge branch 'macros-docs-escaping' into 'main'

docs: Fix some backslash escaping issues in doc comments

See merge request GNOME/glib!4437
This commit is contained in:
Emmanuele Bassi 2024-12-12 14:27:10 +00:00
commit be72b8cc4a

View File

@ -856,25 +856,25 @@
* G_OS_WIN32: * G_OS_WIN32:
* *
* This macro is defined only on Windows. So you can bracket * This macro is defined only on Windows. So you can bracket
* Windows-specific code in "\#ifdef G_OS_WIN32". * Windows-specific code in `#ifdef G_OS_WIN32`.
*/ */
/** /**
* G_OS_UNIX: * G_OS_UNIX:
* *
* This macro is defined only on UNIX. So you can bracket * This macro is defined only on UNIX. So you can bracket
* UNIX-specific code in "\#ifdef G_OS_UNIX". * UNIX-specific code in `#ifdef G_OS_UNIX`.
* *
* To detect whether to compile features that require a specific kernel * To detect whether to compile features that require a specific kernel
* or operating system, check for the appropriate OS-specific predefined * or operating system, check for the appropriate OS-specific predefined
* macros instead, for example: * macros instead, for example:
* *
* - Linux kernel (any libc, including glibc, musl or Android): `\#ifdef __linux__` * - Linux kernel (any libc, including glibc, musl or Android): `#ifdef __linux__`
* - Linux kernel and GNU user-space: `\#if defined(__linux__) && defined(__GLIBC__)` * - Linux kernel and GNU user-space: `#if defined(__linux__) && defined(__GLIBC__)`
* - FreeBSD kernel (any libc, including glibc): `\#ifdef __FreeBSD_kernel__` * - FreeBSD kernel (any libc, including glibc): `#ifdef __FreeBSD_kernel__`
* - FreeBSD kernel and user-space: `\#ifdef __FreeBSD__` * - FreeBSD kernel and user-space: `#ifdef __FreeBSD__`
* - Apple operating systems (macOS, iOS, tvOS), regardless of whether * - Apple operating systems (macOS, iOS, tvOS), regardless of whether
* Cocoa/Carbon toolkits are available: `\#ifdef __APPLE__` * Cocoa/Carbon toolkits are available: `#ifdef __APPLE__`
* *
* See <https://sourceforge.net/p/predef/wiki/OperatingSystems/> for more. * See <https://sourceforge.net/p/predef/wiki/OperatingSystems/> for more.
*/ */
@ -883,23 +883,26 @@
* G_DIR_SEPARATOR: * G_DIR_SEPARATOR:
* *
* The directory separator character. * The directory separator character.
* This is '/' on UNIX machines and '\' under Windows. *
* This is `'/'` on UNIX machines and `'\'` under Windows.
*/ */
/** /**
* G_DIR_SEPARATOR_S: * G_DIR_SEPARATOR_S:
* *
* The directory separator as a string. * The directory separator as a string.
* This is "/" on UNIX machines and "\" under Windows. *
* This is `"/"` on UNIX machines and `"\"` under Windows.
*/ */
/** /**
* G_IS_DIR_SEPARATOR: * G_IS_DIR_SEPARATOR:
* @c: a character * @c: a character
* *
* Checks whether a character is a directory * Checks whether a character is a directory separator.
* separator. It returns %TRUE for '/' on UNIX *
* machines and for '\' or '/' under Windows. * It returns true for `'/'` on UNIX machines and for `'\'` or `'/'` under
* Windows.
* *
* Since: 2.6 * Since: 2.6
*/ */