diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-08-27 10:13:46 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-08-27 10:13:46 +0300 |
commit | 3e2ba8b58585743e59251e69ad2783eb08357079 (patch) | |
tree | 5deb7afbd67352ae40d4ee2a1c781e34851e6f4d /src/liblzma/api/lzma.h | |
parent | Install faq.txt. (diff) | |
download | xz-3e2ba8b58585743e59251e69ad2783eb08357079.tar.xz |
Updates to liblzma API headers.
Added lzma_nothrow for every function. It adds
throw() when the header is used in C++ code.
Some lzma_attrs were added or removed.
Lots of comments were improved.
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/api/lzma.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h index 77032f3a..44de60a1 100644 --- a/src/liblzma/api/lzma.h +++ b/src/liblzma/api/lzma.h @@ -198,6 +198,26 @@ #endif +/*********** + * nothrow * + ***********/ + +/* + * None of the functions in liblzma may throw an exception. Even + * the functions that use callback functions won't throw exceptions, + * because liblzma would break if a callback function threw an exception. + */ +#ifndef lzma_nothrow +# if defined(__cplusplus) +# define lzma_nothrow throw() +# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# define lzma_nothrow __attribute__((__nothrow__)) +# else +# define lzma_nothrow +# endif +#endif + + /******************** * GNU C extensions * ********************/ |