update for tdlib v1.7.0

This commit is contained in:
Aleksandr Zelenin 2020-11-30 12:33:47 +03:00
parent a5d1c7ffe7
commit 4a26afe3b0
9 changed files with 9127 additions and 2063 deletions

File diff suppressed because it is too large Load diff

View file

@ -5,6 +5,6 @@ package client
/*
#cgo linux CFLAGS: -I/usr/local/include
#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdactor -ltdapi -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
*/
import "C"

View file

@ -144,7 +144,11 @@ func (jsonInt64 JsonInt64) MarshalJSON() ([]byte, error) {
// UnmarshalJSON unmarshals from json
func (jsonInt64 *JsonInt64) UnmarshalJSON(data []byte) error {
jsonBigInt, err := strconv.ParseInt(string(data[1:len(data)-1]), 10, 64)
if len(data) > 2 && data[0] == '"' && data[len(data)-1] == '"' {
data = data[1 : len(data)-1]
}
jsonBigInt, err := strconv.ParseInt(string(data), 10, 64)
if err != nil {
return err
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff