loader: remove redundant gateway function
Этот коммит содержится в:
родитель
b88180f8e6
коммит
2ba7a438c2
2 изменённых файлов: 2 добавлений и 14 удалений
|
@ -1,12 +0,0 @@
|
|||
package loader
|
||||
|
||||
/*
|
||||
#include <clang-c/Index.h> // if this fails, install libclang-7-dev
|
||||
|
||||
// The gateway function
|
||||
int tinygo_clang_visitor_cgo(CXCursor c, CXCursor parent, CXClientData client_data) {
|
||||
int tinygo_clang_visitor(CXCursor c, CXCursor parent, CXClientData client_data);
|
||||
return tinygo_clang_visitor(c, parent, client_data);
|
||||
}
|
||||
*/
|
||||
import "C"
|
|
@ -14,7 +14,7 @@ import (
|
|||
#include <clang-c/Index.h> // if this fails, install libclang-7-dev
|
||||
#include <stdlib.h>
|
||||
|
||||
int tinygo_clang_visitor_cgo(CXCursor c, CXCursor parent, CXClientData client_data);
|
||||
int tinygo_clang_visitor(CXCursor c, CXCursor parent, CXClientData client_data);
|
||||
*/
|
||||
import "C"
|
||||
|
||||
|
@ -74,7 +74,7 @@ func (info *fileInfo) parseFragment(fragment string, cflags []string) error {
|
|||
}()
|
||||
|
||||
cursor := C.clang_getTranslationUnitCursor(unit)
|
||||
C.clang_visitChildren(cursor, (*[0]byte)((unsafe.Pointer(C.tinygo_clang_visitor_cgo))), C.CXClientData(uintptr(0)))
|
||||
C.clang_visitChildren(cursor, (*[0]byte)(unsafe.Pointer(C.tinygo_clang_visitor)), C.CXClientData(uintptr(0)))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче