Skip to content

Commit 3b44840

Browse files
committed
fix: Value.Int should work with int32.
This applies to: * `Value.Int() int32` * `Value.SetInt(int32)` refs #286
1 parent 81c00ac commit 3b44840

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sciter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,9 +2051,9 @@ func NewSymbol(sym string) *Value {
20512051
}
20522052

20532053
// UINT ValueIntData ( const VALUE* pval, INT* pData ) ;//{ return SAPI()->ValueIntData ( pval, pData ); }
2054-
func (pdst *Value) Int() int {
2054+
func (pdst *Value) Int() int32 {
20552055
cpdst := (*C.VALUE)(unsafe.Pointer(pdst))
2056-
var data int = 0
2056+
var data int32 = 0
20572057
pData := (*C.INT)(unsafe.Pointer(&data))
20582058
ret := VALUE_RESULT(C.ValueIntData(cpdst, pData))
20592059
if ret == HV_OK {
@@ -2063,7 +2063,7 @@ func (pdst *Value) Int() int {
20632063
}
20642064

20652065
// UINT ValueIntDataSet ( VALUE* pval, INT data, UINT type, UINT units ) ;//{ return SAPI()->ValueIntDataSet ( pval, data,type,units ); }
2066-
func (pdst *Value) SetInt(data int) error {
2066+
func (pdst *Value) SetInt(data int32) error {
20672067
cpdst := (*C.VALUE)(unsafe.Pointer(pdst))
20682068
// args
20692069
return wrapValueResult(VALUE_RESULT(C.ValueIntDataSet(cpdst, C.INT(data), T_INT, 0)), "ValueIntDataSet")

0 commit comments

Comments
 (0)