Skip to content

Commit 85097fc

Browse files
committed
Updated struct related comments and credits
1 parent 8331c45 commit 85097fc

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/core/t-struct.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/***********************************************************************
22
**
3-
** REBOL [R3] Language Interpreter and Run-time Environment
3+
** REBOL [R3] Language Interpreter and Run-time Environment
44
**
55
** Copyright 2014 Atronix Engineering, Inc.
6+
** Copyright 2021 Rebol Open Source Contributors
67
** REBOL is a trademark of REBOL Technologies
78
**
89
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +23,7 @@
2223
** Module: t-strut.c
2324
** Summary: C struct object datatype
2425
** Section: datatypes
25-
** Author: Shixin Zeng
26+
** Author: Shixin Zeng, Oldes
2627
** Notes:
2728
**
2829
***********************************************************************/
@@ -619,7 +620,7 @@ static REBOOL parse_field_type(struct Struct_Field *field, REBVAL *spec, REBVAL
619620
}
620621
++ val;
621622

622-
if (IS_BLOCK(val)) {// make struct! [a: [int32 [2]] [0 0]]
623+
if (IS_BLOCK(val)) {// make struct! [a: [int32! [2]] [0 0]]
623624

624625
REBVAL *ret = Do_Blk(VAL_SERIES(val), 0);
625626

@@ -649,8 +650,8 @@ static REBOOL parse_field_type(struct Struct_Field *field, REBVAL *spec, REBVAL
649650
* make struct! [
650651
* field1 [type1]
651652
* field2: [type2] field2-init-value
652-
* field3: [struct [field1 [type1]]]
653-
* field4: [type1[3]]
653+
* field3: [struct [field1 [type1]]] field3-init-struct-value
654+
* field4: [type1[3]] field4-init-block-value
654655
* ...
655656
* ]
656657
***********************************************************************/
@@ -949,7 +950,7 @@ void Copy_Struct_Val(REBVAL *src, REBVAL *dst)
949950
Copy_Struct(&VAL_STRUCT(src), &VAL_STRUCT(dst));
950951
}
951952

952-
/* a: make struct! [uint 8 i: 1]
953+
/* a: make struct! [i: [uint8!] 1]
953954
* b: make a [i: 10]
954955
*/
955956
static void init_fields(REBVAL *ret, REBVAL *spec)

src/include/reb-struct.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
** REBOL [R3] Language Interpreter and Run-time Environment
44
**
55
** Copyright 2014 Atronix Engineering, Inc.
6-
**
6+
** Copyright 2021 Rebol Open Source Contributors
77
** REBOL is a trademark of REBOL Technologies
88
**
99
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +22,7 @@
2222
**
2323
** Summary: Struct to C function
2424
** Module: reb-struct.h
25-
** Author: Shixin Zeng
25+
** Author: Shixin Zeng, Oldes
2626
**
2727
***********************************************************************/
2828

0 commit comments

Comments
 (0)