Skip to content

Commit 5875e4f

Browse files
committed
Solving some Scala port bugs and trying to implement support for multiple arguments.
1 parent df28c49 commit 5875e4f

File tree

1 file changed

+8
-0
lines changed
  • source/ports/scala_port/src/main/scala

1 file changed

+8
-0
lines changed

source/ports/scala_port/src/main/scala/Ptr.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ package metacall
22

33
import metacall.util._
44
import com.sun.jna._
5+
<<<<<<< HEAD
56
import cats.implicits._
7+
=======
8+
import cats._, cats.implicits._, cats.effect._
9+
>>>>>>> Solving some Scala port bugs and trying to implement support for multiple arguments.
610

711
/** Create a [[Ptr]] to MetaCall value of type [[A]] */
812
trait Create[A] {
@@ -61,10 +65,14 @@ object Ptr {
6165
Create[FunctionPointer].create {
6266
new FunctionPointer {
6367
def callback(argc: SizeT, args: Pointer, data: Pointer): Pointer = {
68+
<<<<<<< HEAD
6469
val argsList = args
6570
.getPointerArray(0, argc.intValue())
6671
.map(ptr => Ptr.toValue(Ptr.fromPrimitiveUnsafe(ptr)))
6772
.toList
73+
=======
74+
val argsList = args.getPointerArray(0).map(ptr => Ptr.toValue(Ptr.fromPrimitiveUnsafe(ptr))).toList
75+
>>>>>>> Solving some Scala port bugs and trying to implement support for multiple arguments.
6876

6977
Ptr.fromValueUnsafe(fn(argsList)).ptr
7078
}

0 commit comments

Comments
 (0)