- Added shebang and made the script executable.
- Added help text.
- Added -o/--out argument for specifying output directory.
- Added -e/--extension argument for specifying file extension of the
implementation file.
- Made the script find httplib.h next to split.py instead of the current
working directory. This makes it possible to call the script from
another directory.
- Simplified code structure slightly.
- Improved variable naming to follow Python conventions.
* Add header-only Meson support
This allows users to call `dependency('httplib')` and have the include
directory automatically configured
* Rename `httplib` to `cpp-httplib`
* Fix virtual call in ClientImpl::~ClientImpl()
This fixes a warning in clang tidy:
> Call to virtual method 'ClientImpl::shutdown_ssl' during
> destruction bypasses virtual dispatch
ClientImpl::~ClientImpl() calls lock_socket_and_shutdown_and_close()
that itself calls shutdown_ssl(). However, shutdown_ssl() is virtual
and C++ does not perform virtual dispatch in destructors, which results
in the wrong overload being called.
This change adds a non-virtual shutdown_ssl_impl() function that is
called from ~SSLClient(). We also inline sock_socket_and_shutdown_and_close()
and removes the virtual call in ~ClientImpl().
* Inline and remove lock_socket_and_shutdown_and_close()
The function only has one caller.
* Fix client.cc code, since res.error() without operator overloading causing error in Xcode
* Add unit test to check new error to string with operator overloading
* Add inline as requested in code review comment