Skip to content

Commit 4bbec09

Browse files
committed
FIX: modified host test extension so it is possible to compile it again
1 parent fa0c046 commit 4bbec09

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/os/host-ext-test.c

+12-5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ REBCNT Test_Sync_Callback(REBSER *obj, REBCNT word, RXIARG *result)
110110
RXIARG args[4];
111111
REBCNT n;
112112

113+
puts("Test_Sync_Callback");
114+
113115
// These can be on the stack, because it's synchronous.
114116
CLEAR(&cbi, sizeof(cbi));
115117
CLEAR(&args[0], sizeof(args));
@@ -136,6 +138,8 @@ REBCNT Test_Async_Callback(REBSER *obj, REBCNT word)
136138
RXIARG *args;
137139
REBCNT n;
138140

141+
puts("Test_Async_Callback");
142+
139143
// These cannot be on the stack, because they are used
140144
// when the callback happens later.
141145
cbi = MAKE_NEW(*cbi);
@@ -158,8 +162,7 @@ REBCNT Test_Async_Callback(REBSER *obj, REBCNT word)
158162
return n;
159163
}
160164

161-
162-
RXIEXT int RX_Call(int cmd, RXIFRM *frm, REBCEC *ctx) {
165+
RXIEXT int RX_Call(int cmd, RXIFRM *frm, void *ctx) {
163166
REBYTE *str;
164167

165168
switch (cmd) {
@@ -217,8 +220,12 @@ RXIEXT int RX_Call(int cmd, RXIFRM *frm, REBCEC *ctx) {
217220
return RXR_UNSET;
218221

219222
case 10:
220-
RXA_INT64(frm, 1) = (i64)(ctx ? ctx->index : -1);
221-
RXA_TYPE(frm, 1) = RXT_INTEGER;
223+
{
224+
REBCEC* cec = (REBCEC*)ctx;
225+
RXA_INT64(frm, 1) = (i64)(cec ? cec->index : -1);
226+
RXA_TYPE(frm, 1) = RXT_INTEGER;
227+
}
228+
222229
break;
223230

224231
default:
@@ -230,5 +237,5 @@ RXIEXT int RX_Call(int cmd, RXIFRM *frm, REBCEC *ctx) {
230237

231238
void Init_Ext_Test(void)
232239
{
233-
RL = RL_Extend(&RX_Spec[0], &RX_Call);
240+
RL = RL_Extend(&RX_Spec[0], (RXICAL)&RX_Call);
234241
}

0 commit comments

Comments
 (0)