Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions c/c.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ type (
Float = float32
Double = float64
Pointer = unsafe.Pointer
VaList = Pointer
FilePtr = *FILE
)

type FILE struct {
Unused [8]byte
}

type (
Int = int32
Uint = uint32

Expand All @@ -46,6 +41,10 @@ type (
UlongLong = uint64
)

type FILE struct {
Unused [0]byte
}

type integer interface {
~int | ~uint | ~uintptr | ~int32 | ~uint32 | ~int64 | ~uint64
}
Expand All @@ -69,7 +68,24 @@ type Uint64T = uint64
type IntmaxT = LongLong
type UintmaxT = UlongLong

type VaList = Pointer
// -----------------------------------------------------------------------------

type DivT struct {
Quot Int
Rem Int
}

type LdivT struct {
Quot Long
Rem Long
}

type LldivT struct {
Quot LongLong
Rem LongLong
}

// -----------------------------------------------------------------------------

//go:linkname Str llgo.cstr
func Str(string) *Char
Expand Down
5 changes: 4 additions & 1 deletion c/llcppg.pub
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ T uint32_t Uint32T
T uint64_t Uint64T
T intmax_t IntmaxT
T uintmax_t UintmaxT
T va_list VaList
T div_t DivT
T ldiv_t LdivT
T lldiv_t LldivT
T iconv_t IconvT
T locale_t LocaleT
T option Option
T va_list VaList
Loading