diff --git a/doc/libpkgconf-path.rst b/doc/libpkgconf-path.rst index 6fb8dbc..ad25a3e 100644 --- a/doc/libpkgconf-path.rst +++ b/doc/libpkgconf-path.rst @@ -52,3 +52,12 @@ variables. :param pkgconf_list_t* dirlist: The path list to clean up. :return: nothing + +.. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen) + + Relocates a path, possibly calling realpath() or cygwin_conv_path() on it. + + :param char* buf: The path to relocate. + :param size_t buflen: The buffer length the path is contained in. + :return: true on success, false on error + :rtype: bool diff --git a/libpkgconf/path.c b/libpkgconf/path.c index cb6c498..8523642 100644 --- a/libpkgconf/path.c +++ b/libpkgconf/path.c @@ -225,6 +225,18 @@ pkgconf_path_free(pkgconf_list_t *dirlist) } } +/* + * !doc + * + * .. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen) + * + * Relocates a path, possibly calling realpath() or cygwin_conv_path() on it. + * + * :param char* buf: The path to relocate. + * :param size_t buflen: The buffer length the path is contained in. + * :return: true on success, false on error + * :rtype: bool + */ bool pkgconf_path_relocate(char *buf, size_t buflen) {