typedef void (FunctionWithLotsOfParameters)(int a,
int b, int c, int d, int e, int f, int g, int h,
int i, int j, int k, int l, int m, int n, int o, int p, int q, int r, int s, int t,
int u, int v, int w, int x, int y, int z);
package my_bindings
import _root_.scala.scalanative.unsafe.*
import _root_.scala.scalanative.unsigned.*
import _root_.scala.scalanative.libc.*
import _root_.scala.scalanative.*
object aliases:
import _root_.my_bindings.aliases.*
type FunctionWithLotsOfParameters = CFuncPtr26[CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, Unit]
object FunctionWithLotsOfParameters:
given _tag: Tag[FunctionWithLotsOfParameters] = Tag.materializeCFuncPtr26[CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, Unit]
inline def apply(inline o: CFuncPtr26[CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, Unit]): FunctionWithLotsOfParameters = o
extension (v: FunctionWithLotsOfParameters)
inline def value: CFuncPtr26[CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, CInt, Unit] = v
object types:
export _root_.my_bindings.aliases.*
object all:
export _root_.my_bindings.aliases.FunctionWithLotsOfParameters
The issue here is that at this point I don't know how to even represent this in Scala.
The overhead on this puppy is going to be severe.
https://sn-bindgen-web.indoorvivants.com/binding/4974b0bb-4a5a-4b0d-9597-86b9774f2fd0
This of course is not possible (
CFuncPtr22is the maximum)The issue here is that at this point I don't know how to even represent this in Scala.
One idea is
opaque type FunctionWithLotsOfParameters = Ptr[Byte]apply(...)extension onFunctionWithLotsOfParameterswhich takes all the parameters, packs them into a stack allocated struct, then invokesFunctionWithLotsOfParametersThe overhead on this puppy is going to be severe.