diff --git a/.gitignore b/.gitignore index da9ce23..d3a2cb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ clast ast.txt *.ast -program examples/bluetooth/bluetooth examples/bluetooth/ble/main.go examples/foundation/foundation diff --git a/examples/bluetooth/main.go b/examples/bluetooth/main.go index 9c5a6f8..35dcc8d 100644 --- a/examples/bluetooth/main.go +++ b/examples/bluetooth/main.go @@ -7,7 +7,7 @@ import ( ) func main() { - cd := ble.NewBle_delegate().Init() + cd := ble.Ble_delegateAlloc().Init() fmt.Println("LE capable:",cd.IsLECapableHardware()) time.Sleep(time.Second * 1) fmt.Println("LE capable:",cd.IsLECapableHardware()) diff --git a/objc/main.m b/objc/main.m deleted file mode 100644 index 21c4472..0000000 --- a/objc/main.m +++ /dev/null @@ -1,8 +0,0 @@ -#import - -int -main(int argc, char* argv[]) { - CBCentralManager *m; - return 0; -} - diff --git a/wrap/main.go b/wrap/main.go index e74a494..7c63dff 100644 --- a/wrap/main.go +++ b/wrap/main.go @@ -745,14 +745,14 @@ func (w *Wrapper) Wrap(toproc []string) { i.Name, len(i.Properties), len(i.Methods)) w.goCode.WriteString(fmt.Sprintf(` -func New%s() *%s { - return (*%s)(unsafe.Pointer(C.New%s())) +func %sAlloc() *%s { + return (*%s)(unsafe.Pointer(C.%sAlloc())) } `,i.GoName,i.GoName,i.GoName,i.Name)) w.cCode.WriteString(fmt.Sprintf(` %s* -New%s() { +%sAlloc() { return [%s alloc]; } `, i.Name, i.Name, i.Name))