if i’m using a k/n dynamic library from C, is there a way to go from an
Any
struct to a primitive type? For example, if I know a particular instance of
Any
contains an int, how can i get it out of the
Any
struct? I tried
int l = *(int *) kotlin_any.pinned;
, which doesn’t appear to work
o
olonho
05/03/2019, 8:52 AM
Just write a method in Kotlin doing conversion and call it
m
Michael Bryant
05/03/2019, 2:43 PM
yeah, i know i could do that. but i’m trying to write a single boilerplate method to get items of many types from kotlin lists. as it stands, i have to write