diff options
author | Tormod Volden <debian.tormod@gmail.com> | 2021-10-02 16:34:46 +0200 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2021-11-01 23:22:56 +0100 |
commit | 1d1411b606438169fd639e0382fa89809aa97bf5 (patch) | |
tree | b31d68942aa42ec42148bb2717b2bf162c0e0848 | |
parent | f7084fea1107625fe5aeb275a2a4801bed2920d5 (diff) | |
download | libusb-1d1411b606438169fd639e0382fa89809aa97bf5.tar.gz libusb-1d1411b606438169fd639e0382fa89809aa97bf5.tar.bz2 libusb-1d1411b606438169fd639e0382fa89809aa97bf5.zip |
doc: Explain default options in libusb_set_option documentation
References #942
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r-- | libusb/core.c | 3 | ||||
-rw-r--r-- | libusb/libusb.h | 5 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/libusb/core.c b/libusb/core.c index e6dca8b..03acdd8 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -2166,6 +2166,9 @@ void API_EXPORTED libusb_set_log_cb(libusb_context *ctx, libusb_log_cb cb, * Some options require one or more arguments to be provided. Consult each * option's documentation for specific requirements. * + * If the context ctx is NULL, the option will be added to a list of default + * options that will be applied to all subsequently created contexts. + * * Since version 1.0.22, \ref LIBUSB_API_VERSION >= 0x01000106 * * \param ctx context on which to operate diff --git a/libusb/libusb.h b/libusb/libusb.h index 2825b41..7ec3fcf 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -982,8 +982,9 @@ struct libusb_version { * Sessions are created by libusb_init() and destroyed through libusb_exit(). * If your application is guaranteed to only ever include a single libusb * user (i.e. you), you do not have to worry about contexts: pass NULL in - * every function call where a context is required. The default context - * will be used. + * every function call where a context is required, and the default context + * will be used. Note that libusb_set_option(NULL, ...) is special, and adds + * an option to a list of default options for new contexts. * * For more information, see \ref libusb_contexts. */ diff --git a/libusb/version_nano.h b/libusb/version_nano.h index af4599a..bb7f8c0 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11667 +#define LIBUSB_NANO 11668 |