[Spice-devel] [PATCH spice 5/9] spicec: enable multiple CmdLineParser instantiations
Hans de Goede
hdegoede at redhat.com
Sun Oct 17 12:26:05 PDT 2010
Ack.
On 10/17/2010 05:25 PM, Arnon Gilboa wrote:
> Used by controller. One instance at a time, not thread-safe.
> Add basename() for win32.
> ---
> client/cmd_line_parser.cpp | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/client/cmd_line_parser.cpp b/client/cmd_line_parser.cpp
> index 3f45551..a813629 100644
> --- a/client/cmd_line_parser.cpp
> +++ b/client/cmd_line_parser.cpp
> @@ -53,6 +53,11 @@ CmdLineParser::CmdLineParser(std::string description, bool allow_positional_args
> , _positional_args (allow_positional_args)
> , _done (false)
> {
> + //Enables multiple instantiations. One at a time, not thread-safe.
> + optind = 1;
> + opterr = 1;
> + optopt = 0;
> + optarg = 0;
> }
>
> CmdLineParser::~CmdLineParser()
More information about the Spice-devel
mailing list