Skip to content

Commit 2cc8c73

Browse files
committed
CHANGE: Disable support for Rebol values in struct
1 parent 4763277 commit 2cc8c73

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/core/m-gc.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ static void Mark_Value(REBVAL *val, REBCNT depth);
167167
Mark_Struct_Field(stu, (struct Struct_Field *)SERIES_SKIP(series, len), depth + 1);
168168
}
169169
}
170+
#ifdef unused
170171
else if (field->type == STRUCT_TYPE_REBVAL) {
171172
REBCNT i;
172173
ASSERT2(field->size == sizeof(REBVAL), RP_BAD_SIZE);
@@ -178,7 +179,7 @@ static void Mark_Value(REBVAL *val, REBCNT depth);
178179
}
179180
}
180181
}
181-
182+
#endif
182183
/* ignore primitive datatypes */
183184
}
184185

src/core/t-struct.c

+11-1
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ static get_scalar(REBSTU *stu,
110110
VAL_STRUCT_LEN(val) = field->size;
111111
}
112112
break;
113+
#ifdef unused
113114
case STRUCT_TYPE_REBVAL:
114115
memcpy(val, data, sizeof(REBVAL));
115116
break;
117+
#endif
116118
default:
117119
/* should never be here */
118120
return FALSE;
@@ -437,6 +439,7 @@ static void parse_attr (REBVAL *blk, REBINT *raw_size, REBUPT *raw_addr)
437439
}
438440
break;
439441
case SYM_EXTERN:
442+
#ifdef unused
440443
++ attr;
441444

442445
if (*raw_addr != 0) /* raw-memory is exclusive with extern */
@@ -466,6 +469,9 @@ static void parse_attr (REBVAL *blk, REBINT *raw_size, REBUPT *raw_addr)
466469

467470
*raw_addr = (REBUPT)addr;
468471
}
472+
#else
473+
Trap0(RE_FEATURE_NA);
474+
#endif
469475
break;
470476
/*
471477
case SYM_ALIGNMENT:
@@ -848,7 +854,11 @@ static REBOOL parse_field_type(struct Struct_Field *field, REBVAL *spec, REBVAL
848854
return PE_BAD_SELECT;
849855
}
850856

851-
REBINT Cmp_Struct(REBVAL *s, REBVAL *t)
857+
/***********************************************************************
858+
**
859+
*/ REBINT Cmp_Struct(REBVAL *s, REBVAL *t)
860+
/*
861+
***********************************************************************/
852862
{
853863
REBINT n = VAL_STRUCT_FIELDS(s) - VAL_STRUCT_FIELDS(t);
854864
if (n != 0) {

0 commit comments

Comments
 (0)