Skip to content

Commit 65d3b97

Browse files
committed
Fix for TF_Generator
We can't add new TF types in the middle of the tformTag enum, as the hashcode of TF_Map (and others) may change. This then breaks the fricas interop code.
1 parent 8b20958 commit 65d3b97

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

aldor/aldor/src/tform.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8489,7 +8489,6 @@ struct tform_info tformInfoTable[] = {
84898489
{TF_Enumerate, "Enumeration", "Enumeration", 0, 1},
84908490
{TF_Forward, "Forward", "Forward", 0, 1},
84918491
{TF_Generator, "Generator", "Generator", 0, 1},
8492-
{TF_XGenerator, "XGenerator", "XGenerator", 0, 1},
84938492
{TF_If, "If", "If", 0, 3},
84948493
{TF_Instance, "Instance", "Instance", 0, 2},
84958494
{TF_Join, "Join", "Join", 0, TF_NARY},
@@ -8510,6 +8509,7 @@ struct tform_info tformInfoTable[] = {
85108509
{TF_Variable, "Variable", "Variable", 0, 1},
85118510
{TF_With, "With", "With", 0, 2},
85128511
{TF_Except, "Except", "Except", 0, 2},
8512+
{TF_XGenerator, "XGenerator", "XGenerator", 0, 1},
85138513

85148514
{TF_LIMIT, "LIMIT", "LIMIT", 0, 0}
85158515
};

aldor/aldor/src/tform.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extern SymeList tfSetSymesFn(TForm, SymeList);
2323
*
2424
*****************************************************************************/
2525

26+
// Note that the order is fixed - gen0RtArgHash and fricas need to agree
2627
enum tformTag {
2728
TF_START,
2829
TF_SYM_START = TF_START,
@@ -47,7 +48,6 @@ enum tformTag {
4748
TF_Enumerate,
4849
TF_Forward,
4950
TF_Generator,
50-
TF_XGenerator,
5151
TF_If,
5252
TF_Instance,
5353
TF_Join,
@@ -68,6 +68,7 @@ enum tformTag {
6868
TF_Variable,
6969
TF_With,
7070
TF_Except,
71+
TF_XGenerator,
7172
TF_NODE_LIMIT,
7273
TF_LIMIT = TF_NODE_LIMIT
7374
};

0 commit comments

Comments
 (0)