From 2cd9fb6ccafe14d8e14991e98460986fb26c0d48 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 1 Sep 2024 17:51:28 +1200 Subject: [PATCH] qt: malloc takes a size_t instead of a ulong --- qt/gen_qabstractitemmodel.go | 12 ++++----- qt/gen_qabstractproxymodel.go | 2 +- qt/gen_qabstracttransition.go | 2 +- qt/gen_qaction.go | 2 +- qt/gen_qapplication.go | 4 +-- qt/gen_qcborarray.go | 4 +-- qt/gen_qcolumnview.go | 2 +- qt/gen_qcombobox.go | 8 +++--- qt/gen_qcommandlineoption.go | 20 +++++++------- qt/gen_qcommandlineparser.go | 10 +++---- qt/gen_qcompleter.go | 8 +++--- qt/gen_qconcatenatetablesproxymodel.go | 2 +- qt/gen_qcoreapplication.go | 8 +++--- qt/gen_qdir.go | 36 +++++++++++++------------- qt/gen_qdiriterator.go | 12 ++++----- qt/gen_qdirmodel.go | 14 +++++----- qt/gen_qevent.go | 8 +++--- qt/gen_qfiledialog.go | 28 ++++++++++---------- qt/gen_qfileselector.go | 4 +-- qt/gen_qfilesystemmodel.go | 6 ++--- qt/gen_qfilesystemwatcher.go | 16 ++++++------ qt/gen_qfont.go | 8 +++--- qt/gen_qgesture.go | 2 +- qt/gen_qglyphrun.go | 4 +-- qt/gen_qgraphicsitem.go | 2 +- qt/gen_qgraphicsscene.go | 4 +-- qt/gen_qgraphicsview.go | 2 +- qt/gen_qgraphicswidget.go | 4 +-- qt/gen_qguiapplication.go | 4 +-- qt/gen_qicon.go | 8 +++--- qt/gen_qimage.go | 6 ++--- qt/gen_qinputdialog.go | 28 ++++++++++---------- qt/gen_qjsonarray.go | 4 +-- qt/gen_qkeysequence.go | 4 +-- qt/gen_qlistview.go | 2 +- qt/gen_qlistwidget.go | 8 +++--- qt/gen_qlocale.go | 4 +-- qt/gen_qmainwindow.go | 4 +-- qt/gen_qmenu.go | 6 ++--- qt/gen_qmimedata.go | 2 +- qt/gen_qpainter.go | 12 ++++----- qt/gen_qpainterpath.go | 2 +- qt/gen_qpen.go | 2 +- qt/gen_qplaintextedit.go | 2 +- qt/gen_qprocess.go | 32 +++++++++++------------ qt/gen_qrawfont.go | 4 +-- qt/gen_qscroller.go | 4 +-- qt/gen_qsessionmanager.go | 12 ++++----- qt/gen_qsortfilterproxymodel.go | 2 +- qt/gen_qsplitter.go | 2 +- qt/gen_qstandarditemmodel.go | 30 ++++++++++----------- qt/gen_qstandardpaths.go | 4 +-- qt/gen_qstringlistmodel.go | 12 ++++----- qt/gen_qtablewidget.go | 8 +++--- qt/gen_qtextbrowser.go | 4 +-- qt/gen_qtextedit.go | 2 +- qt/gen_qtextformat.go | 14 +++++----- qt/gen_qtextlayout.go | 8 +++--- qt/gen_qtextoption.go | 4 +-- qt/gen_qtreeview.go | 2 +- qt/gen_qtreewidget.go | 36 +++++++++++++------------- qt/gen_qurl.go | 14 +++++----- qt/gen_qvariant.go | 4 +-- qt/gen_qversionnumber.go | 2 +- qt/gen_qwidget.go | 4 +-- qt/gen_qwizard.go | 2 +- qt/gen_qxmlstream.go | 2 +- 67 files changed, 270 insertions(+), 270 deletions(-) diff --git a/qt/gen_qabstractitemmodel.go b/qt/gen_qabstractitemmodel.go index b6db49d6..339608f6 100644 --- a/qt/gen_qabstractitemmodel.go +++ b/qt/gen_qabstractitemmodel.go @@ -492,7 +492,7 @@ func (this *QAbstractItemModel) MimeTypes() []string { func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() @@ -864,7 +864,7 @@ func (this *QAbstractItemModel) CheckIndex2(index *QModelIndex, options int) boo func (this *QAbstractItemModel) DataChanged3(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { // For the C ABI, malloc a C array of raw pointers - roles_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(roles)))) + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) defer C.free(unsafe.Pointer(roles_CArray)) for i := range roles { roles_CArray[i] = (C.int)(roles[i]) @@ -882,7 +882,7 @@ func (this *QAbstractItemModel) OnDataChanged3(slot func()) { func (this *QAbstractItemModel) LayoutChanged1(parents []QPersistentModelIndex) { // For the C ABI, malloc a C array of raw pointers - parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.ulong(8 * len(parents)))) + parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.size_t(8 * len(parents)))) defer C.free(unsafe.Pointer(parents_CArray)) for i := range parents { parents_CArray[i] = parents[i].cPointer() @@ -892,7 +892,7 @@ func (this *QAbstractItemModel) LayoutChanged1(parents []QPersistentModelIndex) func (this *QAbstractItemModel) LayoutChanged2(parents []QPersistentModelIndex, hint uintptr) { // For the C ABI, malloc a C array of raw pointers - parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.ulong(8 * len(parents)))) + parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.size_t(8 * len(parents)))) defer C.free(unsafe.Pointer(parents_CArray)) for i := range parents { parents_CArray[i] = parents[i].cPointer() @@ -910,7 +910,7 @@ func (this *QAbstractItemModel) OnLayoutChanged2(slot func()) { func (this *QAbstractItemModel) LayoutAboutToBeChanged1(parents []QPersistentModelIndex) { // For the C ABI, malloc a C array of raw pointers - parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.ulong(8 * len(parents)))) + parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.size_t(8 * len(parents)))) defer C.free(unsafe.Pointer(parents_CArray)) for i := range parents { parents_CArray[i] = parents[i].cPointer() @@ -920,7 +920,7 @@ func (this *QAbstractItemModel) LayoutAboutToBeChanged1(parents []QPersistentMod func (this *QAbstractItemModel) LayoutAboutToBeChanged2(parents []QPersistentModelIndex, hint uintptr) { // For the C ABI, malloc a C array of raw pointers - parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.ulong(8 * len(parents)))) + parents_CArray := (*[0xffff]*C.QPersistentModelIndex)(C.malloc(C.size_t(8 * len(parents)))) defer C.free(unsafe.Pointer(parents_CArray)) for i := range parents { parents_CArray[i] = parents[i].cPointer() diff --git a/qt/gen_qabstractproxymodel.go b/qt/gen_qabstractproxymodel.go index 75c7dc50..2103f69c 100644 --- a/qt/gen_qabstractproxymodel.go +++ b/qt/gen_qabstractproxymodel.go @@ -193,7 +193,7 @@ func (this *QAbstractProxyModel) Sibling(row int, column int, idx *QModelIndex) func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() diff --git a/qt/gen_qabstracttransition.go b/qt/gen_qabstracttransition.go index 8095f8e0..684ee3ef 100644 --- a/qt/gen_qabstracttransition.go +++ b/qt/gen_qabstracttransition.go @@ -91,7 +91,7 @@ func (this *QAbstractTransition) TargetStates() []*QAbstractState { func (this *QAbstractTransition) SetTargetStates(targets []*QAbstractState) { // For the C ABI, malloc a C array of raw pointers - targets_CArray := (*[0xffff]*C.QAbstractState)(C.malloc(C.ulong(8 * len(targets)))) + targets_CArray := (*[0xffff]*C.QAbstractState)(C.malloc(C.size_t(8 * len(targets)))) defer C.free(unsafe.Pointer(targets_CArray)) for i := range targets { targets_CArray[i] = targets[i].cPointer() diff --git a/qt/gen_qaction.go b/qt/gen_qaction.go index 2fcbf63a..5e067333 100644 --- a/qt/gen_qaction.go +++ b/qt/gen_qaction.go @@ -251,7 +251,7 @@ func (this *QAction) Shortcut() *QKeySequence { func (this *QAction) SetShortcuts(shortcuts []QKeySequence) { // For the C ABI, malloc a C array of raw pointers - shortcuts_CArray := (*[0xffff]*C.QKeySequence)(C.malloc(C.ulong(8 * len(shortcuts)))) + shortcuts_CArray := (*[0xffff]*C.QKeySequence)(C.malloc(C.size_t(8 * len(shortcuts)))) defer C.free(unsafe.Pointer(shortcuts_CArray)) for i := range shortcuts { shortcuts_CArray[i] = shortcuts[i].cPointer() diff --git a/qt/gen_qapplication.go b/qt/gen_qapplication.go index d581170a..02af4bb8 100644 --- a/qt/gen_qapplication.go +++ b/qt/gen_qapplication.go @@ -42,7 +42,7 @@ func NewQApplication(args []string) *QApplication { // Convert []string to long-lived int& argc, char** argv, never call free() argc := (*C.int)(C.malloc(8)) *argc = C.int(len(args)) - argv := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(args)))) + argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args)))) for i := range args { argv[i] = C.CString(args[i]) } @@ -55,7 +55,7 @@ func NewQApplication2(args []string, param3 int) *QApplication { // Convert []string to long-lived int& argc, char** argv, never call free() argc := (*C.int)(C.malloc(8)) *argc = C.int(len(args)) - argv := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(args)))) + argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args)))) for i := range args { argv[i] = C.CString(args[i]) } diff --git a/qt/gen_qcborarray.go b/qt/gen_qcborarray.go index 57ab0bec..518cbd4e 100644 --- a/qt/gen_qcborarray.go +++ b/qt/gen_qcborarray.go @@ -437,8 +437,8 @@ func (this *QCborArray) OperatorShiftLeft(v *QCborValue) *QCborArray { func QCborArray_FromStringList(list []string) *QCborArray { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - list_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(list)))) - list_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(list)))) + list_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) defer C.free(unsafe.Pointer(list_Lengths)) for i := range list { diff --git a/qt/gen_qcolumnview.go b/qt/gen_qcolumnview.go index 3635cb7b..ede5b75d 100644 --- a/qt/gen_qcolumnview.go +++ b/qt/gen_qcolumnview.go @@ -161,7 +161,7 @@ func (this *QColumnView) SetPreviewWidget(widget *QWidget) { func (this *QColumnView) SetColumnWidths(list []int) { // For the C ABI, malloc a C array of raw pointers - list_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) for i := range list { list_CArray[i] = (C.int)(list[i]) diff --git a/qt/gen_qcombobox.go b/qt/gen_qcombobox.go index e65054c0..a165bf26 100644 --- a/qt/gen_qcombobox.go +++ b/qt/gen_qcombobox.go @@ -352,8 +352,8 @@ func (this *QComboBox) AddItem2(icon *QIcon, text string) { func (this *QComboBox) AddItems(texts []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - texts_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(texts)))) - texts_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(texts)))) + texts_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(texts)))) + texts_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(texts)))) defer C.free(unsafe.Pointer(texts_CArray)) defer C.free(unsafe.Pointer(texts_Lengths)) for i := range texts { @@ -379,8 +379,8 @@ func (this *QComboBox) InsertItem2(index int, icon *QIcon, text string) { func (this *QComboBox) InsertItems(index int, texts []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - texts_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(texts)))) - texts_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(texts)))) + texts_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(texts)))) + texts_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(texts)))) defer C.free(unsafe.Pointer(texts_CArray)) defer C.free(unsafe.Pointer(texts_Lengths)) for i := range texts { diff --git a/qt/gen_qcommandlineoption.go b/qt/gen_qcommandlineoption.go index 1330c3a9..31651dca 100644 --- a/qt/gen_qcommandlineoption.go +++ b/qt/gen_qcommandlineoption.go @@ -45,8 +45,8 @@ func NewQCommandLineOption(name string) *QCommandLineOption { // NewQCommandLineOption2 constructs a new QCommandLineOption object. func NewQCommandLineOption2(names []string) *QCommandLineOption { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - names_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(names)))) - names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(names)))) + names_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(names)))) + names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(names)))) defer C.free(unsafe.Pointer(names_CArray)) defer C.free(unsafe.Pointer(names_Lengths)) for i := range names { @@ -72,8 +72,8 @@ func NewQCommandLineOption3(name string, description string) *QCommandLineOption // NewQCommandLineOption4 constructs a new QCommandLineOption object. func NewQCommandLineOption4(names []string, description string) *QCommandLineOption { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - names_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(names)))) - names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(names)))) + names_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(names)))) + names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(names)))) defer C.free(unsafe.Pointer(names_CArray)) defer C.free(unsafe.Pointer(names_Lengths)) for i := range names { @@ -123,8 +123,8 @@ func NewQCommandLineOption7(name string, description string, valueName string, d // NewQCommandLineOption8 constructs a new QCommandLineOption object. func NewQCommandLineOption8(names []string, description string, valueName string) *QCommandLineOption { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - names_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(names)))) - names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(names)))) + names_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(names)))) + names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(names)))) defer C.free(unsafe.Pointer(names_CArray)) defer C.free(unsafe.Pointer(names_Lengths)) for i := range names { @@ -144,8 +144,8 @@ func NewQCommandLineOption8(names []string, description string, valueName string // NewQCommandLineOption9 constructs a new QCommandLineOption object. func NewQCommandLineOption9(names []string, description string, valueName string, defaultValue string) *QCommandLineOption { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - names_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(names)))) - names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(names)))) + names_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(names)))) + names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(names)))) defer C.free(unsafe.Pointer(names_CArray)) defer C.free(unsafe.Pointer(names_Lengths)) for i := range names { @@ -225,8 +225,8 @@ func (this *QCommandLineOption) SetDefaultValue(defaultValue string) { func (this *QCommandLineOption) SetDefaultValues(defaultValues []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - defaultValues_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(defaultValues)))) - defaultValues_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(defaultValues)))) + defaultValues_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(defaultValues)))) + defaultValues_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(defaultValues)))) defer C.free(unsafe.Pointer(defaultValues_CArray)) defer C.free(unsafe.Pointer(defaultValues_Lengths)) for i := range defaultValues { diff --git a/qt/gen_qcommandlineparser.go b/qt/gen_qcommandlineparser.go index e85cb875..a7af6c69 100644 --- a/qt/gen_qcommandlineparser.go +++ b/qt/gen_qcommandlineparser.go @@ -78,7 +78,7 @@ func (this *QCommandLineParser) AddOption(commandLineOption *QCommandLineOption) func (this *QCommandLineParser) AddOptions(options []QCommandLineOption) bool { // For the C ABI, malloc a C array of raw pointers - options_CArray := (*[0xffff]*C.QCommandLineOption)(C.malloc(C.ulong(8 * len(options)))) + options_CArray := (*[0xffff]*C.QCommandLineOption)(C.malloc(C.size_t(8 * len(options)))) defer C.free(unsafe.Pointer(options_CArray)) for i := range options { options_CArray[i] = options[i].cPointer() @@ -138,8 +138,8 @@ func (this *QCommandLineParser) ClearPositionalArguments() { func (this *QCommandLineParser) Process(arguments []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -157,8 +157,8 @@ func (this *QCommandLineParser) ProcessWithApp(app *QCoreApplication) { func (this *QCommandLineParser) Parse(arguments []string) bool { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { diff --git a/qt/gen_qcompleter.go b/qt/gen_qcompleter.go index 0b28df15..c98f5ca1 100644 --- a/qt/gen_qcompleter.go +++ b/qt/gen_qcompleter.go @@ -52,8 +52,8 @@ func NewQCompleter2(model *QAbstractItemModel) *QCompleter { // NewQCompleter3 constructs a new QCompleter object. func NewQCompleter3(completions []string) *QCompleter { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - completions_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(completions)))) - completions_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(completions)))) + completions_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(completions)))) + completions_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(completions)))) defer C.free(unsafe.Pointer(completions_CArray)) defer C.free(unsafe.Pointer(completions_Lengths)) for i := range completions { @@ -81,8 +81,8 @@ func NewQCompleter5(model *QAbstractItemModel, parent *QObject) *QCompleter { // NewQCompleter6 constructs a new QCompleter object. func NewQCompleter6(completions []string, parent *QObject) *QCompleter { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - completions_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(completions)))) - completions_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(completions)))) + completions_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(completions)))) + completions_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(completions)))) defer C.free(unsafe.Pointer(completions_CArray)) defer C.free(unsafe.Pointer(completions_Lengths)) for i := range completions { diff --git a/qt/gen_qconcatenatetablesproxymodel.go b/qt/gen_qconcatenatetablesproxymodel.go index 695f52d1..73c525c0 100644 --- a/qt/gen_qconcatenatetablesproxymodel.go +++ b/qt/gen_qconcatenatetablesproxymodel.go @@ -199,7 +199,7 @@ func (this *QConcatenateTablesProxyModel) MimeTypes() []string { func (this *QConcatenateTablesProxyModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() diff --git a/qt/gen_qcoreapplication.go b/qt/gen_qcoreapplication.go index d31e0052..ba59d1a6 100644 --- a/qt/gen_qcoreapplication.go +++ b/qt/gen_qcoreapplication.go @@ -41,7 +41,7 @@ func NewQCoreApplication(args []string) *QCoreApplication { // Convert []string to long-lived int& argc, char** argv, never call free() argc := (*C.int)(C.malloc(8)) *argc = C.int(len(args)) - argv := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(args)))) + argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args)))) for i := range args { argv[i] = C.CString(args[i]) } @@ -54,7 +54,7 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication { // Convert []string to long-lived int& argc, char** argv, never call free() argc := (*C.int)(C.malloc(8)) *argc = C.int(len(args)) - argv := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(args)))) + argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args)))) for i := range args { argv[i] = C.CString(args[i]) } @@ -275,8 +275,8 @@ func QCoreApplication_ApplicationPid() int64 { func QCoreApplication_SetLibraryPaths(libraryPaths []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - libraryPaths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(libraryPaths)))) - libraryPaths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(libraryPaths)))) + libraryPaths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(libraryPaths)))) + libraryPaths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(libraryPaths)))) defer C.free(unsafe.Pointer(libraryPaths_CArray)) defer C.free(unsafe.Pointer(libraryPaths_Lengths)) for i := range libraryPaths { diff --git a/qt/gen_qdir.go b/qt/gen_qdir.go index 2bd9cc0e..efcb185d 100644 --- a/qt/gen_qdir.go +++ b/qt/gen_qdir.go @@ -142,8 +142,8 @@ func QDir_SetSearchPaths(prefix string, searchPaths []string) { prefix_Cstring := C.CString(prefix) defer C.free(unsafe.Pointer(prefix_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - searchPaths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(searchPaths)))) - searchPaths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(searchPaths)))) + searchPaths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(searchPaths)))) + searchPaths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(searchPaths)))) defer C.free(unsafe.Pointer(searchPaths_CArray)) defer C.free(unsafe.Pointer(searchPaths_Lengths)) for i := range searchPaths { @@ -273,8 +273,8 @@ func (this *QDir) NameFilters() []string { func (this *QDir) SetNameFilters(nameFilters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -357,8 +357,8 @@ func (this *QDir) EntryList() []string { func (this *QDir) EntryListWithNameFilters(nameFilters []string) []string { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -396,8 +396,8 @@ func (this *QDir) EntryInfoList() []QFileInfo { func (this *QDir) EntryInfoListWithNameFilters(nameFilters []string) []QFileInfo { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -652,8 +652,8 @@ func QDir_TempPath() string { func QDir_Match(filters []string, fileName string) bool { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - filters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(filters)))) - filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(filters)))) + filters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(filters)))) + filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) defer C.free(unsafe.Pointer(filters_Lengths)) for i := range filters { @@ -729,8 +729,8 @@ func (this *QDir) EntryList2(filters int, sort int) []string { func (this *QDir) EntryList22(nameFilters []string, filters int) []string { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -755,8 +755,8 @@ func (this *QDir) EntryList22(nameFilters []string, filters int) []string { func (this *QDir) EntryList3(nameFilters []string, filters int, sort int) []string { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -807,8 +807,8 @@ func (this *QDir) EntryInfoList2(filters int, sort int) []QFileInfo { func (this *QDir) EntryInfoList22(nameFilters []string, filters int) []QFileInfo { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -831,8 +831,8 @@ func (this *QDir) EntryInfoList22(nameFilters []string, filters int) []QFileInfo func (this *QDir) EntryInfoList3(nameFilters []string, filters int, sort int) []QFileInfo { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { diff --git a/qt/gen_qdiriterator.go b/qt/gen_qdiriterator.go index 3e53d154..f5bf0cad 100644 --- a/qt/gen_qdiriterator.go +++ b/qt/gen_qdiriterator.go @@ -62,8 +62,8 @@ func NewQDirIterator4(path string, nameFilters []string) *QDirIterator { path_Cstring := C.CString(path) defer C.free(unsafe.Pointer(path_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -103,8 +103,8 @@ func NewQDirIterator8(path string, nameFilters []string, filters int) *QDirItera path_Cstring := C.CString(path) defer C.free(unsafe.Pointer(path_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -122,8 +122,8 @@ func NewQDirIterator9(path string, nameFilters []string, filters int, flags int) path_Cstring := C.CString(path) defer C.free(unsafe.Pointer(path_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { diff --git a/qt/gen_qdirmodel.go b/qt/gen_qdirmodel.go index 45be448b..111b706f 100644 --- a/qt/gen_qdirmodel.go +++ b/qt/gen_qdirmodel.go @@ -39,8 +39,8 @@ func newQDirModel_U(h unsafe.Pointer) *QDirModel { // NewQDirModel constructs a new QDirModel object. func NewQDirModel(nameFilters []string, filters int, sort int) *QDirModel { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -62,8 +62,8 @@ func NewQDirModel2() *QDirModel { // NewQDirModel3 constructs a new QDirModel object. func NewQDirModel3(nameFilters []string, filters int, sort int, parent *QObject) *QDirModel { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(nameFilters)))) - nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(nameFilters)))) + nameFilters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(nameFilters)))) + nameFilters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(nameFilters)))) defer C.free(unsafe.Pointer(nameFilters_CArray)) defer C.free(unsafe.Pointer(nameFilters_Lengths)) for i := range nameFilters { @@ -199,7 +199,7 @@ func (this *QDirModel) MimeTypes() []string { func (this *QDirModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() @@ -229,8 +229,8 @@ func (this *QDirModel) IconProvider() *QFileIconProvider { func (this *QDirModel) SetNameFilters(filters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - filters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(filters)))) - filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(filters)))) + filters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(filters)))) + filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) defer C.free(unsafe.Pointer(filters_Lengths)) for i := range filters { diff --git a/qt/gen_qevent.go b/qt/gen_qevent.go index 8e2ba41e..d3fa26b2 100644 --- a/qt/gen_qevent.go +++ b/qt/gen_qevent.go @@ -1605,7 +1605,7 @@ func NewQInputMethodEvent2(preeditText string, attributes []QInputMethodEvent__A preeditText_Cstring := C.CString(preeditText) defer C.free(unsafe.Pointer(preeditText_Cstring)) // For the C ABI, malloc a C array of raw pointers - attributes_CArray := (*[0xffff]*C.QInputMethodEvent__Attribute)(C.malloc(C.ulong(8 * len(attributes)))) + attributes_CArray := (*[0xffff]*C.QInputMethodEvent__Attribute)(C.malloc(C.size_t(8 * len(attributes)))) defer C.free(unsafe.Pointer(attributes_CArray)) for i := range attributes { attributes_CArray[i] = attributes[i].cPointer() @@ -2565,7 +2565,7 @@ func NewQTouchEvent5(eventType uintptr, device *QTouchDevice, modifiers int, tou // NewQTouchEvent6 constructs a new QTouchEvent object. func NewQTouchEvent6(eventType uintptr, device *QTouchDevice, modifiers int, touchPointStates int, touchPoints []QTouchEvent__TouchPoint) *QTouchEvent { // For the C ABI, malloc a C array of raw pointers - touchPoints_CArray := (*[0xffff]*C.QTouchEvent__TouchPoint)(C.malloc(C.ulong(8 * len(touchPoints)))) + touchPoints_CArray := (*[0xffff]*C.QTouchEvent__TouchPoint)(C.malloc(C.size_t(8 * len(touchPoints)))) defer C.free(unsafe.Pointer(touchPoints_CArray)) for i := range touchPoints { touchPoints_CArray[i] = touchPoints[i].cPointer() @@ -2608,7 +2608,7 @@ func (this *QTouchEvent) SetTouchPointStates(aTouchPointStates int) { func (this *QTouchEvent) SetTouchPoints(atouchPoints []QTouchEvent__TouchPoint) { // For the C ABI, malloc a C array of raw pointers - atouchPoints_CArray := (*[0xffff]*C.QTouchEvent__TouchPoint)(C.malloc(C.ulong(8 * len(atouchPoints)))) + atouchPoints_CArray := (*[0xffff]*C.QTouchEvent__TouchPoint)(C.malloc(C.size_t(8 * len(atouchPoints)))) defer C.free(unsafe.Pointer(atouchPoints_CArray)) for i := range atouchPoints { atouchPoints_CArray[i] = atouchPoints[i].cPointer() @@ -3296,7 +3296,7 @@ func (this *QTouchEvent__TouchPoint) SetFlags(flags int) { func (this *QTouchEvent__TouchPoint) SetRawScreenPositions(positions []QPointF) { // For the C ABI, malloc a C array of raw pointers - positions_CArray := (*[0xffff]*C.QPointF)(C.malloc(C.ulong(8 * len(positions)))) + positions_CArray := (*[0xffff]*C.QPointF)(C.malloc(C.size_t(8 * len(positions)))) defer C.free(unsafe.Pointer(positions_CArray)) for i := range positions { positions_CArray[i] = positions[i].cPointer() diff --git a/qt/gen_qfiledialog.go b/qt/gen_qfiledialog.go index d8f7822b..06563834 100644 --- a/qt/gen_qfiledialog.go +++ b/qt/gen_qfiledialog.go @@ -203,8 +203,8 @@ func (this *QFileDialog) SetNameFilter(filter string) { func (this *QFileDialog) SetNameFilters(filters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - filters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(filters)))) - filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(filters)))) + filters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(filters)))) + filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) defer C.free(unsafe.Pointer(filters_Lengths)) for i := range filters { @@ -257,8 +257,8 @@ func (this *QFileDialog) SelectedNameFilter() string { func (this *QFileDialog) SetMimeTypeFilters(filters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - filters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(filters)))) - filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(filters)))) + filters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(filters)))) + filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) defer C.free(unsafe.Pointer(filters_Lengths)) for i := range filters { @@ -347,7 +347,7 @@ func (this *QFileDialog) ResolveSymlinks() bool { func (this *QFileDialog) SetSidebarUrls(urls []QUrl) { // For the C ABI, malloc a C array of raw pointers - urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.ulong(8 * len(urls)))) + urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) defer C.free(unsafe.Pointer(urls_CArray)) for i := range urls { urls_CArray[i] = urls[i].cPointer() @@ -410,8 +410,8 @@ func (this *QFileDialog) DefaultSuffix() string { func (this *QFileDialog) SetHistory(paths []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - paths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(paths)))) - paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(paths)))) + paths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(paths)))) + paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) defer C.free(unsafe.Pointer(paths_Lengths)) for i := range paths { @@ -473,8 +473,8 @@ func (this *QFileDialog) LabelText(label uintptr) string { func (this *QFileDialog) SetSupportedSchemes(schemes []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - schemes_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(schemes)))) - schemes_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(schemes)))) + schemes_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(schemes)))) + schemes_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(schemes)))) defer C.free(unsafe.Pointer(schemes_CArray)) defer C.free(unsafe.Pointer(schemes_Lengths)) for i := range schemes { @@ -548,8 +548,8 @@ func (this *QFileDialog) OnFileSelected(slot func()) { func (this *QFileDialog) FilesSelected(files []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - files_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(files)))) - files_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(files)))) + files_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(files)))) + files_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(files)))) defer C.free(unsafe.Pointer(files_CArray)) defer C.free(unsafe.Pointer(files_Lengths)) for i := range files { @@ -611,7 +611,7 @@ func (this *QFileDialog) OnUrlSelected(slot func()) { func (this *QFileDialog) UrlsSelected(urls []QUrl) { // For the C ABI, malloc a C array of raw pointers - urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.ulong(8 * len(urls)))) + urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) defer C.free(unsafe.Pointer(urls_CArray)) for i := range urls { urls_CArray[i] = urls[i].cPointer() @@ -1113,8 +1113,8 @@ func QFileDialog_GetExistingDirectoryUrl5(parent *QWidget, caption string, dir * caption_Cstring := C.CString(caption) defer C.free(unsafe.Pointer(caption_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - supportedSchemes_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(supportedSchemes)))) - supportedSchemes_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(supportedSchemes)))) + supportedSchemes_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(supportedSchemes)))) + supportedSchemes_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(supportedSchemes)))) defer C.free(unsafe.Pointer(supportedSchemes_CArray)) defer C.free(unsafe.Pointer(supportedSchemes_Lengths)) for i := range supportedSchemes { diff --git a/qt/gen_qfileselector.go b/qt/gen_qfileselector.go index 7a514fc9..fae29d23 100644 --- a/qt/gen_qfileselector.go +++ b/qt/gen_qfileselector.go @@ -114,8 +114,8 @@ func (this *QFileSelector) ExtraSelectors() []string { func (this *QFileSelector) SetExtraSelectors(list []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - list_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(list)))) - list_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(list)))) + list_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) defer C.free(unsafe.Pointer(list_Lengths)) for i := range list { diff --git a/qt/gen_qfilesystemmodel.go b/qt/gen_qfilesystemmodel.go index e9a7707e..51cc4b43 100644 --- a/qt/gen_qfilesystemmodel.go +++ b/qt/gen_qfilesystemmodel.go @@ -256,7 +256,7 @@ func (this *QFileSystemModel) MimeTypes() []string { func (this *QFileSystemModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() @@ -355,8 +355,8 @@ func (this *QFileSystemModel) NameFilterDisables() bool { func (this *QFileSystemModel) SetNameFilters(filters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - filters_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(filters)))) - filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(filters)))) + filters_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(filters)))) + filters_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) defer C.free(unsafe.Pointer(filters_Lengths)) for i := range filters { diff --git a/qt/gen_qfilesystemwatcher.go b/qt/gen_qfilesystemwatcher.go index 469cf41f..e07293a0 100644 --- a/qt/gen_qfilesystemwatcher.go +++ b/qt/gen_qfilesystemwatcher.go @@ -44,8 +44,8 @@ func NewQFileSystemWatcher() *QFileSystemWatcher { // NewQFileSystemWatcher2 constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher2(paths []string) *QFileSystemWatcher { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - paths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(paths)))) - paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(paths)))) + paths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(paths)))) + paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) defer C.free(unsafe.Pointer(paths_Lengths)) for i := range paths { @@ -67,8 +67,8 @@ func NewQFileSystemWatcher3(parent *QObject) *QFileSystemWatcher { // NewQFileSystemWatcher4 constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher4(paths []string, parent *QObject) *QFileSystemWatcher { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - paths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(paths)))) - paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(paths)))) + paths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(paths)))) + paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) defer C.free(unsafe.Pointer(paths_Lengths)) for i := range paths { @@ -117,8 +117,8 @@ func (this *QFileSystemWatcher) AddPath(file string) bool { func (this *QFileSystemWatcher) AddPaths(files []string) []string { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - files_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(files)))) - files_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(files)))) + files_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(files)))) + files_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(files)))) defer C.free(unsafe.Pointer(files_CArray)) defer C.free(unsafe.Pointer(files_Lengths)) for i := range files { @@ -150,8 +150,8 @@ func (this *QFileSystemWatcher) RemovePath(file string) bool { func (this *QFileSystemWatcher) RemovePaths(files []string) []string { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - files_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(files)))) - files_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(files)))) + files_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(files)))) + files_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(files)))) defer C.free(unsafe.Pointer(files_CArray)) defer C.free(unsafe.Pointer(files_Lengths)) for i := range files { diff --git a/qt/gen_qfont.go b/qt/gen_qfont.go index a69a82ba..d39ef9af 100644 --- a/qt/gen_qfont.go +++ b/qt/gen_qfont.go @@ -127,8 +127,8 @@ func (this *QFont) Families() []string { func (this *QFont) SetFamilies(families []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - families_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(families)))) - families_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(families)))) + families_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(families)))) + families_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(families)))) defer C.free(unsafe.Pointer(families_CArray)) defer C.free(unsafe.Pointer(families_Lengths)) for i := range families { @@ -464,8 +464,8 @@ func QFont_InsertSubstitutions(param1 string, param2 []string) { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - param2_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(param2)))) - param2_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(param2)))) + param2_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(param2)))) + param2_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(param2)))) defer C.free(unsafe.Pointer(param2_CArray)) defer C.free(unsafe.Pointer(param2_Lengths)) for i := range param2 { diff --git a/qt/gen_qgesture.go b/qt/gen_qgesture.go index 83792f10..26158867 100644 --- a/qt/gen_qgesture.go +++ b/qt/gen_qgesture.go @@ -1015,7 +1015,7 @@ func newQGestureEvent_U(h unsafe.Pointer) *QGestureEvent { // NewQGestureEvent constructs a new QGestureEvent object. func NewQGestureEvent(gestures []*QGesture) *QGestureEvent { // For the C ABI, malloc a C array of raw pointers - gestures_CArray := (*[0xffff]*C.QGesture)(C.malloc(C.ulong(8 * len(gestures)))) + gestures_CArray := (*[0xffff]*C.QGesture)(C.malloc(C.size_t(8 * len(gestures)))) defer C.free(unsafe.Pointer(gestures_CArray)) for i := range gestures { gestures_CArray[i] = gestures[i].cPointer() diff --git a/qt/gen_qglyphrun.go b/qt/gen_qglyphrun.go index 7ce08264..2795b746 100644 --- a/qt/gen_qglyphrun.go +++ b/qt/gen_qglyphrun.go @@ -89,7 +89,7 @@ func (this *QGlyphRun) GlyphIndexes() []uint { func (this *QGlyphRun) SetGlyphIndexes(glyphIndexes []uint) { // For the C ABI, malloc a C array of raw pointers - glyphIndexes_CArray := (*[0xffff]C.uint)(C.malloc(C.ulong(8 * len(glyphIndexes)))) + glyphIndexes_CArray := (*[0xffff]C.uint)(C.malloc(C.size_t(8 * len(glyphIndexes)))) defer C.free(unsafe.Pointer(glyphIndexes_CArray)) for i := range glyphIndexes { glyphIndexes_CArray[i] = (C.uint)(glyphIndexes[i]) @@ -112,7 +112,7 @@ func (this *QGlyphRun) Positions() []QPointF { func (this *QGlyphRun) SetPositions(positions []QPointF) { // For the C ABI, malloc a C array of raw pointers - positions_CArray := (*[0xffff]*C.QPointF)(C.malloc(C.ulong(8 * len(positions)))) + positions_CArray := (*[0xffff]*C.QPointF)(C.malloc(C.size_t(8 * len(positions)))) defer C.free(unsafe.Pointer(positions_CArray)) for i := range positions { positions_CArray[i] = positions[i].cPointer() diff --git a/qt/gen_qgraphicsitem.go b/qt/gen_qgraphicsitem.go index a5448aac..7d7b65f1 100644 --- a/qt/gen_qgraphicsitem.go +++ b/qt/gen_qgraphicsitem.go @@ -551,7 +551,7 @@ func (this *QGraphicsItem) Transformations() []*QGraphicsTransform { func (this *QGraphicsItem) SetTransformations(transformations []*QGraphicsTransform) { // For the C ABI, malloc a C array of raw pointers - transformations_CArray := (*[0xffff]*C.QGraphicsTransform)(C.malloc(C.ulong(8 * len(transformations)))) + transformations_CArray := (*[0xffff]*C.QGraphicsTransform)(C.malloc(C.size_t(8 * len(transformations)))) defer C.free(unsafe.Pointer(transformations_CArray)) for i := range transformations { transformations_CArray[i] = transformations[i].cPointer() diff --git a/qt/gen_qgraphicsscene.go b/qt/gen_qgraphicsscene.go index 955e4a9c..7c7eada5 100644 --- a/qt/gen_qgraphicsscene.go +++ b/qt/gen_qgraphicsscene.go @@ -297,7 +297,7 @@ func (this *QGraphicsScene) SetSelectionArea2(path *QPainterPath, selectionOpera func (this *QGraphicsScene) CreateItemGroup(items []*QGraphicsItem) *QGraphicsItemGroup { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QGraphicsItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QGraphicsItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -582,7 +582,7 @@ func (this *QGraphicsScene) Clear() { func (this *QGraphicsScene) Changed(region []QRectF) { // For the C ABI, malloc a C array of raw pointers - region_CArray := (*[0xffff]*C.QRectF)(C.malloc(C.ulong(8 * len(region)))) + region_CArray := (*[0xffff]*C.QRectF)(C.malloc(C.size_t(8 * len(region)))) defer C.free(unsafe.Pointer(region_CArray)) for i := range region { region_CArray[i] = region[i].cPointer() diff --git a/qt/gen_qgraphicsview.go b/qt/gen_qgraphicsview.go index 0fd4338f..3e482ab5 100644 --- a/qt/gen_qgraphicsview.go +++ b/qt/gen_qgraphicsview.go @@ -547,7 +547,7 @@ func (this *QGraphicsView) SetForegroundBrush(brush *QBrush) { func (this *QGraphicsView) UpdateScene(rects []QRectF) { // For the C ABI, malloc a C array of raw pointers - rects_CArray := (*[0xffff]*C.QRectF)(C.malloc(C.ulong(8 * len(rects)))) + rects_CArray := (*[0xffff]*C.QRectF)(C.malloc(C.size_t(8 * len(rects)))) defer C.free(unsafe.Pointer(rects_CArray)) for i := range rects { rects_CArray[i] = rects[i].cPointer() diff --git a/qt/gen_qgraphicswidget.go b/qt/gen_qgraphicswidget.go index 13b02385..22f5c64e 100644 --- a/qt/gen_qgraphicswidget.go +++ b/qt/gen_qgraphicswidget.go @@ -320,7 +320,7 @@ func (this *QGraphicsWidget) AddAction(action *QAction) { func (this *QGraphicsWidget) AddActions(actions []*QAction) { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() @@ -330,7 +330,7 @@ func (this *QGraphicsWidget) AddActions(actions []*QAction) { func (this *QGraphicsWidget) InsertActions(before *QAction, actions []*QAction) { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() diff --git a/qt/gen_qguiapplication.go b/qt/gen_qguiapplication.go index b3892ff7..7c2c90b6 100644 --- a/qt/gen_qguiapplication.go +++ b/qt/gen_qguiapplication.go @@ -42,7 +42,7 @@ func NewQGuiApplication(args []string) *QGuiApplication { // Convert []string to long-lived int& argc, char** argv, never call free() argc := (*C.int)(C.malloc(8)) *argc = C.int(len(args)) - argv := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(args)))) + argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args)))) for i := range args { argv[i] = C.CString(args[i]) } @@ -55,7 +55,7 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication { // Convert []string to long-lived int& argc, char** argv, never call free() argc := (*C.int)(C.malloc(8)) *argc = C.int(len(args)) - argv := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(args)))) + argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args)))) for i := range args { argv[i] = C.CString(args[i]) } diff --git a/qt/gen_qicon.go b/qt/gen_qicon.go index 6a4c7ef5..0dc256b2 100644 --- a/qt/gen_qicon.go +++ b/qt/gen_qicon.go @@ -259,8 +259,8 @@ func QIcon_ThemeSearchPaths() []string { func QIcon_SetThemeSearchPaths(searchpath []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - searchpath_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(searchpath)))) - searchpath_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(searchpath)))) + searchpath_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(searchpath)))) + searchpath_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(searchpath)))) defer C.free(unsafe.Pointer(searchpath_CArray)) defer C.free(unsafe.Pointer(searchpath_Lengths)) for i := range searchpath { @@ -289,8 +289,8 @@ func QIcon_FallbackSearchPaths() []string { func QIcon_SetFallbackSearchPaths(paths []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - paths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(paths)))) - paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(paths)))) + paths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(paths)))) + paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) defer C.free(unsafe.Pointer(paths_Lengths)) for i := range paths { diff --git a/qt/gen_qimage.go b/qt/gen_qimage.go index 3aee02ba..1bbfaf12 100644 --- a/qt/gen_qimage.go +++ b/qt/gen_qimage.go @@ -179,7 +179,7 @@ func (this *QImage) ConvertToFormat(f uintptr) *QImage { func (this *QImage) ConvertToFormat2(f uintptr, colorTable []uint) *QImage { // For the C ABI, malloc a C array of raw pointers - colorTable_CArray := (*[0xffff]C.uint)(C.malloc(C.ulong(8 * len(colorTable)))) + colorTable_CArray := (*[0xffff]C.uint)(C.malloc(C.size_t(8 * len(colorTable)))) defer C.free(unsafe.Pointer(colorTable_CArray)) for i := range colorTable { colorTable_CArray[i] = (C.uint)(colorTable[i]) @@ -401,7 +401,7 @@ func (this *QImage) ColorTable() []uint { func (this *QImage) SetColorTable(colors []uint) { // For the C ABI, malloc a C array of raw pointers - colors_CArray := (*[0xffff]C.uint)(C.malloc(C.ulong(8 * len(colors)))) + colors_CArray := (*[0xffff]C.uint)(C.malloc(C.size_t(8 * len(colors)))) defer C.free(unsafe.Pointer(colors_CArray)) for i := range colors { colors_CArray[i] = (C.uint)(colors[i]) @@ -815,7 +815,7 @@ func (this *QImage) ConvertToFormat22(f uintptr, flags int) *QImage { func (this *QImage) ConvertToFormat3(f uintptr, colorTable []uint, flags int) *QImage { // For the C ABI, malloc a C array of raw pointers - colorTable_CArray := (*[0xffff]C.uint)(C.malloc(C.ulong(8 * len(colorTable)))) + colorTable_CArray := (*[0xffff]C.uint)(C.malloc(C.size_t(8 * len(colorTable)))) defer C.free(unsafe.Pointer(colorTable_CArray)) for i := range colorTable { colorTable_CArray[i] = (C.uint)(colorTable[i]) diff --git a/qt/gen_qinputdialog.go b/qt/gen_qinputdialog.go index 9cc24e13..df9ce27d 100644 --- a/qt/gen_qinputdialog.go +++ b/qt/gen_qinputdialog.go @@ -159,8 +159,8 @@ func (this *QInputDialog) IsComboBoxEditable() bool { func (this *QInputDialog) SetComboBoxItems(items []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { @@ -355,8 +355,8 @@ func QInputDialog_GetItem(parent *QWidget, title string, label string, items []s label_Cstring := C.CString(label) defer C.free(unsafe.Pointer(label_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { @@ -684,8 +684,8 @@ func QInputDialog_GetItem5(parent *QWidget, title string, label string, items [] label_Cstring := C.CString(label) defer C.free(unsafe.Pointer(label_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { @@ -708,8 +708,8 @@ func QInputDialog_GetItem6(parent *QWidget, title string, label string, items [] label_Cstring := C.CString(label) defer C.free(unsafe.Pointer(label_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { @@ -732,8 +732,8 @@ func QInputDialog_GetItem7(parent *QWidget, title string, label string, items [] label_Cstring := C.CString(label) defer C.free(unsafe.Pointer(label_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { @@ -756,8 +756,8 @@ func QInputDialog_GetItem8(parent *QWidget, title string, label string, items [] label_Cstring := C.CString(label) defer C.free(unsafe.Pointer(label_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { @@ -780,8 +780,8 @@ func QInputDialog_GetItem9(parent *QWidget, title string, label string, items [] label_Cstring := C.CString(label) defer C.free(unsafe.Pointer(label_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - items_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(items)))) - items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(items)))) + items_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) defer C.free(unsafe.Pointer(items_Lengths)) for i := range items { diff --git a/qt/gen_qjsonarray.go b/qt/gen_qjsonarray.go index 9f15c4d4..5eeda1db 100644 --- a/qt/gen_qjsonarray.go +++ b/qt/gen_qjsonarray.go @@ -53,8 +53,8 @@ func (this *QJsonArray) OperatorAssign(other *QJsonArray) { func QJsonArray_FromStringList(list []string) *QJsonArray { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - list_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(list)))) - list_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(list)))) + list_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) defer C.free(unsafe.Pointer(list_Lengths)) for i := range list { diff --git a/qt/gen_qkeysequence.go b/qt/gen_qkeysequence.go index 2536a2fd..1adcb67c 100644 --- a/qt/gen_qkeysequence.go +++ b/qt/gen_qkeysequence.go @@ -142,7 +142,7 @@ func QKeySequence_ListFromString(str string) []QKeySequence { func QKeySequence_ListToString(list []QKeySequence) string { // For the C ABI, malloc a C array of raw pointers - list_CArray := (*[0xffff]*C.QKeySequence)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]*C.QKeySequence)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) for i := range list { list_CArray[i] = list[i].cPointer() @@ -273,7 +273,7 @@ func QKeySequence_ListFromString2(str string, format uintptr) []QKeySequence { func QKeySequence_ListToString2(list []QKeySequence, format uintptr) string { // For the C ABI, malloc a C array of raw pointers - list_CArray := (*[0xffff]*C.QKeySequence)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]*C.QKeySequence)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) for i := range list { list_CArray[i] = list[i].cPointer() diff --git a/qt/gen_qlistview.go b/qt/gen_qlistview.go index 11464914..d3712391 100644 --- a/qt/gen_qlistview.go +++ b/qt/gen_qlistview.go @@ -261,7 +261,7 @@ func (this *QListView) SetRootIndex(index *QModelIndex) { func (this *QListView) IndexesMoved(indexes []QModelIndex) { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() diff --git a/qt/gen_qlistwidget.go b/qt/gen_qlistwidget.go index 98faae83..7ce89eca 100644 --- a/qt/gen_qlistwidget.go +++ b/qt/gen_qlistwidget.go @@ -457,8 +457,8 @@ func (this *QListWidget) InsertItem2(row int, label string) { func (this *QListWidget) InsertItems(row int, labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { @@ -482,8 +482,8 @@ func (this *QListWidget) AddItemWithItem(item *QListWidgetItem) { func (this *QListWidget) AddItems(labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { diff --git a/qt/gen_qlocale.go b/qt/gen_qlocale.go index 9e3cb3f9..0fff6821 100644 --- a/qt/gen_qlocale.go +++ b/qt/gen_qlocale.go @@ -1004,8 +1004,8 @@ func (this *QLocale) QuoteString(str string) string { func (this *QLocale) CreateSeparatedList(strl []string) string { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strl_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strl)))) - strl_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strl)))) + strl_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strl)))) + strl_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strl)))) defer C.free(unsafe.Pointer(strl_CArray)) defer C.free(unsafe.Pointer(strl_Lengths)) for i := range strl { diff --git a/qt/gen_qmainwindow.go b/qt/gen_qmainwindow.go index 768d4501..837b58f9 100644 --- a/qt/gen_qmainwindow.go +++ b/qt/gen_qmainwindow.go @@ -302,13 +302,13 @@ func (this *QMainWindow) DockWidgetArea(dockwidget *QDockWidget) uintptr { func (this *QMainWindow) ResizeDocks(docks []*QDockWidget, sizes []int, orientation uintptr) { // For the C ABI, malloc a C array of raw pointers - docks_CArray := (*[0xffff]*C.QDockWidget)(C.malloc(C.ulong(8 * len(docks)))) + docks_CArray := (*[0xffff]*C.QDockWidget)(C.malloc(C.size_t(8 * len(docks)))) defer C.free(unsafe.Pointer(docks_CArray)) for i := range docks { docks_CArray[i] = docks[i].cPointer() } // For the C ABI, malloc a C array of raw pointers - sizes_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(sizes)))) + sizes_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(sizes)))) defer C.free(unsafe.Pointer(sizes_CArray)) for i := range sizes { sizes_CArray[i] = (C.int)(sizes[i]) diff --git a/qt/gen_qmenu.go b/qt/gen_qmenu.go index 4c1a401a..53175e4d 100644 --- a/qt/gen_qmenu.go +++ b/qt/gen_qmenu.go @@ -237,7 +237,7 @@ func (this *QMenu) ExecWithPos(pos *QPoint) *QAction { func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() @@ -441,7 +441,7 @@ func (this *QMenu) Exec22(pos *QPoint, at *QAction) *QAction { func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() @@ -452,7 +452,7 @@ func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) *QAction { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() diff --git a/qt/gen_qmimedata.go b/qt/gen_qmimedata.go index c53edee0..8b022102 100644 --- a/qt/gen_qmimedata.go +++ b/qt/gen_qmimedata.go @@ -84,7 +84,7 @@ func (this *QMimeData) Urls() []QUrl { func (this *QMimeData) SetUrls(urls []QUrl) { // For the C ABI, malloc a C array of raw pointers - urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.ulong(8 * len(urls)))) + urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) defer C.free(unsafe.Pointer(urls_CArray)) for i := range urls { urls_CArray[i] = urls[i].cPointer() diff --git a/qt/gen_qpainter.go b/qt/gen_qpainter.go index 7f2bf37b..eb5f7542 100644 --- a/qt/gen_qpainter.go +++ b/qt/gen_qpainter.go @@ -484,7 +484,7 @@ func (this *QPainter) DrawLines(lines *QLineF, lineCount int) { func (this *QPainter) DrawLinesWithLines(lines []QLineF) { // For the C ABI, malloc a C array of raw pointers - lines_CArray := (*[0xffff]*C.QLineF)(C.malloc(C.ulong(8 * len(lines)))) + lines_CArray := (*[0xffff]*C.QLineF)(C.malloc(C.size_t(8 * len(lines)))) defer C.free(unsafe.Pointer(lines_CArray)) for i := range lines { lines_CArray[i] = lines[i].cPointer() @@ -498,7 +498,7 @@ func (this *QPainter) DrawLines2(pointPairs *QPointF, lineCount int) { func (this *QPainter) DrawLinesWithPointPairs(pointPairs []QPointF) { // For the C ABI, malloc a C array of raw pointers - pointPairs_CArray := (*[0xffff]*C.QPointF)(C.malloc(C.ulong(8 * len(pointPairs)))) + pointPairs_CArray := (*[0xffff]*C.QPointF)(C.malloc(C.size_t(8 * len(pointPairs)))) defer C.free(unsafe.Pointer(pointPairs_CArray)) for i := range pointPairs { pointPairs_CArray[i] = pointPairs[i].cPointer() @@ -512,7 +512,7 @@ func (this *QPainter) DrawLines3(lines *QLine, lineCount int) { func (this *QPainter) DrawLines4(lines []QLine) { // For the C ABI, malloc a C array of raw pointers - lines_CArray := (*[0xffff]*C.QLine)(C.malloc(C.ulong(8 * len(lines)))) + lines_CArray := (*[0xffff]*C.QLine)(C.malloc(C.size_t(8 * len(lines)))) defer C.free(unsafe.Pointer(lines_CArray)) for i := range lines { lines_CArray[i] = lines[i].cPointer() @@ -526,7 +526,7 @@ func (this *QPainter) DrawLines5(pointPairs *QPoint, lineCount int) { func (this *QPainter) DrawLines6(pointPairs []QPoint) { // For the C ABI, malloc a C array of raw pointers - pointPairs_CArray := (*[0xffff]*C.QPoint)(C.malloc(C.ulong(8 * len(pointPairs)))) + pointPairs_CArray := (*[0xffff]*C.QPoint)(C.malloc(C.size_t(8 * len(pointPairs)))) defer C.free(unsafe.Pointer(pointPairs_CArray)) for i := range pointPairs { pointPairs_CArray[i] = pointPairs[i].cPointer() @@ -552,7 +552,7 @@ func (this *QPainter) DrawRects(rects *QRectF, rectCount int) { func (this *QPainter) DrawRectsWithRectangles(rectangles []QRectF) { // For the C ABI, malloc a C array of raw pointers - rectangles_CArray := (*[0xffff]*C.QRectF)(C.malloc(C.ulong(8 * len(rectangles)))) + rectangles_CArray := (*[0xffff]*C.QRectF)(C.malloc(C.size_t(8 * len(rectangles)))) defer C.free(unsafe.Pointer(rectangles_CArray)) for i := range rectangles { rectangles_CArray[i] = rectangles[i].cPointer() @@ -566,7 +566,7 @@ func (this *QPainter) DrawRects2(rects *QRect, rectCount int) { func (this *QPainter) DrawRects3(rectangles []QRect) { // For the C ABI, malloc a C array of raw pointers - rectangles_CArray := (*[0xffff]*C.QRect)(C.malloc(C.ulong(8 * len(rectangles)))) + rectangles_CArray := (*[0xffff]*C.QRect)(C.malloc(C.size_t(8 * len(rectangles)))) defer C.free(unsafe.Pointer(rectangles_CArray)) for i := range rectangles { rectangles_CArray[i] = rectangles[i].cPointer() diff --git a/qt/gen_qpainterpath.go b/qt/gen_qpainterpath.go index 553446e6..00ea2243 100644 --- a/qt/gen_qpainterpath.go +++ b/qt/gen_qpainterpath.go @@ -582,7 +582,7 @@ func (this *QPainterPathStroker) SetDashPattern(dashPattern uintptr) { func (this *QPainterPathStroker) SetDashPatternWithDashPattern(dashPattern []float64) { // For the C ABI, malloc a C array of raw pointers - dashPattern_CArray := (*[0xffff]C.double)(C.malloc(C.ulong(8 * len(dashPattern)))) + dashPattern_CArray := (*[0xffff]C.double)(C.malloc(C.size_t(8 * len(dashPattern)))) defer C.free(unsafe.Pointer(dashPattern_CArray)) for i := range dashPattern { dashPattern_CArray[i] = (C.double)(dashPattern[i]) diff --git a/qt/gen_qpen.go b/qt/gen_qpen.go index 7dcdd3a3..c5761f54 100644 --- a/qt/gen_qpen.go +++ b/qt/gen_qpen.go @@ -115,7 +115,7 @@ func (this *QPen) DashPattern() []float64 { func (this *QPen) SetDashPattern(pattern []float64) { // For the C ABI, malloc a C array of raw pointers - pattern_CArray := (*[0xffff]C.double)(C.malloc(C.ulong(8 * len(pattern)))) + pattern_CArray := (*[0xffff]C.double)(C.malloc(C.size_t(8 * len(pattern)))) defer C.free(unsafe.Pointer(pattern_CArray)) for i := range pattern { pattern_CArray[i] = (C.double)(pattern[i]) diff --git a/qt/gen_qplaintextedit.go b/qt/gen_qplaintextedit.go index eac5421c..0066e561 100644 --- a/qt/gen_qplaintextedit.go +++ b/qt/gen_qplaintextedit.go @@ -377,7 +377,7 @@ func (this *QPlainTextEdit) SetCursorWidth(width int) { func (this *QPlainTextEdit) SetExtraSelections(selections []QTextEdit__ExtraSelection) { // For the C ABI, malloc a C array of raw pointers - selections_CArray := (*[0xffff]*C.QTextEdit__ExtraSelection)(C.malloc(C.ulong(8 * len(selections)))) + selections_CArray := (*[0xffff]*C.QTextEdit__ExtraSelection)(C.malloc(C.size_t(8 * len(selections)))) defer C.free(unsafe.Pointer(selections_CArray)) for i := range selections { selections_CArray[i] = selections[i].cPointer() diff --git a/qt/gen_qprocess.go b/qt/gen_qprocess.go index 7ec09aa1..21151cc5 100644 --- a/qt/gen_qprocess.go +++ b/qt/gen_qprocess.go @@ -235,8 +235,8 @@ func (this *QProcess) Start(program string, arguments []string) { program_Cstring := C.CString(program) defer C.free(unsafe.Pointer(program_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -300,8 +300,8 @@ func (this *QProcess) Arguments() []string { func (this *QProcess) SetArguments(arguments []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -396,8 +396,8 @@ func (this *QProcess) SetWorkingDirectory(dir string) { func (this *QProcess) SetEnvironment(environment []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - environment_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(environment)))) - environment_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(environment)))) + environment_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(environment)))) + environment_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(environment)))) defer C.free(unsafe.Pointer(environment_CArray)) defer C.free(unsafe.Pointer(environment_Lengths)) for i := range environment { @@ -549,8 +549,8 @@ func QProcess_Execute(program string, arguments []string) int { program_Cstring := C.CString(program) defer C.free(unsafe.Pointer(program_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -574,8 +574,8 @@ func QProcess_StartDetached2(program string, arguments []string, workingDirector program_Cstring := C.CString(program) defer C.free(unsafe.Pointer(program_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -594,8 +594,8 @@ func QProcess_StartDetached3(program string, arguments []string) bool { program_Cstring := C.CString(program) defer C.free(unsafe.Pointer(program_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -751,8 +751,8 @@ func (this *QProcess) Start3(program string, arguments []string, mode int) { program_Cstring := C.CString(program) defer C.free(unsafe.Pointer(program_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { @@ -820,8 +820,8 @@ func QProcess_StartDetached4(program string, arguments []string, workingDirector program_Cstring := C.CString(program) defer C.free(unsafe.Pointer(program_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(arguments)))) - arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(arguments)))) + arguments_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(arguments)))) + arguments_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(arguments)))) defer C.free(unsafe.Pointer(arguments_CArray)) defer C.free(unsafe.Pointer(arguments_Lengths)) for i := range arguments { diff --git a/qt/gen_qrawfont.go b/qt/gen_qrawfont.go index 32ec24e1..80e4a006 100644 --- a/qt/gen_qrawfont.go +++ b/qt/gen_qrawfont.go @@ -143,7 +143,7 @@ func (this *QRawFont) GlyphIndexesForString(text string) []uint { func (this *QRawFont) AdvancesForGlyphIndexes(glyphIndexes []uint) []QPointF { // For the C ABI, malloc a C array of raw pointers - glyphIndexes_CArray := (*[0xffff]C.uint)(C.malloc(C.ulong(8 * len(glyphIndexes)))) + glyphIndexes_CArray := (*[0xffff]C.uint)(C.malloc(C.size_t(8 * len(glyphIndexes)))) defer C.free(unsafe.Pointer(glyphIndexes_CArray)) for i := range glyphIndexes { glyphIndexes_CArray[i] = (C.uint)(glyphIndexes[i]) @@ -162,7 +162,7 @@ func (this *QRawFont) AdvancesForGlyphIndexes(glyphIndexes []uint) []QPointF { func (this *QRawFont) AdvancesForGlyphIndexes2(glyphIndexes []uint, layoutFlags int) []QPointF { // For the C ABI, malloc a C array of raw pointers - glyphIndexes_CArray := (*[0xffff]C.uint)(C.malloc(C.ulong(8 * len(glyphIndexes)))) + glyphIndexes_CArray := (*[0xffff]C.uint)(C.malloc(C.size_t(8 * len(glyphIndexes)))) defer C.free(unsafe.Pointer(glyphIndexes_CArray)) for i := range glyphIndexes { glyphIndexes_CArray[i] = (C.uint)(glyphIndexes[i]) diff --git a/qt/gen_qscroller.go b/qt/gen_qscroller.go index e42cf045..4b8220b4 100644 --- a/qt/gen_qscroller.go +++ b/qt/gen_qscroller.go @@ -171,7 +171,7 @@ func (this *QScroller) ScrollerProperties() *QScrollerProperties { func (this *QScroller) SetSnapPositionsX(positions []float64) { // For the C ABI, malloc a C array of raw pointers - positions_CArray := (*[0xffff]C.double)(C.malloc(C.ulong(8 * len(positions)))) + positions_CArray := (*[0xffff]C.double)(C.malloc(C.size_t(8 * len(positions)))) defer C.free(unsafe.Pointer(positions_CArray)) for i := range positions { positions_CArray[i] = (C.double)(positions[i]) @@ -185,7 +185,7 @@ func (this *QScroller) SetSnapPositionsX2(first float64, interval float64) { func (this *QScroller) SetSnapPositionsY(positions []float64) { // For the C ABI, malloc a C array of raw pointers - positions_CArray := (*[0xffff]C.double)(C.malloc(C.ulong(8 * len(positions)))) + positions_CArray := (*[0xffff]C.double)(C.malloc(C.size_t(8 * len(positions)))) defer C.free(unsafe.Pointer(positions_CArray)) for i := range positions { positions_CArray[i] = (C.double)(positions[i]) diff --git a/qt/gen_qsessionmanager.go b/qt/gen_qsessionmanager.go index e45e92a6..e6b17d9f 100644 --- a/qt/gen_qsessionmanager.go +++ b/qt/gen_qsessionmanager.go @@ -109,8 +109,8 @@ func (this *QSessionManager) RestartHint() uintptr { func (this *QSessionManager) SetRestartCommand(restartCommand []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - restartCommand_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(restartCommand)))) - restartCommand_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(restartCommand)))) + restartCommand_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(restartCommand)))) + restartCommand_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(restartCommand)))) defer C.free(unsafe.Pointer(restartCommand_CArray)) defer C.free(unsafe.Pointer(restartCommand_Lengths)) for i := range restartCommand { @@ -139,8 +139,8 @@ func (this *QSessionManager) RestartCommand() []string { func (this *QSessionManager) SetDiscardCommand(discardCommand []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - discardCommand_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(discardCommand)))) - discardCommand_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(discardCommand)))) + discardCommand_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(discardCommand)))) + discardCommand_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(discardCommand)))) defer C.free(unsafe.Pointer(discardCommand_CArray)) defer C.free(unsafe.Pointer(discardCommand_Lengths)) for i := range discardCommand { @@ -179,8 +179,8 @@ func (this *QSessionManager) SetManagerProperty2(name string, value []string) { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - value_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(value)))) - value_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(value)))) + value_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(value)))) + value_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(value)))) defer C.free(unsafe.Pointer(value_CArray)) defer C.free(unsafe.Pointer(value_Lengths)) for i := range value { diff --git a/qt/gen_qsortfilterproxymodel.go b/qt/gen_qsortfilterproxymodel.go index 48d0ca98..7b565640 100644 --- a/qt/gen_qsortfilterproxymodel.go +++ b/qt/gen_qsortfilterproxymodel.go @@ -328,7 +328,7 @@ func (this *QSortFilterProxyModel) SetHeaderData(section int, orientation uintpt func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() diff --git a/qt/gen_qsplitter.go b/qt/gen_qsplitter.go index ec3d75f7..8b49b9ed 100644 --- a/qt/gen_qsplitter.go +++ b/qt/gen_qsplitter.go @@ -178,7 +178,7 @@ func (this *QSplitter) Sizes() []int { func (this *QSplitter) SetSizes(list []int) { // For the C ABI, malloc a C array of raw pointers - list_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(list)))) + list_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(list)))) defer C.free(unsafe.Pointer(list_CArray)) for i := range list { list_CArray[i] = (C.int)(list[i]) diff --git a/qt/gen_qstandarditemmodel.go b/qt/gen_qstandarditemmodel.go index 99b6a04c..cc605116 100644 --- a/qt/gen_qstandarditemmodel.go +++ b/qt/gen_qstandarditemmodel.go @@ -431,7 +431,7 @@ func (this *QStandardItem) SetChild2(row int, item *QStandardItem) { func (this *QStandardItem) InsertRow(row int, items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -441,7 +441,7 @@ func (this *QStandardItem) InsertRow(row int, items []*QStandardItem) { func (this *QStandardItem) InsertColumn(column int, items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -451,7 +451,7 @@ func (this *QStandardItem) InsertColumn(column int, items []*QStandardItem) { func (this *QStandardItem) InsertRows(row int, items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -485,7 +485,7 @@ func (this *QStandardItem) RemoveColumns(column int, count int) { func (this *QStandardItem) AppendRow(items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -495,7 +495,7 @@ func (this *QStandardItem) AppendRow(items []*QStandardItem) { func (this *QStandardItem) AppendRows(items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -505,7 +505,7 @@ func (this *QStandardItem) AppendRows(items []*QStandardItem) { func (this *QStandardItem) AppendColumn(items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -863,8 +863,8 @@ func (this *QStandardItemModel) SetVerticalHeaderItem(row int, item *QStandardIt func (this *QStandardItemModel) SetHorizontalHeaderLabels(labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { @@ -878,8 +878,8 @@ func (this *QStandardItemModel) SetHorizontalHeaderLabels(labels []string) { func (this *QStandardItemModel) SetVerticalHeaderLabels(labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { @@ -901,7 +901,7 @@ func (this *QStandardItemModel) SetColumnCount(columns int) { func (this *QStandardItemModel) AppendRow(items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -911,7 +911,7 @@ func (this *QStandardItemModel) AppendRow(items []*QStandardItem) { func (this *QStandardItemModel) AppendColumn(items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -925,7 +925,7 @@ func (this *QStandardItemModel) AppendRowWithItem(item *QStandardItem) { func (this *QStandardItemModel) InsertRow(row int, items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -935,7 +935,7 @@ func (this *QStandardItemModel) InsertRow(row int, items []*QStandardItem) { func (this *QStandardItemModel) InsertColumn(column int, items []*QStandardItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QStandardItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -1048,7 +1048,7 @@ func (this *QStandardItemModel) MimeTypes() []string { func (this *QStandardItemModel) MimeData(indexes []QModelIndex) *QMimeData { // For the C ABI, malloc a C array of raw pointers - indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.ulong(8 * len(indexes)))) + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) defer C.free(unsafe.Pointer(indexes_CArray)) for i := range indexes { indexes_CArray[i] = indexes[i].cPointer() diff --git a/qt/gen_qstandardpaths.go b/qt/gen_qstandardpaths.go index 58918ef5..6ee271ea 100644 --- a/qt/gen_qstandardpaths.go +++ b/qt/gen_qstandardpaths.go @@ -151,8 +151,8 @@ func QStandardPaths_FindExecutable2(executableName string, paths []string) strin executableName_Cstring := C.CString(executableName) defer C.free(unsafe.Pointer(executableName_Cstring)) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - paths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(paths)))) - paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(paths)))) + paths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(paths)))) + paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) defer C.free(unsafe.Pointer(paths_Lengths)) for i := range paths { diff --git a/qt/gen_qstringlistmodel.go b/qt/gen_qstringlistmodel.go index cb320dab..08df7f84 100644 --- a/qt/gen_qstringlistmodel.go +++ b/qt/gen_qstringlistmodel.go @@ -45,8 +45,8 @@ func NewQStringListModel() *QStringListModel { // NewQStringListModel2 constructs a new QStringListModel object. func NewQStringListModel2(strings []string) *QStringListModel { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -68,8 +68,8 @@ func NewQStringListModel3(parent *QObject) *QStringListModel { // NewQStringListModel4 constructs a new QStringListModel object. func NewQStringListModel4(strings []string, parent *QObject) *QStringListModel { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -182,8 +182,8 @@ func (this *QStringListModel) StringList() []string { func (this *QStringListModel) SetStringList(strings []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { diff --git a/qt/gen_qtablewidget.go b/qt/gen_qtablewidget.go index f74a7655..0b4b2aaf 100644 --- a/qt/gen_qtablewidget.go +++ b/qt/gen_qtablewidget.go @@ -572,8 +572,8 @@ func (this *QTableWidget) TakeHorizontalHeaderItem(column int) *QTableWidgetItem func (this *QTableWidget) SetVerticalHeaderLabels(labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { @@ -587,8 +587,8 @@ func (this *QTableWidget) SetVerticalHeaderLabels(labels []string) { func (this *QTableWidget) SetHorizontalHeaderLabels(labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { diff --git a/qt/gen_qtextbrowser.go b/qt/gen_qtextbrowser.go index 2781dfa0..362c0ae8 100644 --- a/qt/gen_qtextbrowser.go +++ b/qt/gen_qtextbrowser.go @@ -109,8 +109,8 @@ func (this *QTextBrowser) SearchPaths() []string { func (this *QTextBrowser) SetSearchPaths(paths []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - paths_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(paths)))) - paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(paths)))) + paths_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(paths)))) + paths_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) defer C.free(unsafe.Pointer(paths_Lengths)) for i := range paths { diff --git a/qt/gen_qtextedit.go b/qt/gen_qtextedit.go index dbf85770..b2e82c70 100644 --- a/qt/gen_qtextedit.go +++ b/qt/gen_qtextedit.go @@ -462,7 +462,7 @@ func (this *QTextEdit) SetAcceptRichText(accept bool) { func (this *QTextEdit) SetExtraSelections(selections []QTextEdit__ExtraSelection) { // For the C ABI, malloc a C array of raw pointers - selections_CArray := (*[0xffff]*C.QTextEdit__ExtraSelection)(C.malloc(C.ulong(8 * len(selections)))) + selections_CArray := (*[0xffff]*C.QTextEdit__ExtraSelection)(C.malloc(C.size_t(8 * len(selections)))) defer C.free(unsafe.Pointer(selections_CArray)) for i := range selections { selections_CArray[i] = selections[i].cPointer() diff --git a/qt/gen_qtextformat.go b/qt/gen_qtextformat.go index bc8843ca..0a78fbcb 100644 --- a/qt/gen_qtextformat.go +++ b/qt/gen_qtextformat.go @@ -265,7 +265,7 @@ func (this *QTextFormat) LengthVectorProperty(propertyId int) []QTextLength { func (this *QTextFormat) SetProperty2(propertyId int, lengths []QTextLength) { // For the C ABI, malloc a C array of raw pointers - lengths_CArray := (*[0xffff]*C.QTextLength)(C.malloc(C.ulong(8 * len(lengths)))) + lengths_CArray := (*[0xffff]*C.QTextLength)(C.malloc(C.size_t(8 * len(lengths)))) defer C.free(unsafe.Pointer(lengths_CArray)) for i := range lengths { lengths_CArray[i] = lengths[i].cPointer() @@ -536,8 +536,8 @@ func (this *QTextCharFormat) FontFamily() string { func (this *QTextCharFormat) SetFontFamilies(families []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - families_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(families)))) - families_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(families)))) + families_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(families)))) + families_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(families)))) defer C.free(unsafe.Pointer(families_CArray)) defer C.free(unsafe.Pointer(families_Lengths)) for i := range families { @@ -825,8 +825,8 @@ func (this *QTextCharFormat) AnchorName() string { func (this *QTextCharFormat) SetAnchorNames(names []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - names_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(names)))) - names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(names)))) + names_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(names)))) + names_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(names)))) defer C.free(unsafe.Pointer(names_CArray)) defer C.free(unsafe.Pointer(names_Lengths)) for i := range names { @@ -1030,7 +1030,7 @@ func (this *QTextBlockFormat) PageBreakPolicy() int { func (this *QTextBlockFormat) SetTabPositions(tabs []QTextOption__Tab) { // For the C ABI, malloc a C array of raw pointers - tabs_CArray := (*[0xffff]*C.QTextOption__Tab)(C.malloc(C.ulong(8 * len(tabs)))) + tabs_CArray := (*[0xffff]*C.QTextOption__Tab)(C.malloc(C.size_t(8 * len(tabs)))) defer C.free(unsafe.Pointer(tabs_CArray)) for i := range tabs { tabs_CArray[i] = tabs[i].cPointer() @@ -1472,7 +1472,7 @@ func (this *QTextTableFormat) SetColumns(columns int) { func (this *QTextTableFormat) SetColumnWidthConstraints(constraints []QTextLength) { // For the C ABI, malloc a C array of raw pointers - constraints_CArray := (*[0xffff]*C.QTextLength)(C.malloc(C.ulong(8 * len(constraints)))) + constraints_CArray := (*[0xffff]*C.QTextLength)(C.malloc(C.size_t(8 * len(constraints)))) defer C.free(unsafe.Pointer(constraints_CArray)) for i := range constraints { constraints_CArray[i] = constraints[i].cPointer() diff --git a/qt/gen_qtextlayout.go b/qt/gen_qtextlayout.go index 0f088321..bf117b32 100644 --- a/qt/gen_qtextlayout.go +++ b/qt/gen_qtextlayout.go @@ -242,7 +242,7 @@ func (this *QTextLayout) PreeditAreaText() string { func (this *QTextLayout) SetAdditionalFormats(overrides []QTextLayout__FormatRange) { // For the C ABI, malloc a C array of raw pointers - overrides_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.ulong(8 * len(overrides)))) + overrides_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.size_t(8 * len(overrides)))) defer C.free(unsafe.Pointer(overrides_CArray)) for i := range overrides { overrides_CArray[i] = overrides[i].cPointer() @@ -269,7 +269,7 @@ func (this *QTextLayout) ClearAdditionalFormats() { func (this *QTextLayout) SetFormats(overrides []QTextLayout__FormatRange) { // For the C ABI, malloc a C array of raw pointers - overrides_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.ulong(8 * len(overrides)))) + overrides_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.size_t(8 * len(overrides)))) defer C.free(unsafe.Pointer(overrides_CArray)) for i := range overrides { overrides_CArray[i] = overrides[i].cPointer() @@ -464,7 +464,7 @@ func (this *QTextLayout) PreviousCursorPosition2(oldPos int, mode uintptr) int { func (this *QTextLayout) Draw3(p *QPainter, pos *QPointF, selections []QTextLayout__FormatRange) { // For the C ABI, malloc a C array of raw pointers - selections_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.ulong(8 * len(selections)))) + selections_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.size_t(8 * len(selections)))) defer C.free(unsafe.Pointer(selections_CArray)) for i := range selections { selections_CArray[i] = selections[i].cPointer() @@ -474,7 +474,7 @@ func (this *QTextLayout) Draw3(p *QPainter, pos *QPointF, selections []QTextLayo func (this *QTextLayout) Draw4(p *QPainter, pos *QPointF, selections []QTextLayout__FormatRange, clip *QRectF) { // For the C ABI, malloc a C array of raw pointers - selections_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.ulong(8 * len(selections)))) + selections_CArray := (*[0xffff]*C.QTextLayout__FormatRange)(C.malloc(C.size_t(8 * len(selections)))) defer C.free(unsafe.Pointer(selections_CArray)) for i := range selections { selections_CArray[i] = selections[i].cPointer() diff --git a/qt/gen_qtextoption.go b/qt/gen_qtextoption.go index 911c26a7..73bb1904 100644 --- a/qt/gen_qtextoption.go +++ b/qt/gen_qtextoption.go @@ -112,7 +112,7 @@ func (this *QTextOption) TabStopDistance() float64 { func (this *QTextOption) SetTabArray(tabStops []float64) { // For the C ABI, malloc a C array of raw pointers - tabStops_CArray := (*[0xffff]C.double)(C.malloc(C.ulong(8 * len(tabStops)))) + tabStops_CArray := (*[0xffff]C.double)(C.malloc(C.size_t(8 * len(tabStops)))) defer C.free(unsafe.Pointer(tabStops_CArray)) for i := range tabStops { tabStops_CArray[i] = (C.double)(tabStops[i]) @@ -135,7 +135,7 @@ func (this *QTextOption) TabArray() []float64 { func (this *QTextOption) SetTabs(tabStops []QTextOption__Tab) { // For the C ABI, malloc a C array of raw pointers - tabStops_CArray := (*[0xffff]*C.QTextOption__Tab)(C.malloc(C.ulong(8 * len(tabStops)))) + tabStops_CArray := (*[0xffff]*C.QTextOption__Tab)(C.malloc(C.size_t(8 * len(tabStops)))) defer C.free(unsafe.Pointer(tabStops_CArray)) for i := range tabStops { tabStops_CArray[i] = tabStops[i].cPointer() diff --git a/qt/gen_qtreeview.go b/qt/gen_qtreeview.go index 32ee5b22..c4d82edc 100644 --- a/qt/gen_qtreeview.go +++ b/qt/gen_qtreeview.go @@ -460,7 +460,7 @@ func (this *QTreeView) ScrollTo2(index *QModelIndex, hint uintptr) { func (this *QTreeView) DataChanged3(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { // For the C ABI, malloc a C array of raw pointers - roles_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(roles)))) + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) defer C.free(unsafe.Pointer(roles_CArray)) for i := range roles { roles_CArray[i] = (C.int)(roles[i]) diff --git a/qt/gen_qtreewidget.go b/qt/gen_qtreewidget.go index d320107b..a4067067 100644 --- a/qt/gen_qtreewidget.go +++ b/qt/gen_qtreewidget.go @@ -45,8 +45,8 @@ func NewQTreeWidgetItem() *QTreeWidgetItem { // NewQTreeWidgetItem2 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem2(strings []string) *QTreeWidgetItem { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -68,8 +68,8 @@ func NewQTreeWidgetItem3(treeview *QTreeWidget) *QTreeWidgetItem { // NewQTreeWidgetItem4 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem4(treeview *QTreeWidget, strings []string) *QTreeWidgetItem { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -97,8 +97,8 @@ func NewQTreeWidgetItem6(parent *QTreeWidgetItem) *QTreeWidgetItem { // NewQTreeWidgetItem7 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem7(parent *QTreeWidgetItem, strings []string) *QTreeWidgetItem { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -132,8 +132,8 @@ func NewQTreeWidgetItem10(typeVal int) *QTreeWidgetItem { // NewQTreeWidgetItem11 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem11(strings []string, typeVal int) *QTreeWidgetItem { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -155,8 +155,8 @@ func NewQTreeWidgetItem12(treeview *QTreeWidget, typeVal int) *QTreeWidgetItem { // NewQTreeWidgetItem13 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem13(treeview *QTreeWidget, strings []string, typeVal int) *QTreeWidgetItem { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -184,8 +184,8 @@ func NewQTreeWidgetItem15(parent *QTreeWidgetItem, typeVal int) *QTreeWidgetItem // NewQTreeWidgetItem16 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem16(parent *QTreeWidgetItem, strings []string, typeVal int) *QTreeWidgetItem { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - strings_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(strings)))) - strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(strings)))) + strings_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(strings)))) + strings_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(strings)))) defer C.free(unsafe.Pointer(strings_CArray)) defer C.free(unsafe.Pointer(strings_Lengths)) for i := range strings { @@ -536,7 +536,7 @@ func (this *QTreeWidgetItem) TakeChild(index int) *QTreeWidgetItem { func (this *QTreeWidgetItem) AddChildren(children []*QTreeWidgetItem) { // For the C ABI, malloc a C array of raw pointers - children_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.ulong(8 * len(children)))) + children_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.size_t(8 * len(children)))) defer C.free(unsafe.Pointer(children_CArray)) for i := range children { children_CArray[i] = children[i].cPointer() @@ -546,7 +546,7 @@ func (this *QTreeWidgetItem) AddChildren(children []*QTreeWidgetItem) { func (this *QTreeWidgetItem) InsertChildren(index int, children []*QTreeWidgetItem) { // For the C ABI, malloc a C array of raw pointers - children_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.ulong(8 * len(children)))) + children_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.size_t(8 * len(children)))) defer C.free(unsafe.Pointer(children_CArray)) for i := range children { children_CArray[i] = children[i].cPointer() @@ -686,7 +686,7 @@ func (this *QTreeWidget) IndexOfTopLevelItem(item *QTreeWidgetItem) int { func (this *QTreeWidget) InsertTopLevelItems(index int, items []*QTreeWidgetItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -696,7 +696,7 @@ func (this *QTreeWidget) InsertTopLevelItems(index int, items []*QTreeWidgetItem func (this *QTreeWidget) AddTopLevelItems(items []*QTreeWidgetItem) { // For the C ABI, malloc a C array of raw pointers - items_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.ulong(8 * len(items)))) + items_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.size_t(8 * len(items)))) defer C.free(unsafe.Pointer(items_CArray)) for i := range items { items_CArray[i] = items[i].cPointer() @@ -715,8 +715,8 @@ func (this *QTreeWidget) SetHeaderItem(item *QTreeWidgetItem) { func (this *QTreeWidget) SetHeaderLabels(labels []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - labels_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(labels)))) - labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(labels)))) + labels_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(labels)))) + labels_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(labels)))) defer C.free(unsafe.Pointer(labels_CArray)) defer C.free(unsafe.Pointer(labels_Lengths)) for i := range labels { diff --git a/qt/gen_qurl.go b/qt/gen_qurl.go index 5bd32893..a0bc4117 100644 --- a/qt/gen_qurl.go +++ b/qt/gen_qurl.go @@ -492,7 +492,7 @@ func QUrl_IdnWhitelist() []string { func QUrl_ToStringList(uris []QUrl) []string { // For the C ABI, malloc a C array of raw pointers - uris_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.ulong(8 * len(uris)))) + uris_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(uris)))) defer C.free(unsafe.Pointer(uris_CArray)) for i := range uris { uris_CArray[i] = uris[i].cPointer() @@ -513,8 +513,8 @@ func QUrl_ToStringList(uris []QUrl) []string { func QUrl_FromStringList(uris []string) []QUrl { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - uris_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(uris)))) - uris_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(uris)))) + uris_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(uris)))) + uris_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(uris)))) defer C.free(unsafe.Pointer(uris_CArray)) defer C.free(unsafe.Pointer(uris_Lengths)) for i := range uris { @@ -537,8 +537,8 @@ func QUrl_FromStringList(uris []string) []QUrl { func QUrl_SetIdnWhitelist(idnWhitelist []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - idnWhitelist_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(idnWhitelist)))) - idnWhitelist_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(idnWhitelist)))) + idnWhitelist_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(idnWhitelist)))) + idnWhitelist_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(idnWhitelist)))) defer C.free(unsafe.Pointer(idnWhitelist_CArray)) defer C.free(unsafe.Pointer(idnWhitelist_Lengths)) for i := range idnWhitelist { @@ -753,8 +753,8 @@ func QUrl_ToPercentEncoding3(param1 string, exclude *QByteArray, include *QByteA func QUrl_FromStringList2(uris []string, mode uintptr) []QUrl { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - uris_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(uris)))) - uris_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(uris)))) + uris_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(uris)))) + uris_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(uris)))) defer C.free(unsafe.Pointer(uris_CArray)) defer C.free(unsafe.Pointer(uris_Lengths)) for i := range uris { diff --git a/qt/gen_qvariant.go b/qt/gen_qvariant.go index d265c7b0..3e3863b0 100644 --- a/qt/gen_qvariant.go +++ b/qt/gen_qvariant.go @@ -132,8 +132,8 @@ func NewQVariant15(stringVal string) *QVariant { // NewQVariant16 constructs a new QVariant object. func NewQVariant16(stringlist []string) *QVariant { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths - stringlist_CArray := (*[0xffff]*C.char)(C.malloc(C.ulong(8 * len(stringlist)))) - stringlist_Lengths := (*[0xffff]C.size_t)(C.malloc(C.ulong(8 * len(stringlist)))) + stringlist_CArray := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(stringlist)))) + stringlist_Lengths := (*[0xffff]C.size_t)(C.malloc(C.size_t(8 * len(stringlist)))) defer C.free(unsafe.Pointer(stringlist_CArray)) defer C.free(unsafe.Pointer(stringlist_Lengths)) for i := range stringlist { diff --git a/qt/gen_qversionnumber.go b/qt/gen_qversionnumber.go index 794862bf..4c575048 100644 --- a/qt/gen_qversionnumber.go +++ b/qt/gen_qversionnumber.go @@ -44,7 +44,7 @@ func NewQVersionNumber() *QVersionNumber { // NewQVersionNumber2 constructs a new QVersionNumber object. func NewQVersionNumber2(seg []int) *QVersionNumber { // For the C ABI, malloc a C array of raw pointers - seg_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(seg)))) + seg_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(seg)))) defer C.free(unsafe.Pointer(seg_CArray)) for i := range seg { seg_CArray[i] = (C.int)(seg[i]) diff --git a/qt/gen_qwidget.go b/qt/gen_qwidget.go index 956ac878..ce5b1a9e 100644 --- a/qt/gen_qwidget.go +++ b/qt/gen_qwidget.go @@ -1355,7 +1355,7 @@ func (this *QWidget) AddAction(action *QAction) { func (this *QWidget) AddActions(actions []*QAction) { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() @@ -1365,7 +1365,7 @@ func (this *QWidget) AddActions(actions []*QAction) { func (this *QWidget) InsertActions(before *QAction, actions []*QAction) { // For the C ABI, malloc a C array of raw pointers - actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.ulong(8 * len(actions)))) + actions_CArray := (*[0xffff]*C.QAction)(C.malloc(C.size_t(8 * len(actions)))) defer C.free(unsafe.Pointer(actions_CArray)) for i := range actions { actions_CArray[i] = actions[i].cPointer() diff --git a/qt/gen_qwizard.go b/qt/gen_qwizard.go index 6df65ddc..dc9a5364 100644 --- a/qt/gen_qwizard.go +++ b/qt/gen_qwizard.go @@ -236,7 +236,7 @@ func (this *QWizard) ButtonText(which int) string { func (this *QWizard) SetButtonLayout(layout []int) { // For the C ABI, malloc a C array of raw pointers - layout_CArray := (*[0xffff]C.int)(C.malloc(C.ulong(8 * len(layout)))) + layout_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(layout)))) defer C.free(unsafe.Pointer(layout_CArray)) for i := range layout { layout_CArray[i] = (C.int)(layout[i]) diff --git a/qt/gen_qxmlstream.go b/qt/gen_qxmlstream.go index 47d99f13..1b653186 100644 --- a/qt/gen_qxmlstream.go +++ b/qt/gen_qxmlstream.go @@ -618,7 +618,7 @@ func (this *QXmlStreamReader) AddExtraNamespaceDeclaration(extraNamespaceDeclara func (this *QXmlStreamReader) AddExtraNamespaceDeclarations(extraNamespaceDeclaractions []QXmlStreamNamespaceDeclaration) { // For the C ABI, malloc a C array of raw pointers - extraNamespaceDeclaractions_CArray := (*[0xffff]*C.QXmlStreamNamespaceDeclaration)(C.malloc(C.ulong(8 * len(extraNamespaceDeclaractions)))) + extraNamespaceDeclaractions_CArray := (*[0xffff]*C.QXmlStreamNamespaceDeclaration)(C.malloc(C.size_t(8 * len(extraNamespaceDeclaractions)))) defer C.free(unsafe.Pointer(extraNamespaceDeclaractions_CArray)) for i := range extraNamespaceDeclaractions { extraNamespaceDeclaractions_CArray[i] = extraNamespaceDeclaractions[i].cPointer()