Skip to content

Commit 93a8d4d

Browse files
dodobytepravic
authored andcommitted
fix tdm-gcc build issues
1 parent 87bcf6b commit 93a8d4d

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

sciter.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (s *Sciter) GetHwnd() C.HWINDOW {
8989
return s.hwnd
9090
}
9191

92-
func SetDLL(dir string){
92+
func SetDLL(dir string) {
9393
C.SCITER_DLL_PATH = C.CString(dir)
9494
}
9595

@@ -461,8 +461,7 @@ func (s *Sciter) GetArchiveItem(uri string) []byte {
461461
var data C.LPCBYTE
462462
var length C.UINT
463463
cdata := (*C.LPCBYTE)(&data)
464-
clength := C.LPUINT(&length)
465-
r := C.SciterGetArchiveItem(s.har, StringToWcharPtr(uri), cdata, clength)
464+
r := C.SciterGetArchiveItem(s.har, StringToWcharPtr(uri), cdata, &length)
466465
if r == 0 {
467466
return nil
468467
}
@@ -778,10 +777,8 @@ func (e *Element) SetText(text string) error {
778777
// \return \b #SCDOM_RESULT SCAPI
779778
func (e *Element) AttrCount() (int, error) {
780779
var count C.UINT
781-
// args
782-
ccount := C.LPUINT(&count)
783780
// cgo call
784-
r := C.SciterGetAttributeCount(e.handle, ccount)
781+
r := C.SciterGetAttributeCount(e.handle, &count)
785782
return int(count), wrapDomResult(r, "SciterGetAttributeCount")
786783
}
787784

@@ -2035,9 +2032,8 @@ func (pdst *Value) Bytes() []byte {
20352032
var pv C.LPCBYTE
20362033
var length C.UINT
20372034
pBytes := (*C.LPCBYTE)(unsafe.Pointer(&pv))
2038-
pnBytes := C.LPUINT(&length)
20392035
// cgo call
2040-
r := C.ValueBinaryData(cpdst, pBytes, pnBytes)
2036+
r := C.ValueBinaryData(cpdst, pBytes, &length)
20412037
if r != C.UINT(HV_OK) {
20422038
return nil
20432039
}
@@ -2333,5 +2329,3 @@ func (pdst *Value) IsNativeFunctor() bool {
23332329
}
23342330
return true
23352331
}
2336-
2337-

0 commit comments

Comments
 (0)