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

Replace RecFields by RecNames, mark it as obsolete #1331

Merged
merged 1 commit into from
Jun 27, 2017
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
2 changes: 1 addition & 1 deletion lib/memusage.gi
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ InstallMethod( MemoryUsage, "for a record",
MEMUSAGECACHE_DEPTH := MEMUSAGECACHE_DEPTH + 1;
mem := SHALLOW_SIZE(o) + MU_MemBagHeader + MU_MemPointer;
# Again the bag, its header, and the master pointer
for i in RecFields(o) do
for i in RecNames(o) do
s := o.(i);
if SHALLOW_SIZE(s) > 0 then # a subobject!
mem := mem + MemoryUsage(s);
Expand Down
9 changes: 9 additions & 0 deletions lib/obsolete.gd
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,15 @@ end);
## still used by Browse, ctbllib, profiling, resclasses (01/2016)
DeclareGlobalFunction( "USER_HOME_EXPAND" );

#############################################################################
##
#F RecFields
##
## This name stems from GAP 3 days.
##
## still used by Browse, ctbllib, gapdoc, genss, io, orb (05/2017)
DeclareObsoleteSynonym( "RecFields", "RecNames", "4.0" );

#############################################################################
##
#E
Expand Down
2 changes: 0 additions & 2 deletions lib/record.g
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ DeclareOperationKernel( "Unbind.", [ IsObject, IsObject ], UNB_REC );
##
DeclareAttribute( "RecNames", IsRecord );

DeclareSynonym( "RecFields", RecNames );


#############################################################################
##
Expand Down
2 changes: 1 addition & 1 deletion lib/sgpres.gi
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ InstallGlobalFunction( AugmentedCosetTableRrs,
fi;

# ensure that all components of the augmented coset table are immutable.
for field in RecFields( aug ) do
for field in RecNames( aug ) do
MakeImmutable( aug.(field) );
od;

Expand Down
4 changes: 2 additions & 2 deletions lib/string.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ InstallGlobalFunction(PrintCSV,function(arg)
else
rf:=[];
for i in l do
r:=RecFields(i);
r:=RecNames(i);
for j in r do
if not j in rf then
Add(rf,j);
Expand Down Expand Up @@ -1070,7 +1070,7 @@ local f,i,j,format,cold,a,e,z,str,new,box,lc,mini,color,alt,renum;
color:=fail;
# row 1 indicates which columns are relevant and their formatting
cold:=ShallowCopy(l[1]);
f:=RecFields(cold);
f:=RecNames(cold);
renum:=[];
for i in ShallowCopy(f) do

Expand Down
6 changes: 3 additions & 3 deletions lib/test.gi
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ InstallGlobalFunction(RunTests, function(arg)
tests := arg[1];
opts := rec( breakOnError := false, showProgress := "some" );
if Length(arg) > 1 and IsRecord(arg[2]) then
for f in RecFields(arg[2]) do
for f in RecNames(arg[2]) do
opts.(f) := arg[2].(f);
od;
fi;
Expand Down Expand Up @@ -372,7 +372,7 @@ InstallGlobalFunction("Test", function(arg)
end,
subsWindowsLineBreaks := true,
);
for c in RecFields(nopts) do
for c in RecNames(nopts) do
opts.(c) := nopts.(c);
od;
# check shortcuts
Expand Down Expand Up @@ -592,7 +592,7 @@ InstallGlobalFunction( "TestDirectory", function(arg)
exitGAP := false,
);

for c in RecFields(nopts) do
for c in RecNames(nopts) do
opts.(c) := nopts.(c);
od;

Expand Down