fix(gen): handle inout params as pointer-bearing and fix GError signal vet warnings
Treat GIR direction="inout" parameters like "out" params so generated wrappers agree on pointer semantics (fixes ADW InsertText *int mismatch). Use unsafe.Pointer instead of uintptr for GError params in signal closures so go vet no longer flags the cast as unsafe.Pointer misuse.
- commit
- 9100209d5b9b922f2cc196355347fca1beea7e26
- author
- brice · · 2026-03-27 20:40 UTC
- parent
- c0399be
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email - refs
- tag: v0.2.2
30 files · +103 -97
M internal/gir/types/template.go +9 -3
| @@ -133,6 +133,9 @@ func (f funcArgsTemplate) PuregoSignalFull() []string { | |||
| 133 | 133 | out[i] = f.Pure.Names[i] + " uintptr" | |
| 134 | 134 | } | |
| 135 | 135 | } | |
| 136 | + | for _, ge := range f.GErrors { | |
| 137 | + | out[ge.Index] = f.Pure.Names[ge.Index] + " unsafe.Pointer" | |
| 138 | + | } | |
| 136 | 139 | return out | |
| 137 | 140 | } | |
| 138 | 141 | ||
| @@ -148,7 +151,7 @@ func (f funcArgsTemplate) PuregoSignalCall() []string { | |||
| 148 | 151 | } | |
| 149 | 152 | } | |
| 150 | 153 | for _, ge := range f.GErrors { | |
| 151 | - | out[ge.Index] = "(*" + ge.GoType + ")(unsafe.Pointer(" + f.Pure.Names[ge.Index] + "))" | |
| 154 | + | out[ge.Index] = "(*" + ge.GoType + ")(" + f.Pure.Names[ge.Index] + ")" | |
| 152 | 155 | } | |
| 153 | 156 | return out | |
| 154 | 157 | } | |
| @@ -401,7 +404,10 @@ func (f *funcArgsTemplate) Add(p Parameter, ins string, ns string, kinds KindMap | |||
| 401 | 404 | // Get a suitable variable name | |
| 402 | 405 | varName := p.VarName() | |
| 403 | 406 | ||
| 404 | - | isOut := p.Direction == "out" | |
| 407 | + | // GIR "inout" parameters are also pointer-bearing at the ABI/API level. | |
| 408 | + | // Treat them like out params so generated wrappers, raw bindings, and | |
| 409 | + | // callback accessors all agree on pointer semantics. | |
| 410 | + | isOut := p.Direction == "out" || p.Direction == "inout" | |
| 405 | 411 | ||
| 406 | 412 | transferFull := p.TransferOwnership.TransferOwnership == "full" | |
| 407 | 413 | f.AddAPI(goType, varName, kind, ns, p.Nullable, isOut, ctx, transferFull) | |
| @@ -420,7 +426,7 @@ func (f *funcArgsTemplate) Add(p Parameter, ins string, ns string, kinds KindMap | |||
| 420 | 426 | apiIdx := len(f.API.Types) - 1 | |
| 421 | 427 | f.API.Types[apiIdx] = "*" + gerrorGoType | |
| 422 | 428 | f.API.Full[apiIdx] = varName + " *" + gerrorGoType | |
| 423 | - | // Pure stays uintptr; record the index for signal call casting | |
| 429 | + | // Pure stays uintptr; PuregoSignalFull promotes it to unsafe.Pointer | |
| 424 | 430 | pureIdx := len(f.Pure.Types) - 1 | |
| 425 | 431 | f.GErrors = append(f.GErrors, GErrorParam{ | |
| 426 | 432 | Index: pureIdx, | |
| @@ -133,6 +133,9 @@ func (f funcArgsTemplate) PuregoSignalFull() []string { | |||||
| 133 | out[i] = f.Pure.Names[i] + " uintptr" | 133 | out[i] = f.Pure.Names[i] + " uintptr" | ||
| 134 | } | 134 | } | ||
| 135 | } | 135 | } | ||
| 136 | + | for _, ge := range f.GErrors { | |||
| 137 | + | out[ge.Index] = f.Pure.Names[ge.Index] + " unsafe.Pointer" | |||
| 138 | + | } | |||
| 136 | return out | 139 | return out | ||
| 137 | } | 140 | } | ||
| 138 | 141 | ||||
| @@ -148,7 +151,7 @@ func (f funcArgsTemplate) PuregoSignalCall() []string { | |||||
| 148 | } | 151 | } | ||
| 149 | } | 152 | } | ||
| 150 | for _, ge := range f.GErrors { | 153 | for _, ge := range f.GErrors { | ||
| 151 | - | out[ge.Index] = "(*" + ge.GoType + ")(unsafe.Pointer(" + f.Pure.Names[ge.Index] + "))" | 154 | + | out[ge.Index] = "(*" + ge.GoType + ")(" + f.Pure.Names[ge.Index] + ")" |
| 152 | } | 155 | } | ||
| 153 | return out | 156 | return out | ||
| 154 | } | 157 | } | ||
| @@ -401,7 +404,10 @@ func (f *funcArgsTemplate) Add(p Parameter, ins string, ns string, kinds KindMap | |||||
| 401 | // Get a suitable variable name | 404 | // Get a suitable variable name | ||
| 402 | varName := p.VarName() | 405 | varName := p.VarName() | ||
| 403 | 406 | ||||
| 404 | - | isOut := p.Direction == "out" | 407 | + | // GIR "inout" parameters are also pointer-bearing at the ABI/API level. |
| 408 | + | // Treat them like out params so generated wrappers, raw bindings, and | |||
| 409 | + | // callback accessors all agree on pointer semantics. | |||
| 410 | + | isOut := p.Direction == "out" || p.Direction == "inout" | |||
| 405 | 411 | ||||
| 406 | transferFull := p.TransferOwnership.TransferOwnership == "full" | 412 | transferFull := p.TransferOwnership.TransferOwnership == "full" | ||
| 407 | f.AddAPI(goType, varName, kind, ns, p.Nullable, isOut, ctx, transferFull) | 413 | f.AddAPI(goType, varName, kind, ns, p.Nullable, isOut, ctx, transferFull) | ||
| @@ -420,7 +426,7 @@ func (f *funcArgsTemplate) Add(p Parameter, ins string, ns string, kinds KindMap | |||||
| 420 | apiIdx := len(f.API.Types) - 1 | 426 | apiIdx := len(f.API.Types) - 1 | ||
| 421 | f.API.Types[apiIdx] = "*" + gerrorGoType | 427 | f.API.Types[apiIdx] = "*" + gerrorGoType | ||
| 422 | f.API.Full[apiIdx] = varName + " *" + gerrorGoType | 428 | f.API.Full[apiIdx] = varName + " *" + gerrorGoType | ||
| 423 | - | // Pure stays uintptr; record the index for signal call casting | 429 | + | // Pure stays uintptr; PuregoSignalFull promotes it to unsafe.Pointer |
| 424 | pureIdx := len(f.Pure.Types) - 1 | 430 | pureIdx := len(f.Pure.Types) - 1 | ||
| 425 | f.GErrors = append(f.GErrors, GErrorParam{ | 431 | f.GErrors = append(f.GErrors, GErrorParam{ | ||
| 426 | Index: pureIdx, | 432 | Index: pureIdx, | ||
M v4/adw/adw-entry-row.go +1 -1
| @@ -1024,7 +1024,7 @@ func (x *EntryRow) InitDelegate() { | |||
| 1024 | 1024 | // Note that the position is in characters, not in bytes. | |
| 1025 | 1025 | // The function updates @position to point after the newly | |
| 1026 | 1026 | // inserted text. | |
| 1027 | - | func (x *EntryRow) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 1027 | + | func (x *EntryRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 1028 | 1028 | ||
| 1029 | 1029 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 1030 | 1030 | ||
| @@ -1024,7 +1024,7 @@ func (x *EntryRow) InitDelegate() { | |||||
| 1024 | // Note that the position is in characters, not in bytes. | 1024 | // Note that the position is in characters, not in bytes. | ||
| 1025 | // The function updates @position to point after the newly | 1025 | // The function updates @position to point after the newly | ||
| 1026 | // inserted text. | 1026 | // inserted text. | ||
| 1027 | - | func (x *EntryRow) InsertText(TextVar string, LengthVar int, PositionVar int) { | 1027 | + | func (x *EntryRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 1028 | 1028 | ||||
| 1029 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 1029 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 1030 | 1030 | ||||
M v4/adw/adw-password-entry-row.go +1 -1
| @@ -647,7 +647,7 @@ func (x *PasswordEntryRow) InitDelegate() { | |||
| 647 | 647 | // Note that the position is in characters, not in bytes. | |
| 648 | 648 | // The function updates @position to point after the newly | |
| 649 | 649 | // inserted text. | |
| 650 | - | func (x *PasswordEntryRow) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 650 | + | func (x *PasswordEntryRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 651 | 651 | ||
| 652 | 652 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 653 | 653 | ||
| @@ -647,7 +647,7 @@ func (x *PasswordEntryRow) InitDelegate() { | |||||
| 647 | // Note that the position is in characters, not in bytes. | 647 | // Note that the position is in characters, not in bytes. | ||
| 648 | // The function updates @position to point after the newly | 648 | // The function updates @position to point after the newly | ||
| 649 | // inserted text. | 649 | // inserted text. | ||
| 650 | - | func (x *PasswordEntryRow) InsertText(TextVar string, LengthVar int, PositionVar int) { | 650 | + | func (x *PasswordEntryRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 651 | 651 | ||||
| 652 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 652 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 653 | 653 | ||||
M v4/adw/adw-spin-row.go +1 -1
| @@ -1065,7 +1065,7 @@ func (x *SpinRow) InitDelegate() { | |||
| 1065 | 1065 | // Note that the position is in characters, not in bytes. | |
| 1066 | 1066 | // The function updates @position to point after the newly | |
| 1067 | 1067 | // inserted text. | |
| 1068 | - | func (x *SpinRow) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 1068 | + | func (x *SpinRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 1069 | 1069 | ||
| 1070 | 1070 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 1071 | 1071 | ||
| @@ -1065,7 +1065,7 @@ func (x *SpinRow) InitDelegate() { | |||||
| 1065 | // Note that the position is in characters, not in bytes. | 1065 | // Note that the position is in characters, not in bytes. | ||
| 1066 | // The function updates @position to point after the newly | 1066 | // The function updates @position to point after the newly | ||
| 1067 | // inserted text. | 1067 | // inserted text. | ||
| 1068 | - | func (x *SpinRow) InsertText(TextVar string, LengthVar int, PositionVar int) { | 1068 | + | func (x *SpinRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 1069 | 1069 | ||||
| 1070 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 1070 | gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 1071 | 1071 | ||||
M v4/gdk/gdksurface.go +2 -2
| @@ -489,13 +489,13 @@ func (x *Surface) SetOpaqueRegion(RegionVar *cairo.Region) { | |||
| 489 | 489 | ||
| 490 | 490 | } | |
| 491 | 491 | ||
| 492 | - | var xSurfaceTranslateCoordinates func(uintptr, uintptr, float64, float64) bool | |
| 492 | + | var xSurfaceTranslateCoordinates func(uintptr, uintptr, *float64, *float64) bool | |
| 493 | 493 | ||
| 494 | 494 | // Translates coordinates between two surfaces. | |
| 495 | 495 | // | |
| 496 | 496 | // Note that this only works if @to and @from are popups or | |
| 497 | 497 | // transient-for to the same toplevel (directly or indirectly). | |
| 498 | - | func (x *Surface) TranslateCoordinates(ToVar *Surface, XVar float64, YVar float64) bool { | |
| 498 | + | func (x *Surface) TranslateCoordinates(ToVar *Surface, XVar *float64, YVar *float64) bool { | |
| 499 | 499 | ||
| 500 | 500 | cret := xSurfaceTranslateCoordinates(x.GoPointer(), ToVar.GoPointer(), XVar, YVar) | |
| 501 | 501 | return cret | |
| @@ -489,13 +489,13 @@ func (x *Surface) SetOpaqueRegion(RegionVar *cairo.Region) { | |||||
| 489 | 489 | ||||
| 490 | } | 490 | } | ||
| 491 | 491 | ||||
| 492 | - | var xSurfaceTranslateCoordinates func(uintptr, uintptr, float64, float64) bool | 492 | + | var xSurfaceTranslateCoordinates func(uintptr, uintptr, *float64, *float64) bool |
| 493 | 493 | ||||
| 494 | // Translates coordinates between two surfaces. | 494 | // Translates coordinates between two surfaces. | ||
| 495 | // | 495 | // | ||
| 496 | // Note that this only works if @to and @from are popups or | 496 | // Note that this only works if @to and @from are popups or | ||
| 497 | // transient-for to the same toplevel (directly or indirectly). | 497 | // transient-for to the same toplevel (directly or indirectly). | ||
| 498 | - | func (x *Surface) TranslateCoordinates(ToVar *Surface, XVar float64, YVar float64) bool { | 498 | + | func (x *Surface) TranslateCoordinates(ToVar *Surface, XVar *float64, YVar *float64) bool { |
| 499 | 499 | ||||
| 500 | cret := xSurfaceTranslateCoordinates(x.GoPointer(), ToVar.GoPointer(), XVar, YVar) | 500 | cret := xSurfaceTranslateCoordinates(x.GoPointer(), ToVar.GoPointer(), XVar, YVar) | ||
| 501 | return cret | 501 | return cret | ||
M v4/gio/gapplication.go +5 -5
| @@ -167,11 +167,11 @@ func (x *ApplicationClass) GetCommandLine() func(*Application, *ApplicationComma | |||
| 167 | 167 | // g_application_run() for more information. Also see the | |
| 168 | 168 | // #GApplication::handle-local-options signal, which is a simpler | |
| 169 | 169 | // alternative to handling some commandline options locally | |
| 170 | - | func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []string, *int) bool) { | |
| 170 | + | func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, *[]string, *int) bool) { | |
| 171 | 171 | if cb == nil { | |
| 172 | 172 | x.xLocalCommandLine = 0 | |
| 173 | 173 | } else { | |
| 174 | - | x.xLocalCommandLine = purego.NewCallback(func(ApplicationVarp uintptr, ArgumentsVarp []string, ExitStatusVarp *int) bool { | |
| 174 | + | x.xLocalCommandLine = purego.NewCallback(func(ApplicationVarp uintptr, ArgumentsVarp *[]string, ExitStatusVarp *int) bool { | |
| 175 | 175 | return cb(ApplicationNewFromInternalPtr(ApplicationVarp), ArgumentsVarp, ExitStatusVarp) | |
| 176 | 176 | }) | |
| 177 | 177 | } | |
| @@ -184,13 +184,13 @@ func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []stri | |||
| 184 | 184 | // g_application_run() for more information. Also see the | |
| 185 | 185 | // #GApplication::handle-local-options signal, which is a simpler | |
| 186 | 186 | // alternative to handling some commandline options locally | |
| 187 | - | func (x *ApplicationClass) GetLocalCommandLine() func(*Application, []string, *int) bool { | |
| 187 | + | func (x *ApplicationClass) GetLocalCommandLine() func(*Application, *[]string, *int) bool { | |
| 188 | 188 | if x.xLocalCommandLine == 0 { | |
| 189 | 189 | return nil | |
| 190 | 190 | } | |
| 191 | - | var rawCallback func(ApplicationVarp uintptr, ArgumentsVarp []string, ExitStatusVarp *int) bool | |
| 191 | + | var rawCallback func(ApplicationVarp uintptr, ArgumentsVarp *[]string, ExitStatusVarp *int) bool | |
| 192 | 192 | purego.RegisterFunc(&rawCallback, x.xLocalCommandLine) | |
| 193 | - | return func(ApplicationVar *Application, ArgumentsVar []string, ExitStatusVar *int) bool { | |
| 193 | + | return func(ApplicationVar *Application, ArgumentsVar *[]string, ExitStatusVar *int) bool { | |
| 194 | 194 | return rawCallback(ApplicationVar.GoPointer(), ArgumentsVar, ExitStatusVar) | |
| 195 | 195 | } | |
| 196 | 196 | } | |
| @@ -167,11 +167,11 @@ func (x *ApplicationClass) GetCommandLine() func(*Application, *ApplicationComma | |||||
| 167 | // g_application_run() for more information. Also see the | 167 | // g_application_run() for more information. Also see the | ||
| 168 | // #GApplication::handle-local-options signal, which is a simpler | 168 | // #GApplication::handle-local-options signal, which is a simpler | ||
| 169 | // alternative to handling some commandline options locally | 169 | // alternative to handling some commandline options locally | ||
| 170 | - | func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []string, *int) bool) { | 170 | + | func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, *[]string, *int) bool) { |
| 171 | if cb == nil { | 171 | if cb == nil { | ||
| 172 | x.xLocalCommandLine = 0 | 172 | x.xLocalCommandLine = 0 | ||
| 173 | } else { | 173 | } else { | ||
| 174 | - | x.xLocalCommandLine = purego.NewCallback(func(ApplicationVarp uintptr, ArgumentsVarp []string, ExitStatusVarp *int) bool { | 174 | + | x.xLocalCommandLine = purego.NewCallback(func(ApplicationVarp uintptr, ArgumentsVarp *[]string, ExitStatusVarp *int) bool { |
| 175 | return cb(ApplicationNewFromInternalPtr(ApplicationVarp), ArgumentsVarp, ExitStatusVarp) | 175 | return cb(ApplicationNewFromInternalPtr(ApplicationVarp), ArgumentsVarp, ExitStatusVarp) | ||
| 176 | }) | 176 | }) | ||
| 177 | } | 177 | } | ||
| @@ -184,13 +184,13 @@ func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []stri | |||||
| 184 | // g_application_run() for more information. Also see the | 184 | // g_application_run() for more information. Also see the | ||
| 185 | // #GApplication::handle-local-options signal, which is a simpler | 185 | // #GApplication::handle-local-options signal, which is a simpler | ||
| 186 | // alternative to handling some commandline options locally | 186 | // alternative to handling some commandline options locally | ||
| 187 | - | func (x *ApplicationClass) GetLocalCommandLine() func(*Application, []string, *int) bool { | 187 | + | func (x *ApplicationClass) GetLocalCommandLine() func(*Application, *[]string, *int) bool { |
| 188 | if x.xLocalCommandLine == 0 { | 188 | if x.xLocalCommandLine == 0 { | ||
| 189 | return nil | 189 | return nil | ||
| 190 | } | 190 | } | ||
| 191 | - | var rawCallback func(ApplicationVarp uintptr, ArgumentsVarp []string, ExitStatusVarp *int) bool | 191 | + | var rawCallback func(ApplicationVarp uintptr, ArgumentsVarp *[]string, ExitStatusVarp *int) bool |
| 192 | purego.RegisterFunc(&rawCallback, x.xLocalCommandLine) | 192 | purego.RegisterFunc(&rawCallback, x.xLocalCommandLine) | ||
| 193 | - | return func(ApplicationVar *Application, ArgumentsVar []string, ExitStatusVar *int) bool { | 193 | + | return func(ApplicationVar *Application, ArgumentsVar *[]string, ExitStatusVar *int) bool { |
| 194 | return rawCallback(ApplicationVar.GoPointer(), ArgumentsVar, ExitStatusVar) | 194 | return rawCallback(ApplicationVar.GoPointer(), ArgumentsVar, ExitStatusVar) | ||
| 195 | } | 195 | } | ||
| 196 | } | 196 | } | ||
M v4/gio/gdbusconnection.go +2 -2
| @@ -1849,12 +1849,12 @@ func (x *DBusConnection) ConnectClosed(cb *func(DBusConnection, bool, *glib.Erro | |||
| 1849 | 1849 | return handlerID | |
| 1850 | 1850 | } | |
| 1851 | 1851 | ||
| 1852 | - | fcb := func(clsPtr uintptr, RemotePeerVanishedVarp bool, ErrorVarp uintptr) { | |
| 1852 | + | fcb := func(clsPtr uintptr, RemotePeerVanishedVarp bool, ErrorVarp unsafe.Pointer) { | |
| 1853 | 1853 | fa := DBusConnection{} | |
| 1854 | 1854 | fa.Ptr = clsPtr | |
| 1855 | 1855 | cbFn := *cb | |
| 1856 | 1856 | ||
| 1857 | - | cbFn(fa, RemotePeerVanishedVarp, (*glib.Error)(unsafe.Pointer(ErrorVarp))) | |
| 1857 | + | cbFn(fa, RemotePeerVanishedVarp, (*glib.Error)(ErrorVarp)) | |
| 1858 | 1858 | ||
| 1859 | 1859 | } | |
| 1860 | 1860 | cbRefPtr := purego.NewCallback(fcb) | |
| @@ -1849,12 +1849,12 @@ func (x *DBusConnection) ConnectClosed(cb *func(DBusConnection, bool, *glib.Erro | |||||
| 1849 | return handlerID | 1849 | return handlerID | ||
| 1850 | } | 1850 | } | ||
| 1851 | 1851 | ||||
| 1852 | - | fcb := func(clsPtr uintptr, RemotePeerVanishedVarp bool, ErrorVarp uintptr) { | 1852 | + | fcb := func(clsPtr uintptr, RemotePeerVanishedVarp bool, ErrorVarp unsafe.Pointer) { |
| 1853 | fa := DBusConnection{} | 1853 | fa := DBusConnection{} | ||
| 1854 | fa.Ptr = clsPtr | 1854 | fa.Ptr = clsPtr | ||
| 1855 | cbFn := *cb | 1855 | cbFn := *cb | ||
| 1856 | 1856 | ||||
| 1857 | - | cbFn(fa, RemotePeerVanishedVarp, (*glib.Error)(unsafe.Pointer(ErrorVarp))) | 1857 | + | cbFn(fa, RemotePeerVanishedVarp, (*glib.Error)(ErrorVarp)) |
| 1858 | 1858 | ||||
| 1859 | } | 1859 | } | ||
| 1860 | cbRefPtr := purego.NewCallback(fcb) | 1860 | cbRefPtr := purego.NewCallback(fcb) | ||
M v4/gio/gsocket.go +2 -2
| @@ -1222,7 +1222,7 @@ func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar *[]byte, Size | |||
| 1222 | 1222 | ||
| 1223 | 1223 | } | |
| 1224 | 1224 | ||
| 1225 | - | var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *uintptr, *int, int, uintptr, **glib.Error) int | |
| 1225 | + | var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *uintptr, *int, *int, uintptr, **glib.Error) int | |
| 1226 | 1226 | ||
| 1227 | 1227 | // Receive data from a socket. For receiving multiple messages, see | |
| 1228 | 1228 | // g_socket_receive_messages(); for easier use, see | |
| @@ -1283,7 +1283,7 @@ var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *ui | |||
| 1283 | 1283 | // %G_IO_IN condition. | |
| 1284 | 1284 | // | |
| 1285 | 1285 | // On error -1 is returned and @error is set accordingly. | |
| 1286 | - | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar int, CancellableVar *Cancellable) (int, error) { | |
| 1286 | + | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar *int, CancellableVar *Cancellable) (int, error) { | |
| 1287 | 1287 | var cerr *glib.Error | |
| 1288 | 1288 | ||
| 1289 | 1289 | cret := xSocketReceiveMessage(x.GoPointer(), AddressVar, VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1222,7 +1222,7 @@ func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar *[]byte, Size | |||||
| 1222 | 1222 | ||||
| 1223 | } | 1223 | } | ||
| 1224 | 1224 | ||||
| 1225 | - | var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *uintptr, *int, int, uintptr, **glib.Error) int | 1225 | + | var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *uintptr, *int, *int, uintptr, **glib.Error) int |
| 1226 | 1226 | ||||
| 1227 | // Receive data from a socket. For receiving multiple messages, see | 1227 | // Receive data from a socket. For receiving multiple messages, see | ||
| 1228 | // g_socket_receive_messages(); for easier use, see | 1228 | // g_socket_receive_messages(); for easier use, see | ||
| @@ -1283,7 +1283,7 @@ var xSocketReceiveMessage func(uintptr, **SocketAddress, []InputVector, int, *ui | |||||
| 1283 | // %G_IO_IN condition. | 1283 | // %G_IO_IN condition. | ||
| 1284 | // | 1284 | // | ||
| 1285 | // On error -1 is returned and @error is set accordingly. | 1285 | // On error -1 is returned and @error is set accordingly. | ||
| 1286 | - | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar int, CancellableVar *Cancellable) (int, error) { | 1286 | + | func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar []InputVector, NumVectorsVar int, MessagesVar *uintptr, NumMessagesVar *int, FlagsVar *int, CancellableVar *Cancellable) (int, error) { |
| 1287 | var cerr *glib.Error | 1287 | var cerr *glib.Error | ||
| 1288 | 1288 | ||||
| 1289 | cret := xSocketReceiveMessage(x.GoPointer(), AddressVar, VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | 1289 | cret := xSocketReceiveMessage(x.GoPointer(), AddressVar, VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr) | ||
M v4/glib/gbase64.go +8 -8
| @@ -19,18 +19,18 @@ func Base64Decode(TextVar string, OutLenVar *uint) uintptr { | |||
| 19 | 19 | return cret | |
| 20 | 20 | } | |
| 21 | 21 | ||
| 22 | - | var xBase64DecodeInplace func([]byte, uint) byte | |
| 22 | + | var xBase64DecodeInplace func(*[]byte, *uint) byte | |
| 23 | 23 | ||
| 24 | 24 | // Decode a sequence of Base-64 encoded text into binary data | |
| 25 | 25 | // by overwriting the input data. | |
| 26 | - | func Base64DecodeInplace(TextVar []byte, OutLenVar uint) byte { | |
| 26 | + | func Base64DecodeInplace(TextVar *[]byte, OutLenVar *uint) byte { | |
| 27 | 27 | ||
| 28 | 28 | cret := xBase64DecodeInplace(TextVar, OutLenVar) | |
| 29 | 29 | ||
| 30 | 30 | return cret | |
| 31 | 31 | } | |
| 32 | 32 | ||
| 33 | - | var xBase64DecodeStep func([]byte, uint, *[]byte, int, uint) uint | |
| 33 | + | var xBase64DecodeStep func([]byte, uint, *[]byte, *int, *uint) uint | |
| 34 | 34 | ||
| 35 | 35 | // Incrementally decode a sequence of binary data from its Base-64 stringified | |
| 36 | 36 | // representation. By calling this function multiple times you can convert | |
| @@ -40,7 +40,7 @@ var xBase64DecodeStep func([]byte, uint, *[]byte, int, uint) uint | |||
| 40 | 40 | // be written to it. Since base64 encodes 3 bytes in 4 chars you need | |
| 41 | 41 | // at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero | |
| 42 | 42 | // state). | |
| 43 | - | func Base64DecodeStep(InVar []byte, LenVar uint, OutVar *[]byte, StateVar int, SaveVar uint) uint { | |
| 43 | + | func Base64DecodeStep(InVar []byte, LenVar uint, OutVar *[]byte, StateVar *int, SaveVar *uint) uint { | |
| 44 | 44 | ||
| 45 | 45 | cret := xBase64DecodeStep(InVar, LenVar, OutVar, StateVar, SaveVar) | |
| 46 | 46 | ||
| @@ -58,7 +58,7 @@ func Base64Encode(DataVar []byte, LenVar uint) string { | |||
| 58 | 58 | return cret | |
| 59 | 59 | } | |
| 60 | 60 | ||
| 61 | - | var xBase64EncodeClose func(bool, *[]byte, int, int) uint | |
| 61 | + | var xBase64EncodeClose func(bool, *[]byte, *int, *int) uint | |
| 62 | 62 | ||
| 63 | 63 | // Flush the status from a sequence of calls to g_base64_encode_step(). | |
| 64 | 64 | // | |
| @@ -67,14 +67,14 @@ var xBase64EncodeClose func(bool, *[]byte, int, int) uint | |||
| 67 | 67 | // line-breaking is enabled. | |
| 68 | 68 | // | |
| 69 | 69 | // The @out array will not be automatically nul-terminated. | |
| 70 | - | func Base64EncodeClose(BreakLinesVar bool, OutVar *[]byte, StateVar int, SaveVar int) uint { | |
| 70 | + | func Base64EncodeClose(BreakLinesVar bool, OutVar *[]byte, StateVar *int, SaveVar *int) uint { | |
| 71 | 71 | ||
| 72 | 72 | cret := xBase64EncodeClose(BreakLinesVar, OutVar, StateVar, SaveVar) | |
| 73 | 73 | ||
| 74 | 74 | return cret | |
| 75 | 75 | } | |
| 76 | 76 | ||
| 77 | - | var xBase64EncodeStep func([]byte, uint, bool, *[]byte, int, int) uint | |
| 77 | + | var xBase64EncodeStep func([]byte, uint, bool, *[]byte, *int, *int) uint | |
| 78 | 78 | ||
| 79 | 79 | // Incrementally encode a sequence of binary data into its Base-64 stringified | |
| 80 | 80 | // representation. By calling this function multiple times you can convert | |
| @@ -95,7 +95,7 @@ var xBase64EncodeStep func([]byte, uint, bool, *[]byte, int, int) uint | |||
| 95 | 95 | // Note however that it breaks the lines with `LF` characters, not | |
| 96 | 96 | // `CR LF` sequences, so the result cannot be passed directly to SMTP | |
| 97 | 97 | // or certain other protocols. | |
| 98 | - | func Base64EncodeStep(InVar []byte, LenVar uint, BreakLinesVar bool, OutVar *[]byte, StateVar int, SaveVar int) uint { | |
| 98 | + | func Base64EncodeStep(InVar []byte, LenVar uint, BreakLinesVar bool, OutVar *[]byte, StateVar *int, SaveVar *int) uint { | |
| 99 | 99 | ||
| 100 | 100 | cret := xBase64EncodeStep(InVar, LenVar, BreakLinesVar, OutVar, StateVar, SaveVar) | |
| 101 | 101 | ||
| @@ -19,18 +19,18 @@ func Base64Decode(TextVar string, OutLenVar *uint) uintptr { | |||||
| 19 | return cret | 19 | return cret | ||
| 20 | } | 20 | } | ||
| 21 | 21 | ||||
| 22 | - | var xBase64DecodeInplace func([]byte, uint) byte | 22 | + | var xBase64DecodeInplace func(*[]byte, *uint) byte |
| 23 | 23 | ||||
| 24 | // Decode a sequence of Base-64 encoded text into binary data | 24 | // Decode a sequence of Base-64 encoded text into binary data | ||
| 25 | // by overwriting the input data. | 25 | // by overwriting the input data. | ||
| 26 | - | func Base64DecodeInplace(TextVar []byte, OutLenVar uint) byte { | 26 | + | func Base64DecodeInplace(TextVar *[]byte, OutLenVar *uint) byte { |
| 27 | 27 | ||||
| 28 | cret := xBase64DecodeInplace(TextVar, OutLenVar) | 28 | cret := xBase64DecodeInplace(TextVar, OutLenVar) | ||
| 29 | 29 | ||||
| 30 | return cret | 30 | return cret | ||
| 31 | } | 31 | } | ||
| 32 | 32 | ||||
| 33 | - | var xBase64DecodeStep func([]byte, uint, *[]byte, int, uint) uint | 33 | + | var xBase64DecodeStep func([]byte, uint, *[]byte, *int, *uint) uint |
| 34 | 34 | ||||
| 35 | // Incrementally decode a sequence of binary data from its Base-64 stringified | 35 | // Incrementally decode a sequence of binary data from its Base-64 stringified | ||
| 36 | // representation. By calling this function multiple times you can convert | 36 | // representation. By calling this function multiple times you can convert | ||
| @@ -40,7 +40,7 @@ var xBase64DecodeStep func([]byte, uint, *[]byte, int, uint) uint | |||||
| 40 | // be written to it. Since base64 encodes 3 bytes in 4 chars you need | 40 | // be written to it. Since base64 encodes 3 bytes in 4 chars you need | ||
| 41 | // at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero | 41 | // at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero | ||
| 42 | // state). | 42 | // state). | ||
| 43 | - | func Base64DecodeStep(InVar []byte, LenVar uint, OutVar *[]byte, StateVar int, SaveVar uint) uint { | 43 | + | func Base64DecodeStep(InVar []byte, LenVar uint, OutVar *[]byte, StateVar *int, SaveVar *uint) uint { |
| 44 | 44 | ||||
| 45 | cret := xBase64DecodeStep(InVar, LenVar, OutVar, StateVar, SaveVar) | 45 | cret := xBase64DecodeStep(InVar, LenVar, OutVar, StateVar, SaveVar) | ||
| 46 | 46 | ||||
| @@ -58,7 +58,7 @@ func Base64Encode(DataVar []byte, LenVar uint) string { | |||||
| 58 | return cret | 58 | return cret | ||
| 59 | } | 59 | } | ||
| 60 | 60 | ||||
| 61 | - | var xBase64EncodeClose func(bool, *[]byte, int, int) uint | 61 | + | var xBase64EncodeClose func(bool, *[]byte, *int, *int) uint |
| 62 | 62 | ||||
| 63 | // Flush the status from a sequence of calls to g_base64_encode_step(). | 63 | // Flush the status from a sequence of calls to g_base64_encode_step(). | ||
| 64 | // | 64 | // | ||
| @@ -67,14 +67,14 @@ var xBase64EncodeClose func(bool, *[]byte, int, int) uint | |||||
| 67 | // line-breaking is enabled. | 67 | // line-breaking is enabled. | ||
| 68 | // | 68 | // | ||
| 69 | // The @out array will not be automatically nul-terminated. | 69 | // The @out array will not be automatically nul-terminated. | ||
| 70 | - | func Base64EncodeClose(BreakLinesVar bool, OutVar *[]byte, StateVar int, SaveVar int) uint { | 70 | + | func Base64EncodeClose(BreakLinesVar bool, OutVar *[]byte, StateVar *int, SaveVar *int) uint { |
| 71 | 71 | ||||
| 72 | cret := xBase64EncodeClose(BreakLinesVar, OutVar, StateVar, SaveVar) | 72 | cret := xBase64EncodeClose(BreakLinesVar, OutVar, StateVar, SaveVar) | ||
| 73 | 73 | ||||
| 74 | return cret | 74 | return cret | ||
| 75 | } | 75 | } | ||
| 76 | 76 | ||||
| 77 | - | var xBase64EncodeStep func([]byte, uint, bool, *[]byte, int, int) uint | 77 | + | var xBase64EncodeStep func([]byte, uint, bool, *[]byte, *int, *int) uint |
| 78 | 78 | ||||
| 79 | // Incrementally encode a sequence of binary data into its Base-64 stringified | 79 | // Incrementally encode a sequence of binary data into its Base-64 stringified | ||
| 80 | // representation. By calling this function multiple times you can convert | 80 | // representation. By calling this function multiple times you can convert | ||
| @@ -95,7 +95,7 @@ var xBase64EncodeStep func([]byte, uint, bool, *[]byte, int, int) uint | |||||
| 95 | // Note however that it breaks the lines with `LF` characters, not | 95 | // Note however that it breaks the lines with `LF` characters, not | ||
| 96 | // `CR LF` sequences, so the result cannot be passed directly to SMTP | 96 | // `CR LF` sequences, so the result cannot be passed directly to SMTP | ||
| 97 | // or certain other protocols. | 97 | // or certain other protocols. | ||
| 98 | - | func Base64EncodeStep(InVar []byte, LenVar uint, BreakLinesVar bool, OutVar *[]byte, StateVar int, SaveVar int) uint { | 98 | + | func Base64EncodeStep(InVar []byte, LenVar uint, BreakLinesVar bool, OutVar *[]byte, StateVar *int, SaveVar *int) uint { |
| 99 | 99 | ||||
| 100 | cret := xBase64EncodeStep(InVar, LenVar, BreakLinesVar, OutVar, StateVar, SaveVar) | 100 | cret := xBase64EncodeStep(InVar, LenVar, BreakLinesVar, OutVar, StateVar, SaveVar) | ||
| 101 | 101 | ||||
M v4/glib/gchecksum.go +2 -2
| @@ -82,14 +82,14 @@ func (x *Checksum) Free() { | |||
| 82 | 82 | ||
| 83 | 83 | } | |
| 84 | 84 | ||
| 85 | - | var xChecksumGetDigest func(uintptr, []byte, uint) | |
| 85 | + | var xChecksumGetDigest func(uintptr, []byte, *uint) | |
| 86 | 86 | ||
| 87 | 87 | // Gets the digest from @checksum as a raw binary vector and places it | |
| 88 | 88 | // into @buffer. The size of the digest depends on the type of checksum. | |
| 89 | 89 | // | |
| 90 | 90 | // Once this function has been called, the #GChecksum is closed and can | |
| 91 | 91 | // no longer be updated with g_checksum_update(). | |
| 92 | - | func (x *Checksum) GetDigest(BufferVar []byte, DigestLenVar uint) { | |
| 92 | + | func (x *Checksum) GetDigest(BufferVar []byte, DigestLenVar *uint) { | |
| 93 | 93 | ||
| 94 | 94 | xChecksumGetDigest(x.GoPointer(), BufferVar, DigestLenVar) | |
| 95 | 95 | ||
| @@ -82,14 +82,14 @@ func (x *Checksum) Free() { | |||||
| 82 | 82 | ||||
| 83 | } | 83 | } | ||
| 84 | 84 | ||||
| 85 | - | var xChecksumGetDigest func(uintptr, []byte, uint) | 85 | + | var xChecksumGetDigest func(uintptr, []byte, *uint) |
| 86 | 86 | ||||
| 87 | // Gets the digest from @checksum as a raw binary vector and places it | 87 | // Gets the digest from @checksum as a raw binary vector and places it | ||
| 88 | // into @buffer. The size of the digest depends on the type of checksum. | 88 | // into @buffer. The size of the digest depends on the type of checksum. | ||
| 89 | // | 89 | // | ||
| 90 | // Once this function has been called, the #GChecksum is closed and can | 90 | // Once this function has been called, the #GChecksum is closed and can | ||
| 91 | // no longer be updated with g_checksum_update(). | 91 | // no longer be updated with g_checksum_update(). | ||
| 92 | - | func (x *Checksum) GetDigest(BufferVar []byte, DigestLenVar uint) { | 92 | + | func (x *Checksum) GetDigest(BufferVar []byte, DigestLenVar *uint) { |
| 93 | 93 | ||||
| 94 | xChecksumGetDigest(x.GoPointer(), BufferVar, DigestLenVar) | 94 | xChecksumGetDigest(x.GoPointer(), BufferVar, DigestLenVar) | ||
| 95 | 95 | ||||
M v4/glib/gconvert.go +4 -4
| @@ -20,7 +20,7 @@ func (x *IConv) GoPointer() uintptr { | |||
| 20 | 20 | return uintptr(unsafe.Pointer(x)) | |
| 21 | 21 | } | |
| 22 | 22 | ||
| 23 | - | var xIConvGIconv func(uintptr, string, uint, string, uint) uint | |
| 23 | + | var xIConvGIconv func(uintptr, string, *uint, string, *uint) uint | |
| 24 | 24 | ||
| 25 | 25 | // Same as the standard UNIX routine iconv(), but | |
| 26 | 26 | // may be implemented via libiconv on UNIX flavors that lack | |
| @@ -38,7 +38,7 @@ var xIConvGIconv func(uintptr, string, uint, string, uint) uint | |||
| 38 | 38 | // | |
| 39 | 39 | // See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an | |
| 40 | 40 | // error occurs. | |
| 41 | - | func (x *IConv) GIconv(InbufVar string, InbytesLeftVar uint, OutbufVar string, OutbytesLeftVar uint) uint { | |
| 41 | + | func (x *IConv) GIconv(InbufVar string, InbytesLeftVar *uint, OutbufVar string, OutbytesLeftVar *uint) uint { | |
| 42 | 42 | ||
| 43 | 43 | cret := xIConvGIconv(x.GoPointer(), InbufVar, InbytesLeftVar, OutbufVar, OutbytesLeftVar) | |
| 44 | 44 | return cret | |
| @@ -352,7 +352,7 @@ func GetFilenameCharsets(FilenameCharsetsVar *[]string) bool { | |||
| 352 | 352 | return cret | |
| 353 | 353 | } | |
| 354 | 354 | ||
| 355 | - | var xIconv func(uintptr, string, uint, string, uint) uint | |
| 355 | + | var xIconv func(uintptr, string, *uint, string, *uint) uint | |
| 356 | 356 | ||
| 357 | 357 | // Same as the standard UNIX routine iconv(), but | |
| 358 | 358 | // may be implemented via libiconv on UNIX flavors that lack | |
| @@ -370,7 +370,7 @@ var xIconv func(uintptr, string, uint, string, uint) uint | |||
| 370 | 370 | // | |
| 371 | 371 | // See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an | |
| 372 | 372 | // error occurs. | |
| 373 | - | func Iconv(ConverterVar uintptr, InbufVar string, InbytesLeftVar uint, OutbufVar string, OutbytesLeftVar uint) uint { | |
| 373 | + | func Iconv(ConverterVar uintptr, InbufVar string, InbytesLeftVar *uint, OutbufVar string, OutbytesLeftVar *uint) uint { | |
| 374 | 374 | ||
| 375 | 375 | cret := xIconv(ConverterVar, InbufVar, InbytesLeftVar, OutbufVar, OutbytesLeftVar) | |
| 376 | 376 | ||
| @@ -20,7 +20,7 @@ func (x *IConv) GoPointer() uintptr { | |||||
| 20 | return uintptr(unsafe.Pointer(x)) | 20 | return uintptr(unsafe.Pointer(x)) | ||
| 21 | } | 21 | } | ||
| 22 | 22 | ||||
| 23 | - | var xIConvGIconv func(uintptr, string, uint, string, uint) uint | 23 | + | var xIConvGIconv func(uintptr, string, *uint, string, *uint) uint |
| 24 | 24 | ||||
| 25 | // Same as the standard UNIX routine iconv(), but | 25 | // Same as the standard UNIX routine iconv(), but | ||
| 26 | // may be implemented via libiconv on UNIX flavors that lack | 26 | // may be implemented via libiconv on UNIX flavors that lack | ||
| @@ -38,7 +38,7 @@ var xIConvGIconv func(uintptr, string, uint, string, uint) uint | |||||
| 38 | // | 38 | // | ||
| 39 | // See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an | 39 | // See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an | ||
| 40 | // error occurs. | 40 | // error occurs. | ||
| 41 | - | func (x *IConv) GIconv(InbufVar string, InbytesLeftVar uint, OutbufVar string, OutbytesLeftVar uint) uint { | 41 | + | func (x *IConv) GIconv(InbufVar string, InbytesLeftVar *uint, OutbufVar string, OutbytesLeftVar *uint) uint { |
| 42 | 42 | ||||
| 43 | cret := xIConvGIconv(x.GoPointer(), InbufVar, InbytesLeftVar, OutbufVar, OutbytesLeftVar) | 43 | cret := xIConvGIconv(x.GoPointer(), InbufVar, InbytesLeftVar, OutbufVar, OutbytesLeftVar) | ||
| 44 | return cret | 44 | return cret | ||
| @@ -352,7 +352,7 @@ func GetFilenameCharsets(FilenameCharsetsVar *[]string) bool { | |||||
| 352 | return cret | 352 | return cret | ||
| 353 | } | 353 | } | ||
| 354 | 354 | ||||
| 355 | - | var xIconv func(uintptr, string, uint, string, uint) uint | 355 | + | var xIconv func(uintptr, string, *uint, string, *uint) uint |
| 356 | 356 | ||||
| 357 | // Same as the standard UNIX routine iconv(), but | 357 | // Same as the standard UNIX routine iconv(), but | ||
| 358 | // may be implemented via libiconv on UNIX flavors that lack | 358 | // may be implemented via libiconv on UNIX flavors that lack | ||
| @@ -370,7 +370,7 @@ var xIconv func(uintptr, string, uint, string, uint) uint | |||||
| 370 | // | 370 | // | ||
| 371 | // See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an | 371 | // See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an | ||
| 372 | // error occurs. | 372 | // error occurs. | ||
| 373 | - | func Iconv(ConverterVar uintptr, InbufVar string, InbytesLeftVar uint, OutbufVar string, OutbytesLeftVar uint) uint { | 373 | + | func Iconv(ConverterVar uintptr, InbufVar string, InbytesLeftVar *uint, OutbufVar string, OutbytesLeftVar *uint) uint { |
| 374 | 374 | ||||
| 375 | cret := xIconv(ConverterVar, InbufVar, InbytesLeftVar, OutbufVar, OutbytesLeftVar) | 375 | cret := xIconv(ConverterVar, InbufVar, InbytesLeftVar, OutbufVar, OutbytesLeftVar) | ||
| 376 | 376 | ||||
M v4/glib/ghmac.go +2 -2
| @@ -75,14 +75,14 @@ func (x *Hmac) Copy() *Hmac { | |||
| 75 | 75 | return cret | |
| 76 | 76 | } | |
| 77 | 77 | ||
| 78 | - | var xHmacGetDigest func(uintptr, []byte, uint) | |
| 78 | + | var xHmacGetDigest func(uintptr, []byte, *uint) | |
| 79 | 79 | ||
| 80 | 80 | // Gets the digest from @checksum as a raw binary array and places it | |
| 81 | 81 | // into @buffer. The size of the digest depends on the type of checksum. | |
| 82 | 82 | // | |
| 83 | 83 | // Once this function has been called, the #GHmac is closed and can | |
| 84 | 84 | // no longer be updated with g_checksum_update(). | |
| 85 | - | func (x *Hmac) GetDigest(BufferVar []byte, DigestLenVar uint) { | |
| 85 | + | func (x *Hmac) GetDigest(BufferVar []byte, DigestLenVar *uint) { | |
| 86 | 86 | ||
| 87 | 87 | xHmacGetDigest(x.GoPointer(), BufferVar, DigestLenVar) | |
| 88 | 88 | ||
| @@ -75,14 +75,14 @@ func (x *Hmac) Copy() *Hmac { | |||||
| 75 | return cret | 75 | return cret | ||
| 76 | } | 76 | } | ||
| 77 | 77 | ||||
| 78 | - | var xHmacGetDigest func(uintptr, []byte, uint) | 78 | + | var xHmacGetDigest func(uintptr, []byte, *uint) |
| 79 | 79 | ||||
| 80 | // Gets the digest from @checksum as a raw binary array and places it | 80 | // Gets the digest from @checksum as a raw binary array and places it | ||
| 81 | // into @buffer. The size of the digest depends on the type of checksum. | 81 | // into @buffer. The size of the digest depends on the type of checksum. | ||
| 82 | // | 82 | // | ||
| 83 | // Once this function has been called, the #GHmac is closed and can | 83 | // Once this function has been called, the #GHmac is closed and can | ||
| 84 | // no longer be updated with g_checksum_update(). | 84 | // no longer be updated with g_checksum_update(). | ||
| 85 | - | func (x *Hmac) GetDigest(BufferVar []byte, DigestLenVar uint) { | 85 | + | func (x *Hmac) GetDigest(BufferVar []byte, DigestLenVar *uint) { |
| 86 | 86 | ||||
| 87 | xHmacGetDigest(x.GoPointer(), BufferVar, DigestLenVar) | 87 | xHmacGetDigest(x.GoPointer(), BufferVar, DigestLenVar) | ||
| 88 | 88 | ||||
M v4/glib/gmem.go +2 -2
| @@ -241,7 +241,7 @@ func AlignedFreeSized(MemVar uintptr, AlignmentVar uint, SizeVar uint) { | |||
| 241 | 241 | ||
| 242 | 242 | } | |
| 243 | 243 | ||
| 244 | - | var xClearPointer func(uintptr, uintptr) | |
| 244 | + | var xClearPointer func(*uintptr, uintptr) | |
| 245 | 245 | ||
| 246 | 246 | // Clears a reference to a variable. | |
| 247 | 247 | // | |
| @@ -280,7 +280,7 @@ var xClearPointer func(uintptr, uintptr) | |||
| 280 | 280 | // | |
| 281 | 281 | // g_clear_pointer (&sync, destroy_sync); | |
| 282 | 282 | // ``` | |
| 283 | - | func ClearPointer(PpVar uintptr, DestroyVar *DestroyNotify) { | |
| 283 | + | func ClearPointer(PpVar *uintptr, DestroyVar *DestroyNotify) { | |
| 284 | 284 | ||
| 285 | 285 | var DestroyVarRef uintptr | |
| 286 | 286 | if DestroyVar != nil { | |
| @@ -241,7 +241,7 @@ func AlignedFreeSized(MemVar uintptr, AlignmentVar uint, SizeVar uint) { | |||||
| 241 | 241 | ||||
| 242 | } | 242 | } | ||
| 243 | 243 | ||||
| 244 | - | var xClearPointer func(uintptr, uintptr) | 244 | + | var xClearPointer func(*uintptr, uintptr) |
| 245 | 245 | ||||
| 246 | // Clears a reference to a variable. | 246 | // Clears a reference to a variable. | ||
| 247 | // | 247 | // | ||
| @@ -280,7 +280,7 @@ var xClearPointer func(uintptr, uintptr) | |||||
| 280 | // | 280 | // | ||
| 281 | // g_clear_pointer (&sync, destroy_sync); | 281 | // g_clear_pointer (&sync, destroy_sync); | ||
| 282 | // ``` | 282 | // ``` | ||
| 283 | - | func ClearPointer(PpVar uintptr, DestroyVar *DestroyNotify) { | 283 | + | func ClearPointer(PpVar *uintptr, DestroyVar *DestroyNotify) { |
| 284 | 284 | ||||
| 285 | var DestroyVarRef uintptr | 285 | var DestroyVarRef uintptr | ||
| 286 | if DestroyVar != nil { | 286 | if DestroyVar != nil { | ||
M v4/glib/goption.go +4 -4
| @@ -142,7 +142,7 @@ func (x *OptionContext) GetSummary() string { | |||
| 142 | 142 | return cret | |
| 143 | 143 | } | |
| 144 | 144 | ||
| 145 | - | var xOptionContextParse func(uintptr, int, []string, **Error) bool | |
| 145 | + | var xOptionContextParse func(uintptr, *int, *[]string, **Error) bool | |
| 146 | 146 | ||
| 147 | 147 | // Parses the command line arguments, recognizing options | |
| 148 | 148 | // which have been added to @context. A side-effect of | |
| @@ -165,7 +165,7 @@ var xOptionContextParse func(uintptr, int, []string, **Error) bool | |||
| 165 | 165 | // Note that function depends on the | |
| 166 | 166 | // [current locale](running.html#locale) for automatic | |
| 167 | 167 | // character set conversion of string and filename arguments. | |
| 168 | - | func (x *OptionContext) Parse(ArgcVar int, ArgvVar []string) (bool, error) { | |
| 168 | + | func (x *OptionContext) Parse(ArgcVar *int, ArgvVar *[]string) (bool, error) { | |
| 169 | 169 | var cerr *Error | |
| 170 | 170 | ||
| 171 | 171 | cret := xOptionContextParse(x.GoPointer(), ArgcVar, ArgvVar, &cerr) | |
| @@ -176,7 +176,7 @@ func (x *OptionContext) Parse(ArgcVar int, ArgvVar []string) (bool, error) { | |||
| 176 | 176 | ||
| 177 | 177 | } | |
| 178 | 178 | ||
| 179 | - | var xOptionContextParseStrv func(uintptr, []string, **Error) bool | |
| 179 | + | var xOptionContextParseStrv func(uintptr, *[]string, **Error) bool | |
| 180 | 180 | ||
| 181 | 181 | // Parses the command line arguments. | |
| 182 | 182 | // | |
| @@ -194,7 +194,7 @@ var xOptionContextParseStrv func(uintptr, []string, **Error) bool | |||
| 194 | 194 | // | |
| 195 | 195 | // This function is useful if you are trying to use #GOptionContext with | |
| 196 | 196 | // #GApplication. | |
| 197 | - | func (x *OptionContext) ParseStrv(ArgumentsVar []string) (bool, error) { | |
| 197 | + | func (x *OptionContext) ParseStrv(ArgumentsVar *[]string) (bool, error) { | |
| 198 | 198 | var cerr *Error | |
| 199 | 199 | ||
| 200 | 200 | cret := xOptionContextParseStrv(x.GoPointer(), ArgumentsVar, &cerr) | |
| @@ -142,7 +142,7 @@ func (x *OptionContext) GetSummary() string { | |||||
| 142 | return cret | 142 | return cret | ||
| 143 | } | 143 | } | ||
| 144 | 144 | ||||
| 145 | - | var xOptionContextParse func(uintptr, int, []string, **Error) bool | 145 | + | var xOptionContextParse func(uintptr, *int, *[]string, **Error) bool |
| 146 | 146 | ||||
| 147 | // Parses the command line arguments, recognizing options | 147 | // Parses the command line arguments, recognizing options | ||
| 148 | // which have been added to @context. A side-effect of | 148 | // which have been added to @context. A side-effect of | ||
| @@ -165,7 +165,7 @@ var xOptionContextParse func(uintptr, int, []string, **Error) bool | |||||
| 165 | // Note that function depends on the | 165 | // Note that function depends on the | ||
| 166 | // [current locale](running.html#locale) for automatic | 166 | // [current locale](running.html#locale) for automatic | ||
| 167 | // character set conversion of string and filename arguments. | 167 | // character set conversion of string and filename arguments. | ||
| 168 | - | func (x *OptionContext) Parse(ArgcVar int, ArgvVar []string) (bool, error) { | 168 | + | func (x *OptionContext) Parse(ArgcVar *int, ArgvVar *[]string) (bool, error) { |
| 169 | var cerr *Error | 169 | var cerr *Error | ||
| 170 | 170 | ||||
| 171 | cret := xOptionContextParse(x.GoPointer(), ArgcVar, ArgvVar, &cerr) | 171 | cret := xOptionContextParse(x.GoPointer(), ArgcVar, ArgvVar, &cerr) | ||
| @@ -176,7 +176,7 @@ func (x *OptionContext) Parse(ArgcVar int, ArgvVar []string) (bool, error) { | |||||
| 176 | 176 | ||||
| 177 | } | 177 | } | ||
| 178 | 178 | ||||
| 179 | - | var xOptionContextParseStrv func(uintptr, []string, **Error) bool | 179 | + | var xOptionContextParseStrv func(uintptr, *[]string, **Error) bool |
| 180 | 180 | ||||
| 181 | // Parses the command line arguments. | 181 | // Parses the command line arguments. | ||
| 182 | // | 182 | // | ||
| @@ -194,7 +194,7 @@ var xOptionContextParseStrv func(uintptr, []string, **Error) bool | |||||
| 194 | // | 194 | // | ||
| 195 | // This function is useful if you are trying to use #GOptionContext with | 195 | // This function is useful if you are trying to use #GOptionContext with | ||
| 196 | // #GApplication. | 196 | // #GApplication. | ||
| 197 | - | func (x *OptionContext) ParseStrv(ArgumentsVar []string) (bool, error) { | 197 | + | func (x *OptionContext) ParseStrv(ArgumentsVar *[]string) (bool, error) { |
| 198 | var cerr *Error | 198 | var cerr *Error | ||
| 199 | 199 | ||||
| 200 | cret := xOptionContextParseStrv(x.GoPointer(), ArgumentsVar, &cerr) | 200 | cret := xOptionContextParseStrv(x.GoPointer(), ArgumentsVar, &cerr) | ||
M v4/glib/grefcount.go +4 -4
| @@ -100,24 +100,24 @@ func RefCountCompare(RcVar int, ValVar int) bool { | |||
| 100 | 100 | return cret | |
| 101 | 101 | } | |
| 102 | 102 | ||
| 103 | - | var xRefCountDec func(int) bool | |
| 103 | + | var xRefCountDec func(*int) bool | |
| 104 | 104 | ||
| 105 | 105 | // Decreases the reference count. | |
| 106 | 106 | // | |
| 107 | 107 | // If %TRUE is returned, the reference count reached 0. After this point, @rc | |
| 108 | 108 | // is an undefined state and must be reinitialized with | |
| 109 | 109 | // g_ref_count_init() to be used again. | |
| 110 | - | func RefCountDec(RcVar int) bool { | |
| 110 | + | func RefCountDec(RcVar *int) bool { | |
| 111 | 111 | ||
| 112 | 112 | cret := xRefCountDec(RcVar) | |
| 113 | 113 | ||
| 114 | 114 | return cret | |
| 115 | 115 | } | |
| 116 | 116 | ||
| 117 | - | var xRefCountInc func(int) | |
| 117 | + | var xRefCountInc func(*int) | |
| 118 | 118 | ||
| 119 | 119 | // Increases the reference count. | |
| 120 | - | func RefCountInc(RcVar int) { | |
| 120 | + | func RefCountInc(RcVar *int) { | |
| 121 | 121 | ||
| 122 | 122 | xRefCountInc(RcVar) | |
| 123 | 123 | ||
| @@ -100,24 +100,24 @@ func RefCountCompare(RcVar int, ValVar int) bool { | |||||
| 100 | return cret | 100 | return cret | ||
| 101 | } | 101 | } | ||
| 102 | 102 | ||||
| 103 | - | var xRefCountDec func(int) bool | 103 | + | var xRefCountDec func(*int) bool |
| 104 | 104 | ||||
| 105 | // Decreases the reference count. | 105 | // Decreases the reference count. | ||
| 106 | // | 106 | // | ||
| 107 | // If %TRUE is returned, the reference count reached 0. After this point, @rc | 107 | // If %TRUE is returned, the reference count reached 0. After this point, @rc | ||
| 108 | // is an undefined state and must be reinitialized with | 108 | // is an undefined state and must be reinitialized with | ||
| 109 | // g_ref_count_init() to be used again. | 109 | // g_ref_count_init() to be used again. | ||
| 110 | - | func RefCountDec(RcVar int) bool { | 110 | + | func RefCountDec(RcVar *int) bool { |
| 111 | 111 | ||||
| 112 | cret := xRefCountDec(RcVar) | 112 | cret := xRefCountDec(RcVar) | ||
| 113 | 113 | ||||
| 114 | return cret | 114 | return cret | ||
| 115 | } | 115 | } | ||
| 116 | 116 | ||||
| 117 | - | var xRefCountInc func(int) | 117 | + | var xRefCountInc func(*int) |
| 118 | 118 | ||||
| 119 | // Increases the reference count. | 119 | // Increases the reference count. | ||
| 120 | - | func RefCountInc(RcVar int) { | 120 | + | func RefCountInc(RcVar *int) { |
| 121 | 121 | ||||
| 122 | xRefCountInc(RcVar) | 122 | xRefCountInc(RcVar) | ||
| 123 | 123 | ||||
M v4/glib/gthread.go +4 -4
| @@ -2125,7 +2125,7 @@ func MutexNew() *Mutex { | |||
| 2125 | 2125 | return cret | |
| 2126 | 2126 | } | |
| 2127 | 2127 | ||
| 2128 | - | var xOnceInitEnter func(uintptr) bool | |
| 2128 | + | var xOnceInitEnter func(*uintptr) bool | |
| 2129 | 2129 | ||
| 2130 | 2130 | // Function to be called when starting a critical initialization | |
| 2131 | 2131 | // section. The argument @location must point to a static | |
| @@ -2154,7 +2154,7 @@ var xOnceInitEnter func(uintptr) bool | |||
| 2154 | 2154 | // | |
| 2155 | 2155 | // While @location has a `volatile` qualifier, this is a historical artifact and | |
| 2156 | 2156 | // the pointer passed to it should not be `volatile`. | |
| 2157 | - | func OnceInitEnter(LocationVar uintptr) bool { | |
| 2157 | + | func OnceInitEnter(LocationVar *uintptr) bool { | |
| 2158 | 2158 | ||
| 2159 | 2159 | cret := xOnceInitEnter(LocationVar) | |
| 2160 | 2160 | ||
| @@ -2196,7 +2196,7 @@ func OnceInitEnterPointer(LocationVar uintptr) bool { | |||
| 2196 | 2196 | return cret | |
| 2197 | 2197 | } | |
| 2198 | 2198 | ||
| 2199 | - | var xOnceInitLeave func(uintptr, uint) | |
| 2199 | + | var xOnceInitLeave func(*uintptr, uint) | |
| 2200 | 2200 | ||
| 2201 | 2201 | // Counterpart to g_once_init_enter(). Expects a location of a static | |
| 2202 | 2202 | // 0-initialized initialization variable, and an initialization value | |
| @@ -2206,7 +2206,7 @@ var xOnceInitLeave func(uintptr, uint) | |||
| 2206 | 2206 | // | |
| 2207 | 2207 | // While @location has a `volatile` qualifier, this is a historical artifact and | |
| 2208 | 2208 | // the pointer passed to it should not be `volatile`. | |
| 2209 | - | func OnceInitLeave(LocationVar uintptr, ResultVar uint) { | |
| 2209 | + | func OnceInitLeave(LocationVar *uintptr, ResultVar uint) { | |
| 2210 | 2210 | ||
| 2211 | 2211 | xOnceInitLeave(LocationVar, ResultVar) | |
| 2212 | 2212 | ||
| @@ -2125,7 +2125,7 @@ func MutexNew() *Mutex { | |||||
| 2125 | return cret | 2125 | return cret | ||
| 2126 | } | 2126 | } | ||
| 2127 | 2127 | ||||
| 2128 | - | var xOnceInitEnter func(uintptr) bool | 2128 | + | var xOnceInitEnter func(*uintptr) bool |
| 2129 | 2129 | ||||
| 2130 | // Function to be called when starting a critical initialization | 2130 | // Function to be called when starting a critical initialization | ||
| 2131 | // section. The argument @location must point to a static | 2131 | // section. The argument @location must point to a static | ||
| @@ -2154,7 +2154,7 @@ var xOnceInitEnter func(uintptr) bool | |||||
| 2154 | // | 2154 | // | ||
| 2155 | // While @location has a `volatile` qualifier, this is a historical artifact and | 2155 | // While @location has a `volatile` qualifier, this is a historical artifact and | ||
| 2156 | // the pointer passed to it should not be `volatile`. | 2156 | // the pointer passed to it should not be `volatile`. | ||
| 2157 | - | func OnceInitEnter(LocationVar uintptr) bool { | 2157 | + | func OnceInitEnter(LocationVar *uintptr) bool { |
| 2158 | 2158 | ||||
| 2159 | cret := xOnceInitEnter(LocationVar) | 2159 | cret := xOnceInitEnter(LocationVar) | ||
| 2160 | 2160 | ||||
| @@ -2196,7 +2196,7 @@ func OnceInitEnterPointer(LocationVar uintptr) bool { | |||||
| 2196 | return cret | 2196 | return cret | ||
| 2197 | } | 2197 | } | ||
| 2198 | 2198 | ||||
| 2199 | - | var xOnceInitLeave func(uintptr, uint) | 2199 | + | var xOnceInitLeave func(*uintptr, uint) |
| 2200 | 2200 | ||||
| 2201 | // Counterpart to g_once_init_enter(). Expects a location of a static | 2201 | // Counterpart to g_once_init_enter(). Expects a location of a static | ||
| 2202 | // 0-initialized initialization variable, and an initialization value | 2202 | // 0-initialized initialization variable, and an initialization value | ||
| @@ -2206,7 +2206,7 @@ var xOnceInitLeave func(uintptr, uint) | |||||
| 2206 | // | 2206 | // | ||
| 2207 | // While @location has a `volatile` qualifier, this is a historical artifact and | 2207 | // While @location has a `volatile` qualifier, this is a historical artifact and | ||
| 2208 | // the pointer passed to it should not be `volatile`. | 2208 | // the pointer passed to it should not be `volatile`. | ||
| 2209 | - | func OnceInitLeave(LocationVar uintptr, ResultVar uint) { | 2209 | + | func OnceInitLeave(LocationVar *uintptr, ResultVar uint) { |
| 2210 | 2210 | ||||
| 2211 | xOnceInitLeave(LocationVar, ResultVar) | 2211 | xOnceInitLeave(LocationVar, ResultVar) | ||
| 2212 | 2212 | ||||
M v4/glib/gtimezone.go +2 -2
| @@ -193,7 +193,7 @@ func NewTimeZoneUtc() *TimeZone { | |||
| 193 | 193 | return cret | |
| 194 | 194 | } | |
| 195 | 195 | ||
| 196 | - | var xTimeZoneAdjustTime func(uintptr, TimeType, int64) int | |
| 196 | + | var xTimeZoneAdjustTime func(uintptr, TimeType, *int64) int | |
| 197 | 197 | ||
| 198 | 198 | // Finds an interval within @tz that corresponds to the given @time_, | |
| 199 | 199 | // possibly adjusting @time_ if required to fit into an interval. | |
| @@ -211,7 +211,7 @@ var xTimeZoneAdjustTime func(uintptr, TimeType, int64) int | |||
| 211 | 211 | // requested on March 14th 2010 in Toronto then this function would | |
| 212 | 212 | // adjust @time_ to be 03:00 and return the interval containing the | |
| 213 | 213 | // adjusted time. | |
| 214 | - | func (x *TimeZone) AdjustTime(TypeVar TimeType, TimeVar int64) int { | |
| 214 | + | func (x *TimeZone) AdjustTime(TypeVar TimeType, TimeVar *int64) int { | |
| 215 | 215 | ||
| 216 | 216 | cret := xTimeZoneAdjustTime(x.GoPointer(), TypeVar, TimeVar) | |
| 217 | 217 | return cret | |
| @@ -193,7 +193,7 @@ func NewTimeZoneUtc() *TimeZone { | |||||
| 193 | return cret | 193 | return cret | ||
| 194 | } | 194 | } | ||
| 195 | 195 | ||||
| 196 | - | var xTimeZoneAdjustTime func(uintptr, TimeType, int64) int | 196 | + | var xTimeZoneAdjustTime func(uintptr, TimeType, *int64) int |
| 197 | 197 | ||||
| 198 | // Finds an interval within @tz that corresponds to the given @time_, | 198 | // Finds an interval within @tz that corresponds to the given @time_, | ||
| 199 | // possibly adjusting @time_ if required to fit into an interval. | 199 | // possibly adjusting @time_ if required to fit into an interval. | ||
| @@ -211,7 +211,7 @@ var xTimeZoneAdjustTime func(uintptr, TimeType, int64) int | |||||
| 211 | // requested on March 14th 2010 in Toronto then this function would | 211 | // requested on March 14th 2010 in Toronto then this function would | ||
| 212 | // adjust @time_ to be 03:00 and return the interval containing the | 212 | // adjust @time_ to be 03:00 and return the interval containing the | ||
| 213 | // adjusted time. | 213 | // adjusted time. | ||
| 214 | - | func (x *TimeZone) AdjustTime(TypeVar TimeType, TimeVar int64) int { | 214 | + | func (x *TimeZone) AdjustTime(TypeVar TimeType, TimeVar *int64) int { |
| 215 | 215 | ||||
| 216 | cret := xTimeZoneAdjustTime(x.GoPointer(), TypeVar, TimeVar) | 216 | cret := xTimeZoneAdjustTime(x.GoPointer(), TypeVar, TimeVar) | ||
| 217 | return cret | 217 | return cret | ||
M v4/gobject/gobject.go +4 -4
| @@ -1264,7 +1264,7 @@ func (x *Object) AddToggleRef(NotifyVar *ToggleNotify, DataVar uintptr) { | |||
| 1264 | 1264 | ||
| 1265 | 1265 | } | |
| 1266 | 1266 | ||
| 1267 | - | var xObjectAddWeakPointer func(uintptr, uintptr) | |
| 1267 | + | var xObjectAddWeakPointer func(uintptr, *uintptr) | |
| 1268 | 1268 | ||
| 1269 | 1269 | // Adds a weak reference from weak_pointer to @object to indicate that | |
| 1270 | 1270 | // the pointer located at @weak_pointer_location is only valid during | |
| @@ -1275,7 +1275,7 @@ var xObjectAddWeakPointer func(uintptr, uintptr) | |||
| 1275 | 1275 | // this method are not thread-safe: they cannot safely be used in one | |
| 1276 | 1276 | // thread if the object's last g_object_unref() might happen in another | |
| 1277 | 1277 | // thread. Use #GWeakRef if thread-safety is required. | |
| 1278 | - | func (x *Object) AddWeakPointer(WeakPointerLocationVar uintptr) { | |
| 1278 | + | func (x *Object) AddWeakPointer(WeakPointerLocationVar *uintptr) { | |
| 1279 | 1279 | ||
| 1280 | 1280 | xObjectAddWeakPointer(x.GoPointer(), WeakPointerLocationVar) | |
| 1281 | 1281 | ||
| @@ -1859,12 +1859,12 @@ func (x *Object) RemoveToggleRef(NotifyVar *ToggleNotify, DataVar uintptr) { | |||
| 1859 | 1859 | ||
| 1860 | 1860 | } | |
| 1861 | 1861 | ||
| 1862 | - | var xObjectRemoveWeakPointer func(uintptr, uintptr) | |
| 1862 | + | var xObjectRemoveWeakPointer func(uintptr, *uintptr) | |
| 1863 | 1863 | ||
| 1864 | 1864 | // Removes a weak reference from @object that was previously added | |
| 1865 | 1865 | // using g_object_add_weak_pointer(). The @weak_pointer_location has | |
| 1866 | 1866 | // to match the one used with g_object_add_weak_pointer(). | |
| 1867 | - | func (x *Object) RemoveWeakPointer(WeakPointerLocationVar uintptr) { | |
| 1867 | + | func (x *Object) RemoveWeakPointer(WeakPointerLocationVar *uintptr) { | |
| 1868 | 1868 | ||
| 1869 | 1869 | xObjectRemoveWeakPointer(x.GoPointer(), WeakPointerLocationVar) | |
| 1870 | 1870 | ||
| @@ -1264,7 +1264,7 @@ func (x *Object) AddToggleRef(NotifyVar *ToggleNotify, DataVar uintptr) { | |||||
| 1264 | 1264 | ||||
| 1265 | } | 1265 | } | ||
| 1266 | 1266 | ||||
| 1267 | - | var xObjectAddWeakPointer func(uintptr, uintptr) | 1267 | + | var xObjectAddWeakPointer func(uintptr, *uintptr) |
| 1268 | 1268 | ||||
| 1269 | // Adds a weak reference from weak_pointer to @object to indicate that | 1269 | // Adds a weak reference from weak_pointer to @object to indicate that | ||
| 1270 | // the pointer located at @weak_pointer_location is only valid during | 1270 | // the pointer located at @weak_pointer_location is only valid during | ||
| @@ -1275,7 +1275,7 @@ var xObjectAddWeakPointer func(uintptr, uintptr) | |||||
| 1275 | // this method are not thread-safe: they cannot safely be used in one | 1275 | // this method are not thread-safe: they cannot safely be used in one | ||
| 1276 | // thread if the object's last g_object_unref() might happen in another | 1276 | // thread if the object's last g_object_unref() might happen in another | ||
| 1277 | // thread. Use #GWeakRef if thread-safety is required. | 1277 | // thread. Use #GWeakRef if thread-safety is required. | ||
| 1278 | - | func (x *Object) AddWeakPointer(WeakPointerLocationVar uintptr) { | 1278 | + | func (x *Object) AddWeakPointer(WeakPointerLocationVar *uintptr) { |
| 1279 | 1279 | ||||
| 1280 | xObjectAddWeakPointer(x.GoPointer(), WeakPointerLocationVar) | 1280 | xObjectAddWeakPointer(x.GoPointer(), WeakPointerLocationVar) | ||
| 1281 | 1281 | ||||
| @@ -1859,12 +1859,12 @@ func (x *Object) RemoveToggleRef(NotifyVar *ToggleNotify, DataVar uintptr) { | |||||
| 1859 | 1859 | ||||
| 1860 | } | 1860 | } | ||
| 1861 | 1861 | ||||
| 1862 | - | var xObjectRemoveWeakPointer func(uintptr, uintptr) | 1862 | + | var xObjectRemoveWeakPointer func(uintptr, *uintptr) |
| 1863 | 1863 | ||||
| 1864 | // Removes a weak reference from @object that was previously added | 1864 | // Removes a weak reference from @object that was previously added | ||
| 1865 | // using g_object_add_weak_pointer(). The @weak_pointer_location has | 1865 | // using g_object_add_weak_pointer(). The @weak_pointer_location has | ||
| 1866 | // to match the one used with g_object_add_weak_pointer(). | 1866 | // to match the one used with g_object_add_weak_pointer(). | ||
| 1867 | - | func (x *Object) RemoveWeakPointer(WeakPointerLocationVar uintptr) { | 1867 | + | func (x *Object) RemoveWeakPointer(WeakPointerLocationVar *uintptr) { |
| 1868 | 1868 | ||||
| 1869 | xObjectRemoveWeakPointer(x.GoPointer(), WeakPointerLocationVar) | 1869 | xObjectRemoveWeakPointer(x.GoPointer(), WeakPointerLocationVar) | ||
| 1870 | 1870 | ||||
M v4/gtk/gtkcssprovider.go +2 -2
| @@ -226,12 +226,12 @@ func (x *CssProvider) ConnectParsingError(cb *func(CssProvider, uintptr, *glib.E | |||
| 226 | 226 | return handlerID | |
| 227 | 227 | } | |
| 228 | 228 | ||
| 229 | - | fcb := func(clsPtr uintptr, SectionVarp uintptr, ErrorVarp uintptr) { | |
| 229 | + | fcb := func(clsPtr uintptr, SectionVarp uintptr, ErrorVarp unsafe.Pointer) { | |
| 230 | 230 | fa := CssProvider{} | |
| 231 | 231 | fa.Ptr = clsPtr | |
| 232 | 232 | cbFn := *cb | |
| 233 | 233 | ||
| 234 | - | cbFn(fa, SectionVarp, (*glib.Error)(unsafe.Pointer(ErrorVarp))) | |
| 234 | + | cbFn(fa, SectionVarp, (*glib.Error)(ErrorVarp)) | |
| 235 | 235 | ||
| 236 | 236 | } | |
| 237 | 237 | cbRefPtr := purego.NewCallback(fcb) | |
| @@ -226,12 +226,12 @@ func (x *CssProvider) ConnectParsingError(cb *func(CssProvider, uintptr, *glib.E | |||||
| 226 | return handlerID | 226 | return handlerID | ||
| 227 | } | 227 | } | ||
| 228 | 228 | ||||
| 229 | - | fcb := func(clsPtr uintptr, SectionVarp uintptr, ErrorVarp uintptr) { | 229 | + | fcb := func(clsPtr uintptr, SectionVarp uintptr, ErrorVarp unsafe.Pointer) { |
| 230 | fa := CssProvider{} | 230 | fa := CssProvider{} | ||
| 231 | fa.Ptr = clsPtr | 231 | fa.Ptr = clsPtr | ||
| 232 | cbFn := *cb | 232 | cbFn := *cb | ||
| 233 | 233 | ||||
| 234 | - | cbFn(fa, SectionVarp, (*glib.Error)(unsafe.Pointer(ErrorVarp))) | 234 | + | cbFn(fa, SectionVarp, (*glib.Error)(ErrorVarp)) |
| 235 | 235 | ||||
| 236 | } | 236 | } | ||
| 237 | cbRefPtr := purego.NewCallback(fcb) | 237 | cbRefPtr := purego.NewCallback(fcb) | ||
M v4/gtk/gtkeditable.go +13 -13
| @@ -41,24 +41,24 @@ func (x *EditableInterface) GoPointer() uintptr { | |||
| 41 | 41 | } | |
| 42 | 42 | ||
| 43 | 43 | // OverrideInsertText sets the "insert_text" callback function. | |
| 44 | - | func (x *EditableInterface) OverrideInsertText(cb func(Editable, string, int, int)) { | |
| 44 | + | func (x *EditableInterface) OverrideInsertText(cb func(Editable, string, int, *int)) { | |
| 45 | 45 | if cb == nil { | |
| 46 | 46 | x.xInsertText = 0 | |
| 47 | 47 | } else { | |
| 48 | - | x.xInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) { | |
| 48 | + | x.xInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) { | |
| 49 | 49 | cb(&EditableBase{Ptr: EditableVarp}, TextVarp, LengthVarp, PositionVarp) | |
| 50 | 50 | }) | |
| 51 | 51 | } | |
| 52 | 52 | } | |
| 53 | 53 | ||
| 54 | 54 | // GetInsertText gets the "insert_text" callback function. | |
| 55 | - | func (x *EditableInterface) GetInsertText() func(Editable, string, int, int) { | |
| 55 | + | func (x *EditableInterface) GetInsertText() func(Editable, string, int, *int) { | |
| 56 | 56 | if x.xInsertText == 0 { | |
| 57 | 57 | return nil | |
| 58 | 58 | } | |
| 59 | - | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) | |
| 59 | + | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) | |
| 60 | 60 | purego.RegisterFunc(&rawCallback, x.xInsertText) | |
| 61 | - | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar int) { | |
| 61 | + | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar *int) { | |
| 62 | 62 | rawCallback(EditableVar.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 63 | 63 | } | |
| 64 | 64 | } | |
| @@ -133,24 +133,24 @@ func (x *EditableInterface) GetGetText() func(Editable) string { | |||
| 133 | 133 | } | |
| 134 | 134 | ||
| 135 | 135 | // OverrideDoInsertText sets the "do_insert_text" callback function. | |
| 136 | - | func (x *EditableInterface) OverrideDoInsertText(cb func(Editable, string, int, int)) { | |
| 136 | + | func (x *EditableInterface) OverrideDoInsertText(cb func(Editable, string, int, *int)) { | |
| 137 | 137 | if cb == nil { | |
| 138 | 138 | x.xDoInsertText = 0 | |
| 139 | 139 | } else { | |
| 140 | - | x.xDoInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) { | |
| 140 | + | x.xDoInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) { | |
| 141 | 141 | cb(&EditableBase{Ptr: EditableVarp}, TextVarp, LengthVarp, PositionVarp) | |
| 142 | 142 | }) | |
| 143 | 143 | } | |
| 144 | 144 | } | |
| 145 | 145 | ||
| 146 | 146 | // GetDoInsertText gets the "do_insert_text" callback function. | |
| 147 | - | func (x *EditableInterface) GetDoInsertText() func(Editable, string, int, int) { | |
| 147 | + | func (x *EditableInterface) GetDoInsertText() func(Editable, string, int, *int) { | |
| 148 | 148 | if x.xDoInsertText == 0 { | |
| 149 | 149 | return nil | |
| 150 | 150 | } | |
| 151 | - | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) | |
| 151 | + | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) | |
| 152 | 152 | purego.RegisterFunc(&rawCallback, x.xDoInsertText) | |
| 153 | - | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar int) { | |
| 153 | + | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar *int) { | |
| 154 | 154 | rawCallback(EditableVar.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 155 | 155 | } | |
| 156 | 156 | } | |
| @@ -417,7 +417,7 @@ type Editable interface { | |||
| 417 | 417 | GetText() string | |
| 418 | 418 | GetWidthChars() int | |
| 419 | 419 | InitDelegate() | |
| 420 | - | InsertText(TextVar string, LengthVar int, PositionVar int) | |
| 420 | + | InsertText(TextVar string, LengthVar int, PositionVar *int) | |
| 421 | 421 | SelectRegion(StartPosVar int, EndPosVar int) | |
| 422 | 422 | SetAlignment(XalignVar float32) | |
| 423 | 423 | SetEditable(IsEditableVar bool) | |
| @@ -643,7 +643,7 @@ func (x *EditableBase) InitDelegate() { | |||
| 643 | 643 | // Note that the position is in characters, not in bytes. | |
| 644 | 644 | // The function updates @position to point after the newly | |
| 645 | 645 | // inserted text. | |
| 646 | - | func (x *EditableBase) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 646 | + | func (x *EditableBase) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 647 | 647 | ||
| 648 | 648 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 649 | 649 | ||
| @@ -898,7 +898,7 @@ var XGtkEditableGetSelectionBounds func(uintptr, *int, *int) bool | |||
| 898 | 898 | var XGtkEditableGetText func(uintptr) string | |
| 899 | 899 | var XGtkEditableGetWidthChars func(uintptr) int | |
| 900 | 900 | var XGtkEditableInitDelegate func(uintptr) | |
| 901 | - | var XGtkEditableInsertText func(uintptr, string, int, int) | |
| 901 | + | var XGtkEditableInsertText func(uintptr, string, int, *int) | |
| 902 | 902 | var XGtkEditableSelectRegion func(uintptr, int, int) | |
| 903 | 903 | var XGtkEditableSetAlignment func(uintptr, float32) | |
| 904 | 904 | var XGtkEditableSetEditable func(uintptr, bool) | |
| @@ -41,24 +41,24 @@ func (x *EditableInterface) GoPointer() uintptr { | |||||
| 41 | } | 41 | } | ||
| 42 | 42 | ||||
| 43 | // OverrideInsertText sets the "insert_text" callback function. | 43 | // OverrideInsertText sets the "insert_text" callback function. | ||
| 44 | - | func (x *EditableInterface) OverrideInsertText(cb func(Editable, string, int, int)) { | 44 | + | func (x *EditableInterface) OverrideInsertText(cb func(Editable, string, int, *int)) { |
| 45 | if cb == nil { | 45 | if cb == nil { | ||
| 46 | x.xInsertText = 0 | 46 | x.xInsertText = 0 | ||
| 47 | } else { | 47 | } else { | ||
| 48 | - | x.xInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) { | 48 | + | x.xInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) { |
| 49 | cb(&EditableBase{Ptr: EditableVarp}, TextVarp, LengthVarp, PositionVarp) | 49 | cb(&EditableBase{Ptr: EditableVarp}, TextVarp, LengthVarp, PositionVarp) | ||
| 50 | }) | 50 | }) | ||
| 51 | } | 51 | } | ||
| 52 | } | 52 | } | ||
| 53 | 53 | ||||
| 54 | // GetInsertText gets the "insert_text" callback function. | 54 | // GetInsertText gets the "insert_text" callback function. | ||
| 55 | - | func (x *EditableInterface) GetInsertText() func(Editable, string, int, int) { | 55 | + | func (x *EditableInterface) GetInsertText() func(Editable, string, int, *int) { |
| 56 | if x.xInsertText == 0 { | 56 | if x.xInsertText == 0 { | ||
| 57 | return nil | 57 | return nil | ||
| 58 | } | 58 | } | ||
| 59 | - | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) | 59 | + | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) |
| 60 | purego.RegisterFunc(&rawCallback, x.xInsertText) | 60 | purego.RegisterFunc(&rawCallback, x.xInsertText) | ||
| 61 | - | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar int) { | 61 | + | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar *int) { |
| 62 | rawCallback(EditableVar.GoPointer(), TextVar, LengthVar, PositionVar) | 62 | rawCallback(EditableVar.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 63 | } | 63 | } | ||
| 64 | } | 64 | } | ||
| @@ -133,24 +133,24 @@ func (x *EditableInterface) GetGetText() func(Editable) string { | |||||
| 133 | } | 133 | } | ||
| 134 | 134 | ||||
| 135 | // OverrideDoInsertText sets the "do_insert_text" callback function. | 135 | // OverrideDoInsertText sets the "do_insert_text" callback function. | ||
| 136 | - | func (x *EditableInterface) OverrideDoInsertText(cb func(Editable, string, int, int)) { | 136 | + | func (x *EditableInterface) OverrideDoInsertText(cb func(Editable, string, int, *int)) { |
| 137 | if cb == nil { | 137 | if cb == nil { | ||
| 138 | x.xDoInsertText = 0 | 138 | x.xDoInsertText = 0 | ||
| 139 | } else { | 139 | } else { | ||
| 140 | - | x.xDoInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) { | 140 | + | x.xDoInsertText = purego.NewCallback(func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) { |
| 141 | cb(&EditableBase{Ptr: EditableVarp}, TextVarp, LengthVarp, PositionVarp) | 141 | cb(&EditableBase{Ptr: EditableVarp}, TextVarp, LengthVarp, PositionVarp) | ||
| 142 | }) | 142 | }) | ||
| 143 | } | 143 | } | ||
| 144 | } | 144 | } | ||
| 145 | 145 | ||||
| 146 | // GetDoInsertText gets the "do_insert_text" callback function. | 146 | // GetDoInsertText gets the "do_insert_text" callback function. | ||
| 147 | - | func (x *EditableInterface) GetDoInsertText() func(Editable, string, int, int) { | 147 | + | func (x *EditableInterface) GetDoInsertText() func(Editable, string, int, *int) { |
| 148 | if x.xDoInsertText == 0 { | 148 | if x.xDoInsertText == 0 { | ||
| 149 | return nil | 149 | return nil | ||
| 150 | } | 150 | } | ||
| 151 | - | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp int) | 151 | + | var rawCallback func(EditableVarp uintptr, TextVarp string, LengthVarp int, PositionVarp *int) |
| 152 | purego.RegisterFunc(&rawCallback, x.xDoInsertText) | 152 | purego.RegisterFunc(&rawCallback, x.xDoInsertText) | ||
| 153 | - | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar int) { | 153 | + | return func(EditableVar Editable, TextVar string, LengthVar int, PositionVar *int) { |
| 154 | rawCallback(EditableVar.GoPointer(), TextVar, LengthVar, PositionVar) | 154 | rawCallback(EditableVar.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 155 | } | 155 | } | ||
| 156 | } | 156 | } | ||
| @@ -417,7 +417,7 @@ type Editable interface { | |||||
| 417 | GetText() string | 417 | GetText() string | ||
| 418 | GetWidthChars() int | 418 | GetWidthChars() int | ||
| 419 | InitDelegate() | 419 | InitDelegate() | ||
| 420 | - | InsertText(TextVar string, LengthVar int, PositionVar int) | 420 | + | InsertText(TextVar string, LengthVar int, PositionVar *int) |
| 421 | SelectRegion(StartPosVar int, EndPosVar int) | 421 | SelectRegion(StartPosVar int, EndPosVar int) | ||
| 422 | SetAlignment(XalignVar float32) | 422 | SetAlignment(XalignVar float32) | ||
| 423 | SetEditable(IsEditableVar bool) | 423 | SetEditable(IsEditableVar bool) | ||
| @@ -643,7 +643,7 @@ func (x *EditableBase) InitDelegate() { | |||||
| 643 | // Note that the position is in characters, not in bytes. | 643 | // Note that the position is in characters, not in bytes. | ||
| 644 | // The function updates @position to point after the newly | 644 | // The function updates @position to point after the newly | ||
| 645 | // inserted text. | 645 | // inserted text. | ||
| 646 | - | func (x *EditableBase) InsertText(TextVar string, LengthVar int, PositionVar int) { | 646 | + | func (x *EditableBase) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 647 | 647 | ||||
| 648 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 648 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 649 | 649 | ||||
| @@ -898,7 +898,7 @@ var XGtkEditableGetSelectionBounds func(uintptr, *int, *int) bool | |||||
| 898 | var XGtkEditableGetText func(uintptr) string | 898 | var XGtkEditableGetText func(uintptr) string | ||
| 899 | var XGtkEditableGetWidthChars func(uintptr) int | 899 | var XGtkEditableGetWidthChars func(uintptr) int | ||
| 900 | var XGtkEditableInitDelegate func(uintptr) | 900 | var XGtkEditableInitDelegate func(uintptr) | ||
| 901 | - | var XGtkEditableInsertText func(uintptr, string, int, int) | 901 | + | var XGtkEditableInsertText func(uintptr, string, int, *int) |
| 902 | var XGtkEditableSelectRegion func(uintptr, int, int) | 902 | var XGtkEditableSelectRegion func(uintptr, int, int) | ||
| 903 | var XGtkEditableSetAlignment func(uintptr, float32) | 903 | var XGtkEditableSetAlignment func(uintptr, float32) | ||
| 904 | var XGtkEditableSetEditable func(uintptr, bool) | 904 | var XGtkEditableSetEditable func(uintptr, bool) | ||
M v4/gtk/gtkeditablelabel.go +1 -1
| @@ -635,7 +635,7 @@ func (x *EditableLabel) InitDelegate() { | |||
| 635 | 635 | // Note that the position is in characters, not in bytes. | |
| 636 | 636 | // The function updates @position to point after the newly | |
| 637 | 637 | // inserted text. | |
| 638 | - | func (x *EditableLabel) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 638 | + | func (x *EditableLabel) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 639 | 639 | ||
| 640 | 640 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 641 | 641 | ||
| @@ -635,7 +635,7 @@ func (x *EditableLabel) InitDelegate() { | |||||
| 635 | // Note that the position is in characters, not in bytes. | 635 | // Note that the position is in characters, not in bytes. | ||
| 636 | // The function updates @position to point after the newly | 636 | // The function updates @position to point after the newly | ||
| 637 | // inserted text. | 637 | // inserted text. | ||
| 638 | - | func (x *EditableLabel) InsertText(TextVar string, LengthVar int, PositionVar int) { | 638 | + | func (x *EditableLabel) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 639 | 639 | ||||
| 640 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 640 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 641 | 641 | ||||
M v4/gtk/gtkentry.go +1 -1
| @@ -2223,7 +2223,7 @@ func (x *Entry) InitDelegate() { | |||
| 2223 | 2223 | // Note that the position is in characters, not in bytes. | |
| 2224 | 2224 | // The function updates @position to point after the newly | |
| 2225 | 2225 | // inserted text. | |
| 2226 | - | func (x *Entry) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 2226 | + | func (x *Entry) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 2227 | 2227 | ||
| 2228 | 2228 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 2229 | 2229 | ||
| @@ -2223,7 +2223,7 @@ func (x *Entry) InitDelegate() { | |||||
| 2223 | // Note that the position is in characters, not in bytes. | 2223 | // Note that the position is in characters, not in bytes. | ||
| 2224 | // The function updates @position to point after the newly | 2224 | // The function updates @position to point after the newly | ||
| 2225 | // inserted text. | 2225 | // inserted text. | ||
| 2226 | - | func (x *Entry) InsertText(TextVar string, LengthVar int, PositionVar int) { | 2226 | + | func (x *Entry) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 2227 | 2227 | ||||
| 2228 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 2228 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 2229 | 2229 | ||||
M v4/gtk/gtkpasswordentry.go +1 -1
| @@ -705,7 +705,7 @@ func (x *PasswordEntry) InitDelegate() { | |||
| 705 | 705 | // Note that the position is in characters, not in bytes. | |
| 706 | 706 | // The function updates @position to point after the newly | |
| 707 | 707 | // inserted text. | |
| 708 | - | func (x *PasswordEntry) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 708 | + | func (x *PasswordEntry) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 709 | 709 | ||
| 710 | 710 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 711 | 711 | ||
| @@ -705,7 +705,7 @@ func (x *PasswordEntry) InitDelegate() { | |||||
| 705 | // Note that the position is in characters, not in bytes. | 705 | // Note that the position is in characters, not in bytes. | ||
| 706 | // The function updates @position to point after the newly | 706 | // The function updates @position to point after the newly | ||
| 707 | // inserted text. | 707 | // inserted text. | ||
| 708 | - | func (x *PasswordEntry) InsertText(TextVar string, LengthVar int, PositionVar int) { | 708 | + | func (x *PasswordEntry) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 709 | 709 | ||||
| 710 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 710 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 711 | 711 | ||||
M v4/gtk/gtksearchentry.go +1 -1
| @@ -931,7 +931,7 @@ func (x *SearchEntry) InitDelegate() { | |||
| 931 | 931 | // Note that the position is in characters, not in bytes. | |
| 932 | 932 | // The function updates @position to point after the newly | |
| 933 | 933 | // inserted text. | |
| 934 | - | func (x *SearchEntry) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 934 | + | func (x *SearchEntry) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 935 | 935 | ||
| 936 | 936 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 937 | 937 | ||
| @@ -931,7 +931,7 @@ func (x *SearchEntry) InitDelegate() { | |||||
| 931 | // Note that the position is in characters, not in bytes. | 931 | // Note that the position is in characters, not in bytes. | ||
| 932 | // The function updates @position to point after the newly | 932 | // The function updates @position to point after the newly | ||
| 933 | // inserted text. | 933 | // inserted text. | ||
| 934 | - | func (x *SearchEntry) InsertText(TextVar string, LengthVar int, PositionVar int) { | 934 | + | func (x *SearchEntry) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 935 | 935 | ||||
| 936 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 936 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 937 | 937 | ||||
M v4/gtk/gtkspinbutton.go +1 -1
| @@ -1364,7 +1364,7 @@ func (x *SpinButton) InitDelegate() { | |||
| 1364 | 1364 | // Note that the position is in characters, not in bytes. | |
| 1365 | 1365 | // The function updates @position to point after the newly | |
| 1366 | 1366 | // inserted text. | |
| 1367 | - | func (x *SpinButton) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 1367 | + | func (x *SpinButton) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 1368 | 1368 | ||
| 1369 | 1369 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 1370 | 1370 | ||
| @@ -1364,7 +1364,7 @@ func (x *SpinButton) InitDelegate() { | |||||
| 1364 | // Note that the position is in characters, not in bytes. | 1364 | // Note that the position is in characters, not in bytes. | ||
| 1365 | // The function updates @position to point after the newly | 1365 | // The function updates @position to point after the newly | ||
| 1366 | // inserted text. | 1366 | // inserted text. | ||
| 1367 | - | func (x *SpinButton) InsertText(TextVar string, LengthVar int, PositionVar int) { | 1367 | + | func (x *SpinButton) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 1368 | 1368 | ||||
| 1369 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 1369 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 1370 | 1370 | ||||
M v4/gtk/gtktestutils.go +2 -2
| @@ -7,7 +7,7 @@ import ( | |||
| 7 | 7 | "github.com/bnema/puregotk/pkg/core" | |
| 8 | 8 | ) | |
| 9 | 9 | ||
| 10 | - | var xTestInit func(int, []string, ...interface{}) | |
| 10 | + | var xTestInit func(*int, *[]string, ...interface{}) | |
| 11 | 11 | ||
| 12 | 12 | // This function is used to initialize a GTK test program. | |
| 13 | 13 | // | |
| @@ -18,7 +18,7 @@ var xTestInit func(int, []string, ...interface{}) | |||
| 18 | 18 | // | |
| 19 | 19 | // Like gtk_init() and g_test_init(), any known arguments will be | |
| 20 | 20 | // processed and stripped from @argc and @argv. | |
| 21 | - | func TestInit(ArgcpVar int, ArgvpVar []string, varArgs ...interface{}) { | |
| 21 | + | func TestInit(ArgcpVar *int, ArgvpVar *[]string, varArgs ...interface{}) { | |
| 22 | 22 | ||
| 23 | 23 | xTestInit(ArgcpVar, ArgvpVar, varArgs...) | |
| 24 | 24 | ||
| @@ -7,7 +7,7 @@ import ( | |||||
| 7 | "github.com/bnema/puregotk/pkg/core" | 7 | "github.com/bnema/puregotk/pkg/core" | ||
| 8 | ) | 8 | ) | ||
| 9 | 9 | ||||
| 10 | - | var xTestInit func(int, []string, ...interface{}) | 10 | + | var xTestInit func(*int, *[]string, ...interface{}) |
| 11 | 11 | ||||
| 12 | // This function is used to initialize a GTK test program. | 12 | // This function is used to initialize a GTK test program. | ||
| 13 | // | 13 | // | ||
| @@ -18,7 +18,7 @@ var xTestInit func(int, []string, ...interface{}) | |||||
| 18 | // | 18 | // | ||
| 19 | // Like gtk_init() and g_test_init(), any known arguments will be | 19 | // Like gtk_init() and g_test_init(), any known arguments will be | ||
| 20 | // processed and stripped from @argc and @argv. | 20 | // processed and stripped from @argc and @argv. | ||
| 21 | - | func TestInit(ArgcpVar int, ArgvpVar []string, varArgs ...interface{}) { | 21 | + | func TestInit(ArgcpVar *int, ArgvpVar *[]string, varArgs ...interface{}) { |
| 22 | 22 | ||||
| 23 | xTestInit(ArgcpVar, ArgvpVar, varArgs...) | 23 | xTestInit(ArgcpVar, ArgvpVar, varArgs...) | ||
| 24 | 24 | ||||
M v4/gtk/gtktext.go +1 -1
| @@ -1701,7 +1701,7 @@ func (x *Text) InitDelegate() { | |||
| 1701 | 1701 | // Note that the position is in characters, not in bytes. | |
| 1702 | 1702 | // The function updates @position to point after the newly | |
| 1703 | 1703 | // inserted text. | |
| 1704 | - | func (x *Text) InsertText(TextVar string, LengthVar int, PositionVar int) { | |
| 1704 | + | func (x *Text) InsertText(TextVar string, LengthVar int, PositionVar *int) { | |
| 1705 | 1705 | ||
| 1706 | 1706 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | |
| 1707 | 1707 | ||
| @@ -1701,7 +1701,7 @@ func (x *Text) InitDelegate() { | |||||
| 1701 | // Note that the position is in characters, not in bytes. | 1701 | // Note that the position is in characters, not in bytes. | ||
| 1702 | // The function updates @position to point after the newly | 1702 | // The function updates @position to point after the newly | ||
| 1703 | // inserted text. | 1703 | // inserted text. | ||
| 1704 | - | func (x *Text) InsertText(TextVar string, LengthVar int, PositionVar int) { | 1704 | + | func (x *Text) InsertText(TextVar string, LengthVar int, PositionVar *int) { |
| 1705 | 1705 | ||||
| 1706 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | 1706 | XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) | ||
| 1707 | 1707 | ||||
M v4/pango/pango-font.go +7 -7
| @@ -199,24 +199,24 @@ func (x *FontClass) GetDescribeAbsolute() func(*Font) *FontDescription { | |||
| 199 | 199 | } | |
| 200 | 200 | ||
| 201 | 201 | // OverrideGetFeatures sets the "get_features" callback function. | |
| 202 | - | func (x *FontClass) OverrideGetFeatures(cb func(*Font, *[]uintptr, uint, uint)) { | |
| 202 | + | func (x *FontClass) OverrideGetFeatures(cb func(*Font, *[]uintptr, uint, *uint)) { | |
| 203 | 203 | if cb == nil { | |
| 204 | 204 | x.xGetFeatures = 0 | |
| 205 | 205 | } else { | |
| 206 | - | x.xGetFeatures = purego.NewCallback(func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp uint) { | |
| 206 | + | x.xGetFeatures = purego.NewCallback(func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp *uint) { | |
| 207 | 207 | cb(FontNewFromInternalPtr(FontVarp), FeaturesVarp, LenVarp, NumFeaturesVarp) | |
| 208 | 208 | }) | |
| 209 | 209 | } | |
| 210 | 210 | } | |
| 211 | 211 | ||
| 212 | 212 | // GetGetFeatures gets the "get_features" callback function. | |
| 213 | - | func (x *FontClass) GetGetFeatures() func(*Font, *[]uintptr, uint, uint) { | |
| 213 | + | func (x *FontClass) GetGetFeatures() func(*Font, *[]uintptr, uint, *uint) { | |
| 214 | 214 | if x.xGetFeatures == 0 { | |
| 215 | 215 | return nil | |
| 216 | 216 | } | |
| 217 | - | var rawCallback func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp uint) | |
| 217 | + | var rawCallback func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp *uint) | |
| 218 | 218 | purego.RegisterFunc(&rawCallback, x.xGetFeatures) | |
| 219 | - | return func(FontVar *Font, FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar uint) { | |
| 219 | + | return func(FontVar *Font, FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar *uint) { | |
| 220 | 220 | rawCallback(FontVar.GoPointer(), FeaturesVar, LenVar, NumFeaturesVar) | |
| 221 | 221 | } | |
| 222 | 222 | } | |
| @@ -1673,7 +1673,7 @@ func (x *Font) GetFace() *FontFace { | |||
| 1673 | 1673 | return cls | |
| 1674 | 1674 | } | |
| 1675 | 1675 | ||
| 1676 | - | var xFontGetFeatures func(uintptr, *[]uintptr, uint, uint) | |
| 1676 | + | var xFontGetFeatures func(uintptr, *[]uintptr, uint, *uint) | |
| 1677 | 1677 | ||
| 1678 | 1678 | // Obtain the OpenType features that are provided by the font. | |
| 1679 | 1679 | // | |
| @@ -1682,7 +1682,7 @@ var xFontGetFeatures func(uintptr, *[]uintptr, uint, uint) | |||
| 1682 | 1682 | // | |
| 1683 | 1683 | // Note that this does not include OpenType features which the | |
| 1684 | 1684 | // rendering system enables by default. | |
| 1685 | - | func (x *Font) GetFeatures(FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar uint) { | |
| 1685 | + | func (x *Font) GetFeatures(FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar *uint) { | |
| 1686 | 1686 | ||
| 1687 | 1687 | xFontGetFeatures(x.GoPointer(), FeaturesVar, LenVar, NumFeaturesVar) | |
| 1688 | 1688 | ||
| @@ -199,24 +199,24 @@ func (x *FontClass) GetDescribeAbsolute() func(*Font) *FontDescription { | |||||
| 199 | } | 199 | } | ||
| 200 | 200 | ||||
| 201 | // OverrideGetFeatures sets the "get_features" callback function. | 201 | // OverrideGetFeatures sets the "get_features" callback function. | ||
| 202 | - | func (x *FontClass) OverrideGetFeatures(cb func(*Font, *[]uintptr, uint, uint)) { | 202 | + | func (x *FontClass) OverrideGetFeatures(cb func(*Font, *[]uintptr, uint, *uint)) { |
| 203 | if cb == nil { | 203 | if cb == nil { | ||
| 204 | x.xGetFeatures = 0 | 204 | x.xGetFeatures = 0 | ||
| 205 | } else { | 205 | } else { | ||
| 206 | - | x.xGetFeatures = purego.NewCallback(func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp uint) { | 206 | + | x.xGetFeatures = purego.NewCallback(func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp *uint) { |
| 207 | cb(FontNewFromInternalPtr(FontVarp), FeaturesVarp, LenVarp, NumFeaturesVarp) | 207 | cb(FontNewFromInternalPtr(FontVarp), FeaturesVarp, LenVarp, NumFeaturesVarp) | ||
| 208 | }) | 208 | }) | ||
| 209 | } | 209 | } | ||
| 210 | } | 210 | } | ||
| 211 | 211 | ||||
| 212 | // GetGetFeatures gets the "get_features" callback function. | 212 | // GetGetFeatures gets the "get_features" callback function. | ||
| 213 | - | func (x *FontClass) GetGetFeatures() func(*Font, *[]uintptr, uint, uint) { | 213 | + | func (x *FontClass) GetGetFeatures() func(*Font, *[]uintptr, uint, *uint) { |
| 214 | if x.xGetFeatures == 0 { | 214 | if x.xGetFeatures == 0 { | ||
| 215 | return nil | 215 | return nil | ||
| 216 | } | 216 | } | ||
| 217 | - | var rawCallback func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp uint) | 217 | + | var rawCallback func(FontVarp uintptr, FeaturesVarp *[]uintptr, LenVarp uint, NumFeaturesVarp *uint) |
| 218 | purego.RegisterFunc(&rawCallback, x.xGetFeatures) | 218 | purego.RegisterFunc(&rawCallback, x.xGetFeatures) | ||
| 219 | - | return func(FontVar *Font, FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar uint) { | 219 | + | return func(FontVar *Font, FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar *uint) { |
| 220 | rawCallback(FontVar.GoPointer(), FeaturesVar, LenVar, NumFeaturesVar) | 220 | rawCallback(FontVar.GoPointer(), FeaturesVar, LenVar, NumFeaturesVar) | ||
| 221 | } | 221 | } | ||
| 222 | } | 222 | } | ||
| @@ -1673,7 +1673,7 @@ func (x *Font) GetFace() *FontFace { | |||||
| 1673 | return cls | 1673 | return cls | ||
| 1674 | } | 1674 | } | ||
| 1675 | 1675 | ||||
| 1676 | - | var xFontGetFeatures func(uintptr, *[]uintptr, uint, uint) | 1676 | + | var xFontGetFeatures func(uintptr, *[]uintptr, uint, *uint) |
| 1677 | 1677 | ||||
| 1678 | // Obtain the OpenType features that are provided by the font. | 1678 | // Obtain the OpenType features that are provided by the font. | ||
| 1679 | // | 1679 | // | ||
| @@ -1682,7 +1682,7 @@ var xFontGetFeatures func(uintptr, *[]uintptr, uint, uint) | |||||
| 1682 | // | 1682 | // | ||
| 1683 | // Note that this does not include OpenType features which the | 1683 | // Note that this does not include OpenType features which the | ||
| 1684 | // rendering system enables by default. | 1684 | // rendering system enables by default. | ||
| 1685 | - | func (x *Font) GetFeatures(FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar uint) { | 1685 | + | func (x *Font) GetFeatures(FeaturesVar *[]uintptr, LenVar uint, NumFeaturesVar *uint) { |
| 1686 | 1686 | ||||
| 1687 | xFontGetFeatures(x.GoPointer(), FeaturesVar, LenVar, NumFeaturesVar) | 1687 | xFontGetFeatures(x.GoPointer(), FeaturesVar, LenVar, NumFeaturesVar) | ||
| 1688 | 1688 | ||||
M v4/pango/pango-matrix.go +4 -4
| @@ -142,7 +142,7 @@ func (x *Matrix) Scale(ScaleXVar float64, ScaleYVar float64) { | |||
| 142 | 142 | ||
| 143 | 143 | } | |
| 144 | 144 | ||
| 145 | - | var xMatrixTransformDistance func(uintptr, float64, float64) | |
| 145 | + | var xMatrixTransformDistance func(uintptr, *float64, *float64) | |
| 146 | 146 | ||
| 147 | 147 | // Transforms the distance vector (@dx,@dy) by @matrix. | |
| 148 | 148 | // | |
| @@ -159,7 +159,7 @@ var xMatrixTransformDistance func(uintptr, float64, float64) | |||
| 159 | 159 | // always transforms to the same vector. If (@x1,@y1) transforms | |
| 160 | 160 | // to (@x2,@y2) then (@x1+@dx1,@y1+@dy1) will transform to | |
| 161 | 161 | // (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2. | |
| 162 | - | func (x *Matrix) TransformDistance(DxVar float64, DyVar float64) { | |
| 162 | + | func (x *Matrix) TransformDistance(DxVar *float64, DyVar *float64) { | |
| 163 | 163 | ||
| 164 | 164 | xMatrixTransformDistance(x.GoPointer(), DxVar, DyVar) | |
| 165 | 165 | ||
| @@ -183,10 +183,10 @@ func (x *Matrix) TransformPixelRectangle(RectVar *Rectangle) { | |||
| 183 | 183 | ||
| 184 | 184 | } | |
| 185 | 185 | ||
| 186 | - | var xMatrixTransformPoint func(uintptr, float64, float64) | |
| 186 | + | var xMatrixTransformPoint func(uintptr, *float64, *float64) | |
| 187 | 187 | ||
| 188 | 188 | // Transforms the point (@x, @y) by @matrix. | |
| 189 | - | func (x *Matrix) TransformPoint(XVar float64, YVar float64) { | |
| 189 | + | func (x *Matrix) TransformPoint(XVar *float64, YVar *float64) { | |
| 190 | 190 | ||
| 191 | 191 | xMatrixTransformPoint(x.GoPointer(), XVar, YVar) | |
| 192 | 192 | ||
| @@ -142,7 +142,7 @@ func (x *Matrix) Scale(ScaleXVar float64, ScaleYVar float64) { | |||||
| 142 | 142 | ||||
| 143 | } | 143 | } | ||
| 144 | 144 | ||||
| 145 | - | var xMatrixTransformDistance func(uintptr, float64, float64) | 145 | + | var xMatrixTransformDistance func(uintptr, *float64, *float64) |
| 146 | 146 | ||||
| 147 | // Transforms the distance vector (@dx,@dy) by @matrix. | 147 | // Transforms the distance vector (@dx,@dy) by @matrix. | ||
| 148 | // | 148 | // | ||
| @@ -159,7 +159,7 @@ var xMatrixTransformDistance func(uintptr, float64, float64) | |||||
| 159 | // always transforms to the same vector. If (@x1,@y1) transforms | 159 | // always transforms to the same vector. If (@x1,@y1) transforms | ||
| 160 | // to (@x2,@y2) then (@x1+@dx1,@y1+@dy1) will transform to | 160 | // to (@x2,@y2) then (@x1+@dx1,@y1+@dy1) will transform to | ||
| 161 | // (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2. | 161 | // (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2. | ||
| 162 | - | func (x *Matrix) TransformDistance(DxVar float64, DyVar float64) { | 162 | + | func (x *Matrix) TransformDistance(DxVar *float64, DyVar *float64) { |
| 163 | 163 | ||||
| 164 | xMatrixTransformDistance(x.GoPointer(), DxVar, DyVar) | 164 | xMatrixTransformDistance(x.GoPointer(), DxVar, DyVar) | ||
| 165 | 165 | ||||
| @@ -183,10 +183,10 @@ func (x *Matrix) TransformPixelRectangle(RectVar *Rectangle) { | |||||
| 183 | 183 | ||||
| 184 | } | 184 | } | ||
| 185 | 185 | ||||
| 186 | - | var xMatrixTransformPoint func(uintptr, float64, float64) | 186 | + | var xMatrixTransformPoint func(uintptr, *float64, *float64) |
| 187 | 187 | ||||
| 188 | // Transforms the point (@x, @y) by @matrix. | 188 | // Transforms the point (@x, @y) by @matrix. | ||
| 189 | - | func (x *Matrix) TransformPoint(XVar float64, YVar float64) { | 189 | + | func (x *Matrix) TransformPoint(XVar *float64, YVar *float64) { |
| 190 | 190 | ||||
| 191 | xMatrixTransformPoint(x.GoPointer(), XVar, YVar) | 191 | xMatrixTransformPoint(x.GoPointer(), XVar, YVar) | ||
| 192 | 192 | ||||
M v4/pango/pango-utils.go +10 -10
| @@ -135,7 +135,7 @@ func ParseWeight(StrVar string, WeightVar *Weight, WarnVar bool) bool { | |||
| 135 | 135 | return cret | |
| 136 | 136 | } | |
| 137 | 137 | ||
| 138 | - | var xQuantizeLineGeometry func(int, int) | |
| 138 | + | var xQuantizeLineGeometry func(*int, *int) | |
| 139 | 139 | ||
| 140 | 140 | // Quantizes the thickness and position of a line to whole device pixels. | |
| 141 | 141 | // | |
| @@ -145,7 +145,7 @@ var xQuantizeLineGeometry func(int, int) | |||
| 145 | 145 | // Care is taken to make sure @thickness is at least one pixel when this | |
| 146 | 146 | // function returns, but returned @position may become zero as a result | |
| 147 | 147 | // of rounding. | |
| 148 | - | func QuantizeLineGeometry(ThicknessVar int, PositionVar int) { | |
| 148 | + | func QuantizeLineGeometry(ThicknessVar *int, PositionVar *int) { | |
| 149 | 149 | ||
| 150 | 150 | xQuantizeLineGeometry(ThicknessVar, PositionVar) | |
| 151 | 151 | ||
| @@ -167,46 +167,46 @@ func ReadLine(StreamVar uintptr, StrVar *glib.String) int { | |||
| 167 | 167 | return cret | |
| 168 | 168 | } | |
| 169 | 169 | ||
| 170 | - | var xScanInt func(string, *int) bool | |
| 170 | + | var xScanInt func(*string, *int) bool | |
| 171 | 171 | ||
| 172 | 172 | // Scans an integer. | |
| 173 | 173 | // | |
| 174 | 174 | // Leading white space is skipped. | |
| 175 | - | func ScanInt(PosVar string, OutVar *int) bool { | |
| 175 | + | func ScanInt(PosVar *string, OutVar *int) bool { | |
| 176 | 176 | ||
| 177 | 177 | cret := xScanInt(PosVar, OutVar) | |
| 178 | 178 | return cret | |
| 179 | 179 | } | |
| 180 | 180 | ||
| 181 | - | var xScanString func(string, *glib.String) bool | |
| 181 | + | var xScanString func(*string, *glib.String) bool | |
| 182 | 182 | ||
| 183 | 183 | // Scans a string into a `GString` buffer. | |
| 184 | 184 | // | |
| 185 | 185 | // The string may either be a sequence of non-white-space characters, | |
| 186 | 186 | // or a quoted string with '"'. Instead a quoted string, '\"' represents | |
| 187 | 187 | // a literal quote. Leading white space outside of quotes is skipped. | |
| 188 | - | func ScanString(PosVar string, OutVar *glib.String) bool { | |
| 188 | + | func ScanString(PosVar *string, OutVar *glib.String) bool { | |
| 189 | 189 | ||
| 190 | 190 | cret := xScanString(PosVar, OutVar) | |
| 191 | 191 | return cret | |
| 192 | 192 | } | |
| 193 | 193 | ||
| 194 | - | var xScanWord func(string, *glib.String) bool | |
| 194 | + | var xScanWord func(*string, *glib.String) bool | |
| 195 | 195 | ||
| 196 | 196 | // Scans a word into a `GString` buffer. | |
| 197 | 197 | // | |
| 198 | 198 | // A word consists of [A-Za-z_] followed by zero or more | |
| 199 | 199 | // [A-Za-z_0-9]. Leading white space is skipped. | |
| 200 | - | func ScanWord(PosVar string, OutVar *glib.String) bool { | |
| 200 | + | func ScanWord(PosVar *string, OutVar *glib.String) bool { | |
| 201 | 201 | ||
| 202 | 202 | cret := xScanWord(PosVar, OutVar) | |
| 203 | 203 | return cret | |
| 204 | 204 | } | |
| 205 | 205 | ||
| 206 | - | var xSkipSpace func(string) bool | |
| 206 | + | var xSkipSpace func(*string) bool | |
| 207 | 207 | ||
| 208 | 208 | // Skips 0 or more characters of white space. | |
| 209 | - | func SkipSpace(PosVar string) bool { | |
| 209 | + | func SkipSpace(PosVar *string) bool { | |
| 210 | 210 | ||
| 211 | 211 | cret := xSkipSpace(PosVar) | |
| 212 | 212 | return cret | |
| @@ -135,7 +135,7 @@ func ParseWeight(StrVar string, WeightVar *Weight, WarnVar bool) bool { | |||||
| 135 | return cret | 135 | return cret | ||
| 136 | } | 136 | } | ||
| 137 | 137 | ||||
| 138 | - | var xQuantizeLineGeometry func(int, int) | 138 | + | var xQuantizeLineGeometry func(*int, *int) |
| 139 | 139 | ||||
| 140 | // Quantizes the thickness and position of a line to whole device pixels. | 140 | // Quantizes the thickness and position of a line to whole device pixels. | ||
| 141 | // | 141 | // | ||
| @@ -145,7 +145,7 @@ var xQuantizeLineGeometry func(int, int) | |||||
| 145 | // Care is taken to make sure @thickness is at least one pixel when this | 145 | // Care is taken to make sure @thickness is at least one pixel when this | ||
| 146 | // function returns, but returned @position may become zero as a result | 146 | // function returns, but returned @position may become zero as a result | ||
| 147 | // of rounding. | 147 | // of rounding. | ||
| 148 | - | func QuantizeLineGeometry(ThicknessVar int, PositionVar int) { | 148 | + | func QuantizeLineGeometry(ThicknessVar *int, PositionVar *int) { |
| 149 | 149 | ||||
| 150 | xQuantizeLineGeometry(ThicknessVar, PositionVar) | 150 | xQuantizeLineGeometry(ThicknessVar, PositionVar) | ||
| 151 | 151 | ||||
| @@ -167,46 +167,46 @@ func ReadLine(StreamVar uintptr, StrVar *glib.String) int { | |||||
| 167 | return cret | 167 | return cret | ||
| 168 | } | 168 | } | ||
| 169 | 169 | ||||
| 170 | - | var xScanInt func(string, *int) bool | 170 | + | var xScanInt func(*string, *int) bool |
| 171 | 171 | ||||
| 172 | // Scans an integer. | 172 | // Scans an integer. | ||
| 173 | // | 173 | // | ||
| 174 | // Leading white space is skipped. | 174 | // Leading white space is skipped. | ||
| 175 | - | func ScanInt(PosVar string, OutVar *int) bool { | 175 | + | func ScanInt(PosVar *string, OutVar *int) bool { |
| 176 | 176 | ||||
| 177 | cret := xScanInt(PosVar, OutVar) | 177 | cret := xScanInt(PosVar, OutVar) | ||
| 178 | return cret | 178 | return cret | ||
| 179 | } | 179 | } | ||
| 180 | 180 | ||||
| 181 | - | var xScanString func(string, *glib.String) bool | 181 | + | var xScanString func(*string, *glib.String) bool |
| 182 | 182 | ||||
| 183 | // Scans a string into a `GString` buffer. | 183 | // Scans a string into a `GString` buffer. | ||
| 184 | // | 184 | // | ||
| 185 | // The string may either be a sequence of non-white-space characters, | 185 | // The string may either be a sequence of non-white-space characters, | ||
| 186 | // or a quoted string with '"'. Instead a quoted string, '\"' represents | 186 | // or a quoted string with '"'. Instead a quoted string, '\"' represents | ||
| 187 | // a literal quote. Leading white space outside of quotes is skipped. | 187 | // a literal quote. Leading white space outside of quotes is skipped. | ||
| 188 | - | func ScanString(PosVar string, OutVar *glib.String) bool { | 188 | + | func ScanString(PosVar *string, OutVar *glib.String) bool { |
| 189 | 189 | ||||
| 190 | cret := xScanString(PosVar, OutVar) | 190 | cret := xScanString(PosVar, OutVar) | ||
| 191 | return cret | 191 | return cret | ||
| 192 | } | 192 | } | ||
| 193 | 193 | ||||
| 194 | - | var xScanWord func(string, *glib.String) bool | 194 | + | var xScanWord func(*string, *glib.String) bool |
| 195 | 195 | ||||
| 196 | // Scans a word into a `GString` buffer. | 196 | // Scans a word into a `GString` buffer. | ||
| 197 | // | 197 | // | ||
| 198 | // A word consists of [A-Za-z_] followed by zero or more | 198 | // A word consists of [A-Za-z_] followed by zero or more | ||
| 199 | // [A-Za-z_0-9]. Leading white space is skipped. | 199 | // [A-Za-z_0-9]. Leading white space is skipped. | ||
| 200 | - | func ScanWord(PosVar string, OutVar *glib.String) bool { | 200 | + | func ScanWord(PosVar *string, OutVar *glib.String) bool { |
| 201 | 201 | ||||
| 202 | cret := xScanWord(PosVar, OutVar) | 202 | cret := xScanWord(PosVar, OutVar) | ||
| 203 | return cret | 203 | return cret | ||
| 204 | } | 204 | } | ||
| 205 | 205 | ||||
| 206 | - | var xSkipSpace func(string) bool | 206 | + | var xSkipSpace func(*string) bool |
| 207 | 207 | ||||
| 208 | // Skips 0 or more characters of white space. | 208 | // Skips 0 or more characters of white space. | ||
| 209 | - | func SkipSpace(PosVar string) bool { | 209 | + | func SkipSpace(PosVar *string) bool { |
| 210 | 210 | ||||
| 211 | cret := xSkipSpace(PosVar) | 211 | cret := xSkipSpace(PosVar) | ||
| 212 | return cret | 212 | return cret | ||