mv _testcgo => _testrt
This commit is contained in:
14
cl/_testrt/alloca/in.go
Normal file
14
cl/_testrt/alloca/in.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/internal/runtime/c"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := c.Str("Hi\n")
|
||||
s2 := c.Alloca(4)
|
||||
c.Memcpy(s2, unsafe.Pointer(s), 4)
|
||||
c.Printf(c.Str("%s"), s2)
|
||||
}
|
||||
Reference in New Issue
Block a user