Skip to content

Commit

Permalink
Again: Don't call ObjectifyWithAttributes on a string
Browse files Browse the repository at this point in the history
Objectify and ObjectifyWithAttributes must only be called on records or
plain lists. Unfortunately this was not enforced uniformly by the GAP
kernel, but in future versions it may be.

A similar patch was already merged in January 2020, but it was reverted
(probably by accident) in April 2020 (in a commit with titled "Add
directory Congruence, plus related files", hence why I think this was an
accident).
  • Loading branch information
fingolfin committed Jan 3, 2024
1 parent 4825bba commit e3e8e16
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion doc/Test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,6 @@
<C>HAP_PERMMOVES_DIM_2</C><Br/>
<C>HAP_PERMMOVES_DIM_3</C><Br/>
<C>HAP_XYXYXYXY</C><Br/>
<C>HAP_type</C><Br/>
<C>HAPchildFunctionToggle</C><Br/>
<C>HAPchildToggle</C><Br/>
<C>HAPchildren</C><Br/>
Expand Down
2 changes: 0 additions & 2 deletions doc/Undocumented.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6099,8 +6099,6 @@
<Br/>
<C>HAP_XYXYXYXY</C>&nbsp;&nbsp;&nbsp;&nbsp;<B>Examples:</B> <Br/>
<Br/>
<C>HAP_type</C>&nbsp;&nbsp;&nbsp;&nbsp;<B>Examples:</B> <Br/>
<Br/>
<C>HAPchildFunctionToggle</C>&nbsp;&nbsp;&nbsp;&nbsp;<B>Examples:</B> <Br/>
<Br/>
<C>HAPchildToggle</C>&nbsp;&nbsp;&nbsp;&nbsp;<B>Examples:</B> <Br/>
Expand Down
8 changes: 3 additions & 5 deletions lib/CategoryTheory/categories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
## The category of groups. As the implementation improves the properties
## of this category will increase!
##
Category_Of_Groups:="Category_Of_Groups";
HAP_type:= NewType(NewFamily("Category_Of_Groups"),
BindGlobal("Category_Of_Groups", Objectify(
NewType(NewFamily("Category_Of_Groups"),
IsString and
HasInitialObject
and HasTerminalObject);
ObjectifyWithAttributes(Category_Of_Groups,HAP_type);
MakeReadOnlyGlobal("Category_Of_Groups");
and HasTerminalObject), []));


#############################################################################
Expand Down
8 changes: 3 additions & 5 deletions lib/CategoryTheory/categories.giworking
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
## The category of groups. As the implementation improves the properties
## of this category will increase!
##
Category_Of_Groups:="Category_Of_Groups";
HAP_type:= NewType(NewFamily("Category_Of_Groups"),
BindGlobal("Category_Of_Groups", Objectify(
NewType(NewFamily("Category_Of_Groups"),
IsString and
HasInitialObject
and HasTerminalObject);
ObjectifyWithAttributes(Category_Of_Groups,HAP_type);
MakeReadOnlyGlobal("Category_Of_Groups");
and HasTerminalObject), []));


#############################################################################
Expand Down
1 change: 0 additions & 1 deletion lib/hap_afterthought.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ fi;
#MakeReadOnlyGlobal("HAP_PERMMOVES_DIM_2");
#MakeReadOnlyGlobal("HAP_PERMMOVES_DIM_3");
#MakeReadOnlyGlobal("HAP_XYXYXYXY");
#MakeReadOnlyGlobal("HAP_type");
#MakeReadOnlyGlobal("HAPchildFunctionToggle");
#MakeReadOnlyGlobal("HAPchildToggle");
#MakeReadOnlyGlobal("HAPchildren");
Expand Down

0 comments on commit e3e8e16

Please sign in to comment.