Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python API: Method DownloadCallbacks.add_new_download can return None
It's a backwards compatibility API. Originally, return value support was not implemented in SWIG bindings for the `add_new_download` method and the method only accepted `None` as a return value. Later, support was implemented for returning an integer, which is then passed in subsequent callbacks (`progress`, `end`, ...) as the `user_cb_data` argument. By expecting an integer instead of `None`, existing programs returning None are broken. This PR adds the ability for Python programs to return None (it has the same meaning as returning the integer 0 in this case).
- Loading branch information