slidge-whatsapp 0.2.6__cp313-cp313-manylinux_2_36_aarch64.whl → 0.3.0__cp313-cp313-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.

Files changed (258) hide show
  1. slidge_whatsapp/contact.py +15 -3
  2. slidge_whatsapp/event.go +152 -50
  3. slidge_whatsapp/gateway.go +7 -63
  4. slidge_whatsapp/gateway.py +2 -3
  5. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +180 -163
  6. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +145 -131
  8. slidge_whatsapp/generated/whatsapp.c +1669 -1397
  9. slidge_whatsapp/generated/whatsapp.go +1209 -1098
  10. slidge_whatsapp/generated/whatsapp.py +1175 -1050
  11. slidge_whatsapp/generated/whatsapp_go.h +180 -163
  12. slidge_whatsapp/go.mod +18 -15
  13. slidge_whatsapp/go.sum +38 -32
  14. slidge_whatsapp/group.py +34 -30
  15. slidge_whatsapp/media/media.go +6 -2
  16. slidge_whatsapp/session.go +34 -17
  17. slidge_whatsapp/session.py +46 -14
  18. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  32. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  33. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  34. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  35. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  36. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  37. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  38. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  39. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  41. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  42. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
  43. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  44. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  45. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  59. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
  60. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
  61. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
  62. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  63. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  64. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
  65. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  66. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  67. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  68. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  69. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  70. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  71. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  72. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  73. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  74. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  75. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  76. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  77. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  78. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  79. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  80. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  81. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
  83. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +1 -6
  84. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
  85. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +104 -0
  86. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
  87. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  88. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
  89. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  90. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
  91. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  92. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  93. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  94. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
  95. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  96. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +2 -1
  97. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +79 -45
  98. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +13 -6
  99. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +19 -12
  100. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +26 -6
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +99 -27
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +54 -26
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +1 -0
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +208 -57
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +17 -8
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  132. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  133. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  134. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  135. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  136. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  137. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +16 -4
  138. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +3 -0
  139. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  140. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  141. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +46 -10
  142. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +4 -0
  143. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8975 -11209
  144. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +193 -421
  145. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
  146. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
  147. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  148. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  149. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  150. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +952 -0
  151. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +88 -0
  152. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1143 -463
  153. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +60 -0
  154. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
  155. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
  156. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +11 -3
  157. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
  158. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +20 -7
  159. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  160. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  161. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +10 -2
  162. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +38 -21
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +1 -0
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +9 -6
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +4 -2
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +5 -1
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +1 -0
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +14 -8
  177. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  178. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
  179. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +8 -8
  180. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
  181. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
  182. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
  183. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
  184. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  185. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  186. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
  187. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  188. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  189. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  190. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  191. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  192. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  193. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  194. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  195. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  196. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  197. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  198. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  199. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  200. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  201. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  202. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  203. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  204. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  205. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  206. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  207. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  208. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  209. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  210. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  211. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  212. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  213. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  214. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  215. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  216. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  217. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  218. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  219. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  220. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  221. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  222. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  223. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  224. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  225. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  226. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  227. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  228. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  229. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  230. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  231. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  232. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  233. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  234. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  235. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  236. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
  237. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
  238. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  239. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  240. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
  241. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  242. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  243. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
  244. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  245. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  246. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  247. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  248. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
  249. slidge_whatsapp/vendor/modules.txt +57 -23
  250. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/METADATA +5 -4
  251. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/RECORD +254 -174
  252. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/WHEEL +1 -1
  253. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  254. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
  255. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
  256. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
  257. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/entry_points.txt +0 -0
  258. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info/licenses}/LICENSE +0 -0
@@ -20,3 +20,13 @@ func loadLibrary() uintptr {
20
20
 
21
21
  return handle
22
22
  }
23
+
24
+ // procAddress returns the address of symbol name.
25
+ func procAddress(handle uintptr, procName string) uintptr {
26
+ addr, err := purego.Dlsym(handle, procName)
27
+ if err != nil {
28
+ panic(fmt.Errorf("cannot get proc address for %s: %w", procName, err))
29
+ }
30
+
31
+ return addr
32
+ }
@@ -5,6 +5,8 @@ package fitz
5
5
  import (
6
6
  "fmt"
7
7
  "syscall"
8
+
9
+ "golang.org/x/sys/windows"
8
10
  )
9
11
 
10
12
  const (
@@ -20,3 +22,13 @@ func loadLibrary() uintptr {
20
22
 
21
23
  return uintptr(handle)
22
24
  }
25
+
26
+ // procAddress returns the address of symbol name.
27
+ func procAddress(handle uintptr, procName string) uintptr {
28
+ addr, err := windows.GetProcAddress(windows.Handle(handle), procName)
29
+ if err != nil {
30
+ panic(fmt.Errorf("cannot get proc address for %s: %w", procName, err))
31
+ }
32
+
33
+ return addr
34
+ }
@@ -4,9 +4,7 @@
4
4
  # Binaries for programs and plugins
5
5
  *.exe
6
6
  *.exe~
7
- *.dll
8
7
  *.so
9
- *.dylib
10
8
 
11
9
  # Test binary, built with `go test -c`
12
10
  *.test
@@ -5,19 +5,45 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.1] - 2025-07-29
9
+
10
+ ### Fixed
11
+
12
+ - `DefaultAbi` had a wrong value on Windows ARM64.
13
+ - Missing extra field attached to `Cif` (Windows/macOS ARM64).
14
+ - Embedded libffi binaries have been updated to 3.5.1.
15
+
16
+ ## [0.5.0] - 2025-06-10
17
+
18
+ ### Added
19
+
20
+ - The libffi shared libraries for Windows AMD64 and macOS AMD64/ARM64 are now embedded into this library ([#12](https://github.com/JupiterRider/ffi/issues/12)).
21
+ The build tag `ffi_no_embed` or the environment variable `FFI_NO_EMBED=1` can disable this feature.
22
+ - You can now retrieve the used libffi version (requires libffi 3.5.0 or newer):
23
+ - `func GetVersion() string`
24
+ - `func GetVersionNumber() uint64`
25
+ - Function `func GetStructOffsets(abi Abi, structType *Type, offsets *uint64) Status` implemented.
26
+
27
+ ### Changed
28
+
29
+ - Dependency `github.com/ebitengine/purego` updated.
30
+
8
31
  ## [0.4.1] - 2025-05-12
9
32
 
10
33
  ### Fixed
34
+
11
35
  - The dependency `github.com/ebitengine/purego` had to be upgraded to version 0.8.3 due to a [bug](https://github.com/golang/go/issues/73617) in Go 1.23.9 and 1.24.3.
12
36
 
13
37
  ## [0.4.0] - 2025-03-13
14
38
 
15
39
  ### Changed
40
+
16
41
  - `Fun.Call` panics now, if the number of arguments doesn't match the prepared Cif.
17
42
 
18
43
  ## [0.3.0] - 2025-01-18
19
44
 
20
45
  ### Added
46
+
21
47
  - libffi's closure API has been implemented, which allows you to create C functions at runtime:
22
48
  - `func ClosureAlloc(size uintptr, code *unsafe.Pointer) *Closure`
23
49
  - `func ClosureFree(writable *Closure)`
@@ -33,11 +59,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
33
59
  - [Changelog](https://github.com/JupiterRider/ffi/blob/main/CHANGELOG.md) file added.
34
60
 
35
61
  ### Changed
62
+
36
63
  - On Linux, libffi.so.7 was loaded when libffi.so.8 could not be found. This is no longer the case.
37
64
 
38
65
  ## [0.2.2] - 2024-12-22
39
66
 
40
67
  ### Added
68
+
41
69
  - Function `func NewType(elements ...*Type) Type` added.
42
70
 
43
71
  ## [0.2.1] - 2024-10-30
@@ -59,6 +87,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
59
87
 
60
88
  - Dependencies `github.com/ebitengine/purego` and `golang.org/x/sys` updated.
61
89
 
90
+ [0.5.1]: https://github.com/JupiterRider/ffi/compare/v0.5.0...v0.5.1
91
+ [0.5.0]: https://github.com/JupiterRider/ffi/compare/v0.4.1...v0.5.0
62
92
  [0.4.1]: https://github.com/JupiterRider/ffi/compare/v0.4.0...v0.4.1
63
93
  [0.4.0]: https://github.com/JupiterRider/ffi/compare/v0.3.0...v0.4.0
64
94
  [0.3.0]: https://github.com/JupiterRider/ffi/compare/v0.2.2...v0.3.0
@@ -7,10 +7,15 @@ Comment: ffi
7
7
  Copyright: 2024-present JupiterRider
8
8
  License: Expat
9
9
 
10
- Files: ./examples/raylib/gopher-with-C-book.png
10
+ Files: examples/raylib/gopher-with-C-book.png
11
11
  Copyright: egonelbre
12
12
  License: CC0-1.0
13
13
 
14
+ Files: assets/libffi/*
15
+ Comment: libffi
16
+ Copyright: 1996-2025 Anthony Green, Red Hat, Inc. and others
17
+ License: Expat
18
+
14
19
  License: Expat
15
20
  Permission is hereby granted, free of charge, to any person obtaining
16
21
  a copy of this software and associated documentation files (the
@@ -6,8 +6,7 @@ A purego binding for libffi.
6
6
  ## Purpose
7
7
  You can use [purego](https://github.com/ebitengine/purego) to call C code without cgo. ffi provides extra functionality (e.g. passing and returning structs by value).
8
8
 
9
- ## Requirements
10
- ### OS/Architecture
9
+ ## Supported OS/Architecture
11
10
  - darwin/amd64
12
11
  - darwin/arm64
13
12
  - freebsd/amd64
@@ -17,37 +16,35 @@ You can use [purego](https://github.com/ebitengine/purego) to call C code withou
17
16
  - windows/amd64
18
17
  - windows/arm64
19
18
 
20
- ### Software
19
+ ## Software Requirements
21
20
  [libffi](https://github.com/libffi/libffi) is preinstalled on most distributions, because it also is a dependency of Python and Ruby. If not, you can install it explicitly:
22
21
 
23
- #### Arch Linux
22
+ ### Arch Linux
24
23
  ```sh
25
24
  sudo pacman -S libffi
26
25
  ```
27
26
 
28
- #### Debian 12, Ubuntu 22.04, Ubuntu 24.04
27
+ ### Debian 12, Ubuntu 22.04, Ubuntu 24.04
29
28
  ```sh
30
29
  sudo apt install libffi8
31
30
  ```
32
31
 
33
- #### FreeBSD
32
+ ### Fedora
33
+ ```sh
34
+ sudo dnf install libffi
35
+ ```
36
+
37
+ ### FreeBSD
34
38
  ```sh
35
39
  pkg install libffi
36
40
  ```
37
41
  Note: Use this `-gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"` build flag when cross compiling or having CGO_ENABLED set to 0 (FreeBSD only).
38
42
 
39
- #### Windows
40
- You need a `libffi-8.dll` next to the executable/root folder of your project or inside C:\Windows\System32. If you don't want to build libffi from source, you can find this dll for example inside the [Windows embeddable package](https://www.python.org/downloads/windows/) of Python.
43
+ ### Windows
44
+ The AMD64 version of libffi is already embedded into this library and gets extracted and loaded at runtime. This feature can be disabled by using the build tag `ffi_no_embed` or the environment variable `FFI_NO_EMBED=1`.
41
45
 
42
- #### macOS
43
- You can use [Homebrew](https://brew.sh/) to install libffi:
44
- ```sh
45
- brew install libffi
46
- ```
47
- Note: If dlopen can't find the libffi.8.dylib file, you can try setting this environment variable:
48
- ```sh
49
- export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/homebrew/opt/libffi/lib
50
- ```
46
+ ### macOS
47
+ No further requirements. The libffi binaries are embedded as well.
51
48
 
52
49
  ## Examples
53
50
  In this example we create our own library, which consists of two type definitions and one function:
@@ -1,4 +1,4 @@
1
- //go:build ((freebsd || linux || darwin) && arm64) || (windows && (amd64 || arm64))
1
+ //go:build ((freebsd || linux || darwin) && arm64) || (windows && amd64)
2
2
 
3
3
  package ffi
4
4
 
@@ -0,0 +1,7 @@
1
+ //go:build ((freebsd || linux || darwin) && amd64) || (windows && arm64)
2
+
3
+ package ffi
4
+
5
+ const (
6
+ DefaultAbi Abi = 2
7
+ )
@@ -0,0 +1,21 @@
1
+ libffi - Copyright (c) 1996-2025 Anthony Green, Red Hat, Inc and others.
2
+ See source files for details.
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ ``Software''), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ //go:build ((freebsd || linux || windows || darwin) && amd64) || ((freebsd || linux) && arm64)
2
+
3
+ package ffi
4
+
5
+ // Cif stands for "Call InterFace". It describes the signature of a function.
6
+ //
7
+ // Use [PrepCif] to initialize it.
8
+ type Cif struct {
9
+ Abi uint32
10
+ NArgs uint32
11
+ ArgTypes **Type
12
+ RType *Type
13
+ Bytes uint32
14
+ Flags uint32
15
+ }
@@ -0,0 +1,16 @@
1
+ //go:build windows || darwin
2
+
3
+ package ffi
4
+
5
+ // Cif stands for "Call InterFace". It describes the signature of a function.
6
+ //
7
+ // Use [PrepCif] to initialize it.
8
+ type Cif struct {
9
+ Abi uint32
10
+ NArgs uint32
11
+ ArgTypes **Type
12
+ RType *Type
13
+ Bytes uint32
14
+ Flags uint32
15
+ _ uint32
16
+ }
@@ -0,0 +1,49 @@
1
+ //go:build !ffi_no_embed && (darwin || (windows && amd64))
2
+
3
+ package ffi
4
+
5
+ import (
6
+ _ "embed"
7
+ "os"
8
+ "path/filepath"
9
+ )
10
+
11
+ const libffiVersion = "3.5.1"
12
+
13
+ //go:embed assets/libffi/LICENSE
14
+ var embeddedLicense []byte
15
+
16
+ func init() {
17
+ if os.Getenv("FFI_NO_EMBED") == "1" {
18
+ return
19
+ }
20
+
21
+ userCacheDir, err := os.UserCacheDir()
22
+ if err != nil {
23
+ return
24
+ }
25
+
26
+ destDir := filepath.Join(userCacheDir, "github.com/jupiterrider/ffi/libffi", libffiVersion)
27
+ destLib := filepath.Join(destDir, libname)
28
+ destLicense := filepath.Join(destDir, "LICENSE")
29
+
30
+ if os.MkdirAll(destDir, 0755) == nil {
31
+ if fileInfo, err := os.Stat(destLib); err != nil {
32
+ if os.IsNotExist(err) {
33
+ if os.WriteFile(destLib, embeddedLib, 0755) == nil {
34
+ filename = destLib
35
+ }
36
+ }
37
+ } else {
38
+ if fileInfo != nil && !fileInfo.IsDir() {
39
+ filename = destLib
40
+ }
41
+ }
42
+
43
+ if _, err := os.Stat(destLicense); err != nil {
44
+ if os.IsNotExist(err) {
45
+ os.WriteFile(destLicense, embeddedLicense, 0644)
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,10 @@
1
+ //go:build !ffi_no_embed
2
+
3
+ package ffi
4
+
5
+ import _ "embed"
6
+
7
+ const libname = "libffi.8.dylib"
8
+
9
+ //go:embed assets/libffi/darwin_amd64/libffi.8.dylib
10
+ var embeddedLib []byte
@@ -0,0 +1,10 @@
1
+ //go:build !ffi_no_embed
2
+
3
+ package ffi
4
+
5
+ import _ "embed"
6
+
7
+ const libname = "libffi.8.dylib"
8
+
9
+ //go:embed assets/libffi/darwin_arm64/libffi.8.dylib
10
+ var embeddedLib []byte
@@ -0,0 +1,10 @@
1
+ //go:build !ffi_no_embed
2
+
3
+ package ffi
4
+
5
+ import _ "embed"
6
+
7
+ const libname = "libffi-8.dll"
8
+
9
+ //go:embed assets/libffi/windows_amd64/libffi-8.dll
10
+ var embeddedLib []byte
@@ -8,7 +8,7 @@ import (
8
8
  "github.com/ebitengine/purego"
9
9
  )
10
10
 
11
- var prepCif, prepCifVar, call, closureAlloc, closureFree, prepClosureLoc uintptr
11
+ var prepCif, prepCifVar, call, closureAlloc, closureFree, prepClosureLoc, getStructOffsets, getVersion, getVersionNumber uintptr
12
12
 
13
13
  type Abi uint32
14
14
 
@@ -88,18 +88,6 @@ func NewType(elements ...*Type) Type {
88
88
  return Type{Type: Struct, Elements: &elements[0]}
89
89
  }
90
90
 
91
- // Cif stands for "Call InterFace". It describes the signature of a function.
92
- //
93
- // Use [PrepCif] to initialize it.
94
- type Cif struct {
95
- Abi uint32
96
- NArgs uint32
97
- ArgTypes **Type
98
- RType *Type
99
- Bytes uint32
100
- Flags uint32
101
- }
102
-
103
91
  // Closure can be used to create callbacks (function pointers) at runtime.
104
92
  //
105
93
  // Use [ClosureAlloc] for allocation and [PrepClosureLoc] for preparation.
@@ -270,3 +258,53 @@ func PrepClosureLoc(closure *Closure, cif *Cif, fun uintptr, userData, codeLoc u
270
258
  ret, _, _ := purego.SyscallN(prepClosureLoc, uintptr(unsafe.Pointer(closure)), uintptr(unsafe.Pointer(cif)), fun, uintptr(userData), uintptr(codeLoc))
271
259
  return Status(ret)
272
260
  }
261
+
262
+ // GetStructOffsets computes the offset of each element of the given structure type and sets the size and alignment.
263
+ //
264
+ // offsets is an optional out parameter (pointer to the first element of an array).
265
+ // The array's length should be equal to the number of struct fields.
266
+ func GetStructOffsets(abi Abi, structType *Type, offsets *uint64) Status {
267
+ ret, _, _ := purego.SyscallN(getStructOffsets, uintptr(abi), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(offsets)))
268
+ return Status(ret)
269
+ }
270
+
271
+ // GetVersion returns the version of the loaded libffi library (not the Go binding), or "" if not available.
272
+ //
273
+ // This function requires libffi 3.5.0 or newer.
274
+ func GetVersion() string {
275
+ if getVersion == 0 {
276
+ return ""
277
+ }
278
+ ret, _, _ := purego.SyscallN(getVersion)
279
+ if ret == 0 {
280
+ return ""
281
+ }
282
+
283
+ // The following logic converts the null-terminated C-style string to a Go string
284
+ // by determining the position of the trailing null byte:
285
+ p := *(**byte)(unsafe.Pointer(&ret))
286
+ i := 0
287
+ for ptr := unsafe.Pointer(p); *(*byte)(unsafe.Add(ptr, i)) != 0; i++ {
288
+ }
289
+ return string(unsafe.Slice(p, i))
290
+ }
291
+
292
+ // GetVersionNumber returns the version number (major*10000 + minor*100 + patch) of the loaded libffi library (not the Go binding),
293
+ // or 0 if not available.
294
+ //
295
+ // This function requires libffi 3.5.0 or newer.
296
+ //
297
+ // Example:
298
+ //
299
+ // version := ffi.GetVersionNumber()
300
+ // major := version / 10000
301
+ // minor := version / 100 % 100
302
+ // patch := version % 100
303
+ // fmt.Printf("%d.%d.%d\n", major, minor, patch)
304
+ func GetVersionNumber() uint64 {
305
+ if getVersionNumber == 0 {
306
+ return 0
307
+ }
308
+ ret, _, _ := purego.SyscallN(getVersionNumber)
309
+ return uint64(ret)
310
+ }
@@ -6,16 +6,19 @@ import (
6
6
  "runtime"
7
7
  )
8
8
 
9
- func init() {
10
- var filename string
9
+ // filename is the name or path to the libffi shared library.
10
+ var filename string
11
11
 
12
- switch runtime.GOOS {
13
- case "freebsd", "linux":
14
- filename = "libffi.so.8"
15
- case "windows":
16
- filename = "libffi-8.dll"
17
- case "darwin":
18
- filename = "libffi.8.dylib"
12
+ func init() {
13
+ if len(filename) == 0 {
14
+ switch runtime.GOOS {
15
+ case "freebsd", "linux":
16
+ filename = "libffi.so.8"
17
+ case "windows":
18
+ filename = "libffi-8.dll"
19
+ case "darwin":
20
+ filename = "libffi.8.dylib"
21
+ }
19
22
  }
20
23
 
21
24
  libffi, err := Load(filename)
@@ -52,4 +55,14 @@ func init() {
52
55
  if err != nil {
53
56
  panic(err)
54
57
  }
58
+
59
+ getStructOffsets, err = libffi.Get("ffi_get_struct_offsets")
60
+ if err != nil {
61
+ panic(err)
62
+ }
63
+
64
+ // Because ffi_get_version and ffi_get_version_number just exist since libffi 3.5.0, we don't panic here.
65
+ getVersion, _ = libffi.Get("ffi_get_version")
66
+
67
+ getVersionNumber, _ = libffi.Get("ffi_get_version_number")
55
68
  }
@@ -351,6 +351,8 @@ For example the TDM-GCC Toolchain can be found [here](https://jmeubank.github.io
351
351
 
352
352
  # User Authentication
353
353
 
354
+ ***This is deprecated***
355
+
354
356
  This package supports the SQLite User Authentication module.
355
357
 
356
358
  ## Compile