Skip to content

Commit 259b252

Browse files
committed
FIX: MT_Map must have only 3 args
1 parent fe0886f commit 259b252

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/core/t-map.c

+14-8
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,10 @@
299299

300300
/***********************************************************************
301301
**
302-
*/ REBFLG MT_Map(REBVAL *out, REBVAL *data, REBCNT type, REBU64 types)
302+
*/ REBFLG Copy_Map(REBVAL *out, REBVAL *data, REBU64 types)
303303
/*
304304
***********************************************************************/
305305
{
306-
/*
307-
Oldes asking:
308-
1. What means the MT in the function name?
309-
2. What is purpose of the unused `type` argument?
310-
*/
311306
REBCNT n;
312307
REBSER *series;
313308

@@ -331,6 +326,17 @@
331326
}
332327

333328

329+
/***********************************************************************
330+
**
331+
*/ REBFLG MT_Map(REBVAL *out, REBVAL *data, REBCNT type)
332+
/*
333+
***********************************************************************/
334+
{
335+
//Oldes: MT means "make type" and has fixed arguments
336+
return Copy_Map(out, data, 0);
337+
}
338+
339+
334340
/***********************************************************************
335341
**
336342
*/ REBSER *Map_To_Block(REBSER *mapser, REBINT what)
@@ -473,7 +479,7 @@
473479
case A_TO:
474480
// make map! [word val word val]
475481
if (IS_BLOCK(arg) || IS_PAREN(arg) || IS_MAP(arg)) {
476-
if (MT_Map(D_RET, arg, 0, 0)) return R_RET;
482+
if (Copy_Map(D_RET, arg, 0)) return R_RET;
477483
Trap_Arg(arg);
478484
// } else if (IS_NONE(arg)) {
479485
// n = 3; // just a start
@@ -499,7 +505,7 @@
499505
if (IS_DATATYPE(arg)) types |= TYPESET(VAL_DATATYPE(arg));
500506
else types |= VAL_TYPESET(arg);
501507
}
502-
if (MT_Map(D_RET, val, 0, types)) return R_RET;
508+
if (Copy_Map(D_RET, val, types)) return R_RET;
503509
Trap_Arg(val);
504510
}
505511
case A_CLEAR:

0 commit comments

Comments
 (0)