diff --git a/go.mod b/go.mod index dfa661f24..def0d0efc 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/fsnotify/fsnotify v1.7.0 github.com/goplus/gogen v1.16.0 - github.com/goplus/llgo v0.8.8 + github.com/goplus/llgo v0.8.9-0.20240617173025-e35d70f33870 github.com/goplus/mod v0.13.10 github.com/qiniu/x v1.13.10 golang.org/x/tools v0.22.0 diff --git a/go.sum b/go.sum index 4008f771d..7177a30fa 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/goplus/gogen v1.16.0 h1:hAK2ZX8vCjH+Y2QoJl9viSZ8Gw9pzE0vCz5voYBYnv4= github.com/goplus/gogen v1.16.0/go.mod h1:92qEzVgv7y8JEFICWG9GvYI5IzfEkxYdsA1DbmnTkqk= -github.com/goplus/llgo v0.8.8 h1:hnp4XSDIcNBbaNPfl2cL0o2F6lvD7Uy9yX6SHhS9R+o= -github.com/goplus/llgo v0.8.8/go.mod h1:iboncA0EqWVi0MTJI1UARRE/b+EvAGblKujuIYBFj2Q= +github.com/goplus/llgo v0.8.9-0.20240617173025-e35d70f33870 h1:fxoDFnxqik7ZcSNpa/3NAWZKCHaC1DW0l78duBkT99g= +github.com/goplus/llgo v0.8.9-0.20240617173025-e35d70f33870/go.mod h1:iboncA0EqWVi0MTJI1UARRE/b+EvAGblKujuIYBFj2Q= github.com/goplus/mod v0.13.10 h1:5Om6KOvo31daN7N30kWU1vC5zhsJPM+uPbcEN/FnlzE= github.com/goplus/mod v0.13.10/go.mod h1:HDuPZgpWiaTp3PUolFgsiX+Q77cbUWB/mikVHfYND3c= github.com/qiniu/x v1.13.10 h1:J4Z3XugYzAq85SlyAfqlKVrbf05glMbAOh+QncsDQpE= diff --git a/testdata/_llgo/qsort/qsort.gop b/testdata/_llgo/qsort/qsort.gop new file mode 100644 index 000000000..3bad6e22b --- /dev/null +++ b/testdata/_llgo/qsort/qsort.gop @@ -0,0 +1,12 @@ +import ( + "c" + "unsafe" +) + +a := [100, 8, 23, 2, 7] +c.qsort unsafe.Pointer(&a[0]), 5, unsafe.Sizeof(0), (a, b) => { + return c.Int(*(*int)(a) - *(*int)(b)) +} +for v <- a { + c.printf C"%d\n", v +}