As a Swift Call Build Function

In xcode 8.0, I have an s file with a hand assembly block of code that I wrote. I want to call this asm function and pass it a pointer - from my Swift code. How to do it?

The following shows how I did the same in objective-c:

void my_asm_function(int *myptr); //this is prototype in my h-file my_asm_function(&myIntVar); // this is how i call the function from my obj-c code 
+6
source share
1 answer

Just call your function like any other C function ... Something like this should help you straightforwardly: How do I call C from Swift?

+2
source

Source: https://habr.com/ru/post/1011902/


All Articles