Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close the stream in PqDescendants #65

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/anupga.gi
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ InstallGlobalFunction( PQ_DESCENDANTS, function( args )
if HasIsCapable(datarec.group) and not IsCapable(datarec.group) and
VALUE_PQ_OPTION("SetupFile") = fail then
datarec.descendants := [];
if datarec.calltype = "non-interactive" then
PQ_COMPLETE_NONINTERACTIVE_FUNC_CALL(datarec);
fi;
return datarec.descendants;
fi;

Expand Down
6 changes: 6 additions & 0 deletions tst/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ gap> PqDescendantsTreeCoclassOne( PqStart( G ) : TreeDepth := 5, CapableDescenda
#I Number of descendants of group #1;1 #1;1 #1;1 to class 4: 1
#I Number of descendants of group #1;1 #1;1 #1;1 #1;1 to class 5: 1

# Check that the stream gets closed also in early exit cases.
gap> G:= ExtraspecialGroup( 3^3, "-" );;
gap> IsCapable( G );
false
gap> for i in [ 1 .. 100 ] do PqDescendants( G ); od;

#
gap> PqQuitAll();
gap> STOP_TEST( "bugfix.tst", 1 );