Re: Difficulties with C FFI & writing a concurrent stack

2019-11-18 Thread Hongwei Xi
Took a closer look. 'atstype_var' should be changed to 'atstype_boxed'. The real problem is due to 'pop' being given an incorrect type. I tried the following type to make the code work: extern fun pop {a:type}(_t(a) >> _) : (a) = "ext#pop_ats" To mix C with ATS can be difficult. In

Re: Difficulties with C FFI & writing a concurrent stack

2019-11-18 Thread Vanessa McHale
Thanks for the response! Unfortunately I still get trouble, viz. ... atstype_boxed pop_ats(atstype_ref st) { return __cats_pop(st); } atsvoid_t0ype new_ats(atstype_ref st) { __cats_new(st); } atsvoid_t0ype push_ats(atstype_ref st, atstype_boxed val) { __cats_push(st, val); } %} typedef