File tree Expand file tree Collapse file tree 6 files changed +37
-10
lines changed Expand file tree Collapse file tree 6 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 1+ # Set update schedule for GitHub Actions
2+
3+ version : 2
4+ updates :
5+
6+ - package-ecosystem : " github-actions"
7+ directory : " /"
8+ schedule :
9+ # Check for updates to GitHub Actions every week
10+ interval : " weekly"
Original file line number Diff line number Diff line change @@ -46,17 +46,17 @@ jobs:
4646 name : Build
4747 runs-on : ${{ matrix.os }}
4848 steps :
49- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
49+ - uses : actions/checkout@v4
5050 name : Checkout
5151
52- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
52+ - uses : actions/checkout@v4
5353 name : Checkout bitcoin-core/secp256k1
5454 with :
5555 repository : bitcoin-core/secp256k1
56- ref : 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40
56+ ref : v0.5.1
5757 path : lib/secp256k1
5858
59- - uses : haskell-actions/setup@64aa5146ed5bd91f181552b8b5fbe50fbd2bd3fe
59+ - uses : haskell-actions/setup@v2
6060 name : Setup Haskell
6161 id : setup-haskell
6262 with :
6565
6666 - name : Cache
6767 id : cache
68- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
68+ uses : actions/cache@v4.2.3
6969 with :
7070 path : |
7171 ${{ steps.setup-haskell.outputs.stack-root }}
Original file line number Diff line number Diff line change 1+ #include <secp256k1.h>
2+
3+ /* Returns the adress of the library's built-in context */
4+ const secp256k1_context * hs_secp256k1_content_static (void )
5+ {
6+ return secp256k1_context_static ;
7+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ cabal-version: 1.12
55-- see: https://github.com/sol/hpack
66
77name : libsecp256k1
8- version : 0.2 .1
8+ version : 0.3 .1
99synopsis : Bindings for secp256k1
1010description : Sign and verify signatures using the secp256k1 library .
1111category : Crypto
@@ -35,6 +35,8 @@ library
3535 Paths_libsecp256k1
3636 hs-source-dirs :
3737 src
38+ c-sources :
39+ cbits/hs_secp256k1_shim.c
3840 default-extensions :
3941 ImportQualifiedPost
4042 pkgconfig-depends :
Original file line number Diff line number Diff line change 11name : libsecp256k1
2- version : 0.2 .1
2+ version : 0.3 .1
33synopsis : Bindings for secp256k1
44description : Sign and verify signatures using the secp256k1 library.
55category : Crypto
@@ -29,6 +29,10 @@ library:
2929 source-dirs : src
3030 pkg-config-dependencies :
3131 - libsecp256k1
32+ hs-source-dirs :
33+ src
34+ c-sources :
35+ cbits/hs_secp256k1_shim.c
3236tests :
3337 spec :
3438 main : Main.hs
Original file line number Diff line number Diff line change @@ -302,8 +302,12 @@ foreign import capi safe "secp256k1.h secp256k1_context_destroy"
302302-- type serialization/parsing functions which require a context object to maintain
303303-- API consistency, but currently do not require expensive precomputations or dynamic
304304-- allocations.
305- foreign import ccall unsafe " secp256k1.h secp256k1_context_no_precomp"
306- contextNoPrecomp :: Ctx
305+ foreign import ccall unsafe " hs_secp256k1_content_static"
306+ c_contextStatic :: IO Ctx
307+
308+ {-# NOINLINE contextStatic #-}
309+ contextStatic :: Ctx
310+ contextStatic = unsafePerformIO c_contextStatic
307311
308312
309313-- | Copy a secp256k1 context object into caller-provided memory.
@@ -445,7 +449,7 @@ foreign import capi safe "secp256k1.h secp256k1_context_set_error_callback"
445449-- undefined.
446450--
447451-- When this function has not been called (or called with fn==NULL), then the
448- -- default handler will be used. The library provides a default handler which
452+ -- default handler will be used. The library provides a default handler which
449453-- writes the message to stderr and calls abort. This default handler can be
450454-- replaced at link time if the preprocessor macro
451455-- USE_EXTERNAL_DEFAULT_CALLBACKS is defined, which is the case if the build
You can’t perform that action at this time.
0 commit comments