File tree 6 files changed +37
-10
lines changed 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:
46
46
name : Build
47
47
runs-on : ${{ matrix.os }}
48
48
steps :
49
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
49
+ - uses : actions/checkout@v4
50
50
name : Checkout
51
51
52
- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
52
+ - uses : actions/checkout@v4
53
53
name : Checkout bitcoin-core/secp256k1
54
54
with :
55
55
repository : bitcoin-core/secp256k1
56
- ref : 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40
56
+ ref : v0.5.1
57
57
path : lib/secp256k1
58
58
59
- - uses : haskell-actions/setup@64aa5146ed5bd91f181552b8b5fbe50fbd2bd3fe
59
+ - uses : haskell-actions/setup@v2
60
60
name : Setup Haskell
61
61
id : setup-haskell
62
62
with :
65
65
66
66
- name : Cache
67
67
id : cache
68
- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
68
+ uses : actions/cache@v4.2.3
69
69
with :
70
70
path : |
71
71
${{ 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
5
5
-- see: https://github.com/sol/hpack
6
6
7
7
name : libsecp256k1
8
- version : 0.2 .1
8
+ version : 0.3 .1
9
9
synopsis : Bindings for secp256k1
10
10
description : Sign and verify signatures using the secp256k1 library .
11
11
category : Crypto
@@ -35,6 +35,8 @@ library
35
35
Paths_libsecp256k1
36
36
hs-source-dirs :
37
37
src
38
+ c-sources :
39
+ cbits/hs_secp256k1_shim.c
38
40
default-extensions :
39
41
ImportQualifiedPost
40
42
pkgconfig-depends :
Original file line number Diff line number Diff line change 1
1
name : libsecp256k1
2
- version : 0.2 .1
2
+ version : 0.3 .1
3
3
synopsis : Bindings for secp256k1
4
4
description : Sign and verify signatures using the secp256k1 library.
5
5
category : Crypto
@@ -29,6 +29,10 @@ library:
29
29
source-dirs : src
30
30
pkg-config-dependencies :
31
31
- libsecp256k1
32
+ hs-source-dirs :
33
+ src
34
+ c-sources :
35
+ cbits/hs_secp256k1_shim.c
32
36
tests :
33
37
spec :
34
38
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"
302
302
-- type serialization/parsing functions which require a context object to maintain
303
303
-- API consistency, but currently do not require expensive precomputations or dynamic
304
304
-- 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
307
311
308
312
309
313
-- | Copy a secp256k1 context object into caller-provided memory.
@@ -445,7 +449,7 @@ foreign import capi safe "secp256k1.h secp256k1_context_set_error_callback"
445
449
-- undefined.
446
450
--
447
451
-- 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
449
453
-- writes the message to stderr and calls abort. This default handler can be
450
454
-- replaced at link time if the preprocessor macro
451
455
-- 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