Fix Regression in [OUT] parameters handling (Issue #287) #289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I identified and fixed two bugs:
During bindings generation (
PythonGenerator.generate_funcsandPythonGenerator.generate_func_pointer_decorator),Func.docs_in_sphinx_formatwas called afterPar.flags, when the former fills theoutmember ofFunc, which determines the output ofPar.flags. This resulted in out parameters being ignored, even though they are properly gathered byFunc.docs_in_sphinx_format. Actually, some are still taken into account, because inPar.flags, some pointer types are hard-coded to be considered out parameters (this hard-coding may not be necessary anymore).This issue is fixed by commit "Partially fix regression in [OUT] parameter handling".
The functions concerned by the fix are:
libvlc_log_get_contextlibvlc_log_get_objectFunc.docs_in_sphinx_formatdid not properly gather all out parameters. It failed to gather those that have documentation spanning multiple lines. As the[OUT]flag is often (always?) present at the end of a parameter's documentation, it was missed in those cases.This issue is fixed by commit "Fix regression in [OUT] parameters handling".
The functions concerned by the fix are:
libvlc_media_discoverer_list_getlibvlc_media_player_get_full_chapter_descriptionslibvlc_media_player_get_full_title_descriptionslibvlc_media_slaves_getlibvlc_media_tracks_getlibvlc_renderer_discoverer_list_getWhat I have not done is change
generator/templates/override.py, which has calls to:libvlc_media_player_get_full_chapter_descriptionslibvlc_media_player_get_full_title_descriptionslibvlc_media_tracks_getthat now take an incorrect number of arguments.
Tests fail for this reason.
Otherwise, the first commit ("Fix dumping of parameters that are Func and not Par") fixes a small bug in the code for dumping in debug mode.