|
42 | 42 | */
|
43 | 43 |
|
44 | 44 | // Value structure (for passing args to and from):
|
| 45 | +// o: originaly (before 64bit) it was designed to fit to 8bytes |
| 46 | +// o: but tuple was still allowed to have 10 bytes, so one could not receive |
| 47 | +// o: all possible tuple values in the extension side!! |
| 48 | +// Now, when there can be stored all 12 allowed tuple bytes, the value must have 16bytes |
| 49 | +// on both (32 and 64bit) targets, so maximum number of arguments could be extended (from 7 to 15) |
45 | 50 | #pragma pack(4)
|
46 | 51 | typedef union rxi_arg_val {
|
47 | 52 | void *addr;
|
@@ -72,6 +77,12 @@ typedef union rxi_arg_val {
|
72 | 77 | REBFLG flags:16; // Handle_Flags
|
73 | 78 | REBCNT index:16; // Index into Reb_Handle_Spec value
|
74 | 79 | } handle;
|
| 80 | + struct { |
| 81 | + // keeping the same layout how it was before (first byte is size) |
| 82 | + // there could probably be a more optimal way how to pass colors! |
| 83 | + REBYTE tuple_len; |
| 84 | + REBYTE tuple_bytes[MAX_TUPLE]; |
| 85 | + }; |
75 | 86 | } RXIARG;
|
76 | 87 |
|
77 | 88 | // For direct access to arg array:
|
@@ -108,7 +119,8 @@ typedef int (*RXICAL)(int cmd, RXIFRM *args, REBCEC *ctx);
|
108 | 119 | #define RXA_DATE(f,n) (RXA_ARG(f,n).int32a)
|
109 | 120 | #define RXA_WORD(f,n) (RXA_ARG(f,n).int32a)
|
110 | 121 | #define RXA_PAIR(f,n) (RXA_ARG(f,n).pair)
|
111 |
| -#define RXA_TUPLE(f,n) (RXA_ARG(f,n).bytes) |
| 122 | +#define RXA_TUPLE(f,n) (RXA_ARG(f,n).tuple_bytes) |
| 123 | +#define RXA_TUPLE_SIZE(f,n) (RXA_ARG(f,n).tuple_size) |
112 | 124 | #define RXA_SERIES(f,n) (RXA_ARG(f,n).series)
|
113 | 125 | #define RXA_INDEX(f,n) (RXA_ARG(f,n).index)
|
114 | 126 | #define RXA_OBJECT(f,n) (RXA_ARG(f,n).addr)
|
|
0 commit comments