slidge-whatsapp 0.2.5__cp311-cp311-manylinux_2_36_aarch64.whl → 0.2.7__cp311-cp311-manylinux_2_36_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slidge-whatsapp might be problematic. Click here for more details.
- slidge_whatsapp/config.py +3 -0
- slidge_whatsapp/event.go +31 -26
- slidge_whatsapp/gateway.go +13 -9
- slidge_whatsapp/gateway.py +2 -2
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.h +170 -170
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +135 -135
- slidge_whatsapp/generated/whatsapp.c +1496 -1496
- slidge_whatsapp/generated/whatsapp.go +1137 -1137
- slidge_whatsapp/generated/whatsapp.py +1216 -1216
- slidge_whatsapp/generated/whatsapp_go.h +170 -170
- slidge_whatsapp/go.mod +15 -12
- slidge_whatsapp/go.sum +35 -29
- slidge_whatsapp/media/media.go +21 -11
- slidge_whatsapp/session.go +73 -66
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +4 -4
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +0 -5
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +3 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +40 -20
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +14 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +2 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_unix.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_windows.go +1 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -7
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +8510 -5090
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +344 -150
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3.go +57 -23
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c +4 -0
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/.gitignore +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/LICENSE +202 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/README.md +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid.go +35 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_gccgo.go +26 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.c +23 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.go +22 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.go +35 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.s +18 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.go +28 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.s +44 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_slow.go +24 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go +17 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +38 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.5.go +57 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.6.go +43 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.9.go +37 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/CONTRIBUTING.md +43 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/README.md +31 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/console.go +20 -5
- slidge_whatsapp/vendor/github.com/rs/zerolog/log/log.go +131 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/log.go +1 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/sampler.go +4 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/writer.go +9 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupCipher.go +17 -6
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go +17 -7
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go +4 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go +2 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/Session.go +41 -17
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +64 -30
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SessionStore.go +8 -6
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go +7 -5
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/connlog.go +257 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/database.go +309 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/iter.go +233 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/json.go +47 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +129 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/massinsert.go +164 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/queryhelper.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/reflectscan.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/transaction.go +180 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgrades.go +250 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +331 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exerrors/dualerror.go +33 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exerrors/must.go +23 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/cors.go +32 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +64 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +36 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +37 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +76 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +88 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/returnonce.go +25 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/ringbuffer.go +139 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +94 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +136 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/callermarshal.go +28 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/defaults.go +32 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/generics.go +45 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/writer.go +81 -0
- slidge_whatsapp/vendor/go.mau.fi/util/ptr/ptr.go +43 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +27 -26
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +4 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/keys.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +27 -25
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +119 -37
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +29 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +63 -30
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +74 -34
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +61 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +188 -152
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaconn.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaretry.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +444 -135
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +118 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +78 -42
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +7 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +42 -18
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +9 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go +39 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.go +354 -175
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.proto +5 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +170 -15
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go +29 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go +13 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.go +344 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto +26 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.pb.go → WACompanionReg.pb.go} +184 -89
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.go +173 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +78 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +7428 -2151
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +373 -44
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +456 -135
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +14 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.go +162 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.go +32 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.go +192 -52
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.proto +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.go +60 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.go +39 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.go +61 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +800 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +72 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1344 -438
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +52 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.go +27 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.go +59 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +382 -78
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +563 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +25 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +39 -21
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +261 -75
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +28 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +85 -43
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +86 -65
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +291 -167
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +155 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/03-message-secrets.sql +11 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/04-privacy-tokens.sql +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/05-account-jid-format.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/06-facebook-uuid.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/07-account-lid.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/08-lid-mapping.sql +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/09-decryption-buffer.sql +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/upgrades.go +22 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +107 -56
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +7 -8
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +18 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/update.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/upload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +47 -29
- slidge_whatsapp/vendor/golang.org/x/exp/LICENSE +27 -0
- slidge_whatsapp/vendor/golang.org/x/exp/PATENTS +22 -0
- slidge_whatsapp/vendor/golang.org/x/exp/constraints/constraints.go +54 -0
- slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/guts.go +50 -0
- slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/httplex.go +347 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/.gitignore +2 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/ascii.go +53 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/ciphers.go +641 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/client_conn_pool.go +311 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +122 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +61 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/databuffer.go +149 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/errors.go +145 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/flow.go +120 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +1702 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +170 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/encode.go +245 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/hpack.go +523 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/huffman.go +226 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/static_table.go +188 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/tables.go +403 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +432 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3350 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +20 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3287 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/unencrypted.go +32 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/write.go +381 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +251 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority.go +451 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_random.go +77 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +119 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/go118.go +13 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/idna10.0.0.go +769 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/idna9.0.0.go +717 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/pre_go118.go +11 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/punycode.go +217 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables10.0.0.go +4559 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables11.0.0.go +4653 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables12.0.0.go +4733 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables13.0.0.go +4959 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables15.0.0.go +5144 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables9.0.0.go +4486 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie.go +51 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie12.0.0.go +30 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie13.0.0.go +30 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trieval.go +119 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +467 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +148 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +84 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +20 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +84 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +20 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/security_windows.go +44 -5
- slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +4 -2
- slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +239 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +9 -0
- slidge_whatsapp/vendor/golang.org/x/text/LICENSE +27 -0
- slidge_whatsapp/vendor/golang.org/x/text/PATENTS +22 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule.go +336 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +11 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +14 -0
- slidge_whatsapp/vendor/golang.org/x/text/transform/transform.go +709 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bidi.go +359 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +1071 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +1815 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +1887 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +1923 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +1955 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +2042 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +1781 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/trieval.go +48 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/composition.go +512 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/forminfo.go +279 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/iter.go +458 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/normalize.go +610 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +7657 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +7693 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +7710 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go +7760 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +7907 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +7637 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +3 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +16 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe_go121.go → strings_unsafe.go} +0 -2
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/proto/merge.go +6 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +2 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
- slidge_whatsapp/vendor/modules.txt +52 -13
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/METADATA +1 -1
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/RECORD +330 -184
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/WHEEL +1 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/CNAME +0 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/_config.yml +0 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw +0 -23
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw +0 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +0 -296
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +0 -94
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +0 -98
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/LICENSE +0 -0
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/entry_points.txt +0 -0
|
@@ -381,7 +381,7 @@ type SQLiteStmt struct {
|
|
|
381
381
|
s *C.sqlite3_stmt
|
|
382
382
|
t string
|
|
383
383
|
closed bool
|
|
384
|
-
cls bool
|
|
384
|
+
cls bool // True if the statement was created by SQLiteConn.Query
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
// SQLiteResult implements sql.Result.
|
|
@@ -393,12 +393,12 @@ type SQLiteResult struct {
|
|
|
393
393
|
// SQLiteRows implements driver.Rows.
|
|
394
394
|
type SQLiteRows struct {
|
|
395
395
|
s *SQLiteStmt
|
|
396
|
-
nc
|
|
396
|
+
nc int32 // Number of columns
|
|
397
|
+
cls bool // True if we need to close the parent statement in Close
|
|
397
398
|
cols []string
|
|
398
399
|
decltype []string
|
|
399
|
-
cls bool
|
|
400
|
-
closed bool
|
|
401
400
|
ctx context.Context // no better alternative to pass context into Next() method
|
|
401
|
+
closemu sync.Mutex
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
type functionInfo struct {
|
|
@@ -929,6 +929,7 @@ func (c *SQLiteConn) query(ctx context.Context, query string, args []driver.Name
|
|
|
929
929
|
s.(*SQLiteStmt).cls = true
|
|
930
930
|
na := s.NumInput()
|
|
931
931
|
if len(args)-start < na {
|
|
932
|
+
s.Close()
|
|
932
933
|
return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, len(args)-start)
|
|
933
934
|
}
|
|
934
935
|
// consume the number of arguments used in the current
|
|
@@ -1875,6 +1876,9 @@ func (c *SQLiteConn) SetLimit(id int, newVal int) int {
|
|
|
1875
1876
|
// This method is not thread-safe as the returned error code can be changed by
|
|
1876
1877
|
// another call if invoked concurrently.
|
|
1877
1878
|
//
|
|
1879
|
+
// Use SetFileControlInt64 instead if the argument for the opcode is documented
|
|
1880
|
+
// as a pointer to a sqlite3_int64.
|
|
1881
|
+
//
|
|
1878
1882
|
// See: sqlite3_file_control, https://www.sqlite.org/c3ref/file_control.html
|
|
1879
1883
|
func (c *SQLiteConn) SetFileControlInt(dbName string, op int, arg int) error {
|
|
1880
1884
|
if dbName == "" {
|
|
@@ -1892,6 +1896,34 @@ func (c *SQLiteConn) SetFileControlInt(dbName string, op int, arg int) error {
|
|
|
1892
1896
|
return nil
|
|
1893
1897
|
}
|
|
1894
1898
|
|
|
1899
|
+
// SetFileControlInt64 invokes the xFileControl method on a given database. The
|
|
1900
|
+
// dbName is the name of the database. It will default to "main" if left blank.
|
|
1901
|
+
// The op is one of the opcodes prefixed by "SQLITE_FCNTL_". The arg argument
|
|
1902
|
+
// and return code are both opcode-specific. Please see the SQLite documentation.
|
|
1903
|
+
//
|
|
1904
|
+
// This method is not thread-safe as the returned error code can be changed by
|
|
1905
|
+
// another call if invoked concurrently.
|
|
1906
|
+
//
|
|
1907
|
+
// Only use this method if the argument for the opcode is documented as a pointer
|
|
1908
|
+
// to a sqlite3_int64.
|
|
1909
|
+
//
|
|
1910
|
+
// See: sqlite3_file_control, https://www.sqlite.org/c3ref/file_control.html
|
|
1911
|
+
func (c *SQLiteConn) SetFileControlInt64(dbName string, op int, arg int64) error {
|
|
1912
|
+
if dbName == "" {
|
|
1913
|
+
dbName = "main"
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
cDBName := C.CString(dbName)
|
|
1917
|
+
defer C.free(unsafe.Pointer(cDBName))
|
|
1918
|
+
|
|
1919
|
+
cArg := C.sqlite3_int64(arg)
|
|
1920
|
+
rv := C.sqlite3_file_control(c.db, cDBName, C.int(op), unsafe.Pointer(&cArg))
|
|
1921
|
+
if rv != C.SQLITE_OK {
|
|
1922
|
+
return c.lastError()
|
|
1923
|
+
}
|
|
1924
|
+
return nil
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1895
1927
|
// Close the statement.
|
|
1896
1928
|
func (s *SQLiteStmt) Close() error {
|
|
1897
1929
|
s.mu.Lock()
|
|
@@ -2007,14 +2039,12 @@ func (s *SQLiteStmt) query(ctx context.Context, args []driver.NamedValue) (drive
|
|
|
2007
2039
|
|
|
2008
2040
|
rows := &SQLiteRows{
|
|
2009
2041
|
s: s,
|
|
2010
|
-
nc:
|
|
2042
|
+
nc: int32(C.sqlite3_column_count(s.s)),
|
|
2043
|
+
cls: s.cls,
|
|
2011
2044
|
cols: nil,
|
|
2012
2045
|
decltype: nil,
|
|
2013
|
-
cls: s.cls,
|
|
2014
|
-
closed: false,
|
|
2015
2046
|
ctx: ctx,
|
|
2016
2047
|
}
|
|
2017
|
-
runtime.SetFinalizer(rows, (*SQLiteRows).Close)
|
|
2018
2048
|
|
|
2019
2049
|
return rows, nil
|
|
2020
2050
|
}
|
|
@@ -2111,24 +2141,28 @@ func (s *SQLiteStmt) Readonly() bool {
|
|
|
2111
2141
|
|
|
2112
2142
|
// Close the rows.
|
|
2113
2143
|
func (rc *SQLiteRows) Close() error {
|
|
2114
|
-
rc.
|
|
2115
|
-
|
|
2116
|
-
|
|
2144
|
+
rc.closemu.Lock()
|
|
2145
|
+
defer rc.closemu.Unlock()
|
|
2146
|
+
s := rc.s
|
|
2147
|
+
if s == nil {
|
|
2148
|
+
return nil
|
|
2149
|
+
}
|
|
2150
|
+
rc.s = nil // remove reference to SQLiteStmt
|
|
2151
|
+
s.mu.Lock()
|
|
2152
|
+
if s.closed {
|
|
2153
|
+
s.mu.Unlock()
|
|
2117
2154
|
return nil
|
|
2118
2155
|
}
|
|
2119
|
-
rc.closed = true
|
|
2120
2156
|
if rc.cls {
|
|
2121
|
-
|
|
2122
|
-
return
|
|
2157
|
+
s.mu.Unlock()
|
|
2158
|
+
return s.Close()
|
|
2123
2159
|
}
|
|
2124
|
-
rv := C.sqlite3_reset(
|
|
2160
|
+
rv := C.sqlite3_reset(s.s)
|
|
2125
2161
|
if rv != C.SQLITE_OK {
|
|
2126
|
-
|
|
2127
|
-
return
|
|
2162
|
+
s.mu.Unlock()
|
|
2163
|
+
return s.c.lastError()
|
|
2128
2164
|
}
|
|
2129
|
-
|
|
2130
|
-
rc.s = nil
|
|
2131
|
-
runtime.SetFinalizer(rc, nil)
|
|
2165
|
+
s.mu.Unlock()
|
|
2132
2166
|
return nil
|
|
2133
2167
|
}
|
|
2134
2168
|
|
|
@@ -2136,9 +2170,9 @@ func (rc *SQLiteRows) Close() error {
|
|
|
2136
2170
|
func (rc *SQLiteRows) Columns() []string {
|
|
2137
2171
|
rc.s.mu.Lock()
|
|
2138
2172
|
defer rc.s.mu.Unlock()
|
|
2139
|
-
if rc.s.s != nil && rc.nc != len(rc.cols) {
|
|
2173
|
+
if rc.s.s != nil && int(rc.nc) != len(rc.cols) {
|
|
2140
2174
|
rc.cols = make([]string, rc.nc)
|
|
2141
|
-
for i := 0; i < rc.nc; i++ {
|
|
2175
|
+
for i := 0; i < int(rc.nc); i++ {
|
|
2142
2176
|
rc.cols[i] = C.GoString(C.sqlite3_column_name(rc.s.s, C.int(i)))
|
|
2143
2177
|
}
|
|
2144
2178
|
}
|
|
@@ -2148,7 +2182,7 @@ func (rc *SQLiteRows) Columns() []string {
|
|
|
2148
2182
|
func (rc *SQLiteRows) declTypes() []string {
|
|
2149
2183
|
if rc.s.s != nil && rc.decltype == nil {
|
|
2150
2184
|
rc.decltype = make([]string, rc.nc)
|
|
2151
|
-
for i := 0; i < rc.nc; i++ {
|
|
2185
|
+
for i := 0; i < int(rc.nc); i++ {
|
|
2152
2186
|
rc.decltype[i] = strings.ToLower(C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))))
|
|
2153
2187
|
}
|
|
2154
2188
|
}
|
|
@@ -12,7 +12,11 @@ package sqlite3
|
|
|
12
12
|
#cgo CFLAGS: -DSQLITE_ENABLE_UNLOCK_NOTIFY
|
|
13
13
|
|
|
14
14
|
#include <stdlib.h>
|
|
15
|
+
#ifndef USE_LIBSQLITE3
|
|
15
16
|
#include "sqlite3-binding.h"
|
|
17
|
+
#else
|
|
18
|
+
#include <sqlite3.h>
|
|
19
|
+
#endif
|
|
16
20
|
|
|
17
21
|
extern void unlock_notify_callback(void *arg, int argc);
|
|
18
22
|
*/
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright {yyyy} {name of copyright owner}
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2016 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
package goid
|
|
17
|
+
|
|
18
|
+
import (
|
|
19
|
+
"bytes"
|
|
20
|
+
"runtime"
|
|
21
|
+
"strconv"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
func ExtractGID(s []byte) int64 {
|
|
25
|
+
s = s[len("goroutine "):]
|
|
26
|
+
s = s[:bytes.IndexByte(s, ' ')]
|
|
27
|
+
gid, _ := strconv.ParseInt(string(s), 10, 64)
|
|
28
|
+
return gid
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Parse the goid from runtime.Stack() output. Slow, but it works.
|
|
32
|
+
func getSlow() int64 {
|
|
33
|
+
var buf [64]byte
|
|
34
|
+
return ExtractGID(buf[:runtime.Stack(buf[:], false)])
|
|
35
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2018 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
//go:build gccgo
|
|
17
|
+
// +build gccgo
|
|
18
|
+
|
|
19
|
+
package goid
|
|
20
|
+
|
|
21
|
+
//extern runtime.getg
|
|
22
|
+
func getg() *g
|
|
23
|
+
|
|
24
|
+
func Get() int64 {
|
|
25
|
+
return getg().goid
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2015 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
// +build !go1.4
|
|
17
|
+
|
|
18
|
+
#include <runtime.h>
|
|
19
|
+
|
|
20
|
+
void ·Get(int64 ret) {
|
|
21
|
+
ret = g->goid;
|
|
22
|
+
USED(&ret);
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2015 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
//go:build !go1.4
|
|
17
|
+
// +build !go1.4
|
|
18
|
+
|
|
19
|
+
package goid
|
|
20
|
+
|
|
21
|
+
// Get returns the id of the current goroutine.
|
|
22
|
+
func Get() int64
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2015 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
//go:build go1.4 && !go1.5
|
|
17
|
+
// +build go1.4,!go1.5
|
|
18
|
+
|
|
19
|
+
package goid
|
|
20
|
+
|
|
21
|
+
import "unsafe"
|
|
22
|
+
|
|
23
|
+
var pointerSize = unsafe.Sizeof(uintptr(0))
|
|
24
|
+
|
|
25
|
+
// Backdoor access to runtime·getg().
|
|
26
|
+
func getg() uintptr // in goid_go1.4.s
|
|
27
|
+
|
|
28
|
+
// Get returns the id of the current goroutine.
|
|
29
|
+
func Get() int64 {
|
|
30
|
+
// The goid is the 16th field in the G struct where each field is a
|
|
31
|
+
// pointer, uintptr or padded to that size. See runtime.h from the
|
|
32
|
+
// Go sources. I'm not aware of a cleaner way to determine the
|
|
33
|
+
// offset.
|
|
34
|
+
return *(*int64)(unsafe.Pointer(getg() + 16*pointerSize))
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2014 The Go Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
// Assembly to get into package runtime without using exported symbols.
|
|
6
|
+
// See https://github.com/golang/go/blob/release-branch.go1.4/misc/cgo/test/backdoor/thunk.s
|
|
7
|
+
|
|
8
|
+
// +build amd64 amd64p32 arm 386
|
|
9
|
+
// +build go1.4,!go1.5
|
|
10
|
+
|
|
11
|
+
#include "textflag.h"
|
|
12
|
+
|
|
13
|
+
#ifdef GOARCH_arm
|
|
14
|
+
#define JMP B
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
TEXT ·getg(SB),NOSPLIT,$0-0
|
|
18
|
+
JMP runtime·getg(SB)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright 2016 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
//go:build (386 || amd64 || amd64p32 || arm || arm64 || s390x) && gc && go1.5
|
|
17
|
+
// +build 386 amd64 amd64p32 arm arm64 s390x
|
|
18
|
+
// +build gc
|
|
19
|
+
// +build go1.5
|
|
20
|
+
|
|
21
|
+
package goid
|
|
22
|
+
|
|
23
|
+
// Defined in goid_go1.5.s.
|
|
24
|
+
func getg() *g
|
|
25
|
+
|
|
26
|
+
func Get() int64 {
|
|
27
|
+
return getg().goid
|
|
28
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2021 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
// Assembly to mimic runtime.getg.
|
|
17
|
+
|
|
18
|
+
//go:build (386 || amd64 || amd64p32 || arm || arm64 || s390x) && gc && go1.5
|
|
19
|
+
// +build 386 amd64 amd64p32 arm arm64 s390x
|
|
20
|
+
// +build gc
|
|
21
|
+
// +build go1.5
|
|
22
|
+
|
|
23
|
+
#include "textflag.h"
|
|
24
|
+
|
|
25
|
+
// func getg() *g
|
|
26
|
+
TEXT ·getg(SB),NOSPLIT,$0-8
|
|
27
|
+
#ifdef GOARCH_386
|
|
28
|
+
MOVL (TLS), AX
|
|
29
|
+
MOVL AX, ret+0(FP)
|
|
30
|
+
#endif
|
|
31
|
+
#ifdef GOARCH_amd64
|
|
32
|
+
MOVQ (TLS), AX
|
|
33
|
+
MOVQ AX, ret+0(FP)
|
|
34
|
+
#endif
|
|
35
|
+
#ifdef GOARCH_arm
|
|
36
|
+
MOVW g, ret+0(FP)
|
|
37
|
+
#endif
|
|
38
|
+
#ifdef GOARCH_arm64
|
|
39
|
+
MOVD g, ret+0(FP)
|
|
40
|
+
#endif
|
|
41
|
+
#ifdef GOARCH_s390x
|
|
42
|
+
MOVD g, ret+0(FP)
|
|
43
|
+
#endif
|
|
44
|
+
RET
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright 2016 Peter Mattis.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
12
|
+
// implied. See the License for the specific language governing
|
|
13
|
+
// permissions and limitations under the License. See the AUTHORS file
|
|
14
|
+
// for names of contributors.
|
|
15
|
+
|
|
16
|
+
//go:build (go1.4 && !go1.5 && !amd64 && !amd64p32 && !arm && !386) || (go1.5 && !386 && !amd64 && !amd64p32 && !arm && !arm64 && !s390x)
|
|
17
|
+
// +build go1.4,!go1.5,!amd64,!amd64p32,!arm,!386 go1.5,!386,!amd64,!amd64p32,!arm,!arm64,!s390x
|
|
18
|
+
|
|
19
|
+
package goid
|
|
20
|
+
|
|
21
|
+
// Get returns the id of the current goroutine.
|
|
22
|
+
func Get() int64 {
|
|
23
|
+
return getSlow()
|
|
24
|
+
}
|