2024-08-18 05:48:17 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2024-09-14 07:31:39 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
#include "binding.h"
|
|
|
|
|
|
|
|
struct miqt_string* miqt_strdupg(_GoString_ gs) {
|
|
|
|
return miqt_strdup(_GoStringPtr(gs), _GoStringLen(gs));
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
2024-08-18 07:02:32 +00:00
|
|
|
import (
|
2024-08-23 23:46:26 +00:00
|
|
|
"unsafe"
|
2024-08-18 07:02:32 +00:00
|
|
|
)
|
|
|
|
|
2024-09-14 07:31:39 +00:00
|
|
|
// miqt_strdupg will strdup a Go string into a miqt_string*.
|
|
|
|
// It is typed as returning an unsafe.Pointer because Cgo types cannot be shared
|
|
|
|
// across Go file boundaries.
|
|
|
|
func miqt_strdupg(s string) unsafe.Pointer {
|
|
|
|
return unsafe.Pointer(C.miqt_strdupg(s))
|
2024-08-18 05:48:17 +00:00
|
|
|
}
|