Skip to content

Commit c236ccb

Browse files
committed
---
yaml --- r: 6601 b: refs/heads/master c: 00636e3 h: refs/heads/master i: 6599: 65c09cf v: v3
1 parent 231b987 commit c236ccb

File tree

2 files changed

+40
-11
lines changed

2 files changed

+40
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c11d0b0aa0343fbc6ddf8114ce96904c9870de8a
2+
refs/heads/master: 00636e3155647f843fb1f8e8c981429feb8dd7f2

trunk/src/rt/rust_upcall.cpp

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,41 @@ upcall_s_rust_personality(s_rust_personality_args *args) {
344344
args->context);
345345
}
346346

347+
extern "C" void
348+
shape_cmp_type(int8_t *result, const type_desc *tydesc,
349+
const type_desc **subtydescs, uint8_t *data_0,
350+
uint8_t *data_1, uint8_t cmp_type);
351+
352+
struct s_cmp_type_args {
353+
int8_t *result;
354+
const type_desc *tydesc;
355+
const type_desc **subtydescs;
356+
uint8_t *data_0;
357+
uint8_t *data_1;
358+
uint8_t cmp_type;
359+
};
360+
361+
extern "C" void
362+
upcall_s_cmp_type(s_cmp_type_args *args) {
363+
shape_cmp_type(args->result, args->tydesc, args->subtydescs,
364+
args->data_0, args->data_1, args->cmp_type);
365+
}
366+
367+
extern "C" void
368+
shape_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level);
369+
370+
struct s_log_type_args {
371+
const type_desc *tydesc;
372+
uint8_t *data;
373+
uint32_t level;
374+
};
375+
376+
extern "C" void
377+
upcall_s_log_type(s_log_type_args *args) {
378+
shape_log_type(args->tydesc, args->data, args->level);
379+
}
380+
381+
347382
// ______________________________________________________________________________
348383
// Upcalls in original format: deprecated and should be removed once snapshot
349384
// transitions them away.
@@ -457,24 +492,18 @@ upcall_rust_personality(int version,
457492
return upcall_s_rust_personality(&args);
458493
}
459494

460-
extern "C" void
461-
shape_cmp_type(int8_t *result, const type_desc *tydesc,
462-
const type_desc **subtydescs, uint8_t *data_0,
463-
uint8_t *data_1, uint8_t cmp_type);
464-
465495
extern "C" void
466496
upcall_cmp_type(int8_t *result, const type_desc *tydesc,
467497
const type_desc **subtydescs, uint8_t *data_0,
468498
uint8_t *data_1, uint8_t cmp_type) {
469-
shape_cmp_type(result, tydesc, subtydescs, data_0, data_1, cmp_type);
499+
s_cmp_type_args args = {result, tydesc, subtydescs, data_0, data_1, cmp_type};
500+
upcall_s_cmp_type(&args);
470501
}
471502

472-
extern "C" void
473-
shape_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level);
474-
475503
extern "C" void
476504
upcall_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level) {
477-
shape_log_type(tydesc, data, level);
505+
s_log_type_args args = {tydesc, data, level};
506+
upcall_s_log_type(&args);
478507
}
479508

480509
//

0 commit comments

Comments
 (0)