From 3b64f2535643151956e410707802addc975d549a Mon Sep 17 00:00:00 2001 From: LordYuuma Date: Mon, 28 Sep 2020 21:45:38 +0200 Subject: [PATCH 1/5] Adapt to new bitvector API --- src/gig_closure.c | 8 ++++---- src/gig_function.c | 2 +- src/gig_object.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gig_closure.c b/src/gig_closure.c index 02adceff..6c79e7f0 100644 --- a/src/gig_closure.c +++ b/src/gig_closure.c @@ -67,7 +67,7 @@ _gig_closure_marshal(GClosure *closure, GValue *ret, guint n_params, const GValu scm_misc_error(NULL, "~S returned more values than we can unpack", scm_list_1(pc->callback)); - gsize bit_count = scm_to_size_t(scm_bit_count(SCM_BOOL_T, pc->inout_mask)); + gsize bit_count = scm_c_bitvector_count(pc->inout_mask); if (bit_count == 0 && nvalues == 1) /* fast path */ return; @@ -142,7 +142,7 @@ invoke_closure(SCM closure, SCM return_type, SCM inout_mask, SCM args) g_closure_invoke(real_closure, retval, nargs, params, NULL); ret = gig_type_transfer_object(G_TYPE_VALUE, retval, GI_TRANSFER_EVERYTHING); - if (scm_is_true(scm_bitvector_p(inout_mask))) { + if (scm_is_bitvector(inout_mask)) { ret = scm_cons(ret, SCM_EOL); gsize idx = 0, offset, length; @@ -150,7 +150,7 @@ invoke_closure(SCM closure, SCM return_type, SCM inout_mask, SCM args) scm_t_array_handle handle; const guint32 *bits; - gsize bit_count = scm_to_size_t(scm_bit_count(SCM_BOOL_T, inout_mask)); + gsize bit_count = scm_c_bitvector_count(inout_mask); if (bit_count > nargs) scm_misc_error(NULL, "~S returned fewer values than we should unpack", scm_list_1(closure)); @@ -187,7 +187,7 @@ procedure_to_closure(SCM procedure, SCM inout_mask) SCM_ASSERT_TYPE(scm_is_true(scm_procedure_p(procedure)), procedure, SCM_ARG1, "procedure->closure", "procedure"); SCM_ASSERT_TYPE(SCM_UNBNDP(inout_mask) || - scm_is_true(scm_bitvector_p(inout_mask)), procedure, SCM_ARG2, + scm_is_bitvector(inout_mask), procedure, SCM_ARG2, "procedure->closure", "bitvector"); GClosure *cls = gig_closure_new(procedure, inout_mask); g_closure_ref(cls); diff --git a/src/gig_function.c b/src/gig_function.c index 8d156e47..2a9b2bff 100644 --- a/src/gig_function.c +++ b/src/gig_function.c @@ -233,7 +233,7 @@ proc4signal(GISignalInfo *info, const gchar *name, SCM self_type, int *req, int // use base_info name without transformations, otherwise we could screw things up values[0] = scm_from_utf8_string(g_base_info_get_name(info)); - values[1] = scm_make_bitvector(scm_from_int(*req + *opt), SCM_BOOL_F); + values[1] = scm_c_make_bitvector(scm_from_int(*req + *opt), SCM_BOOL_F); gsize offset, length; gssize pos = 0, inc; diff --git a/src/gig_object.c b/src/gig_object.c index cd91980e..e27d698b 100644 --- a/src/gig_object.c +++ b/src/gig_object.c @@ -501,7 +501,7 @@ gig_i_scm_emit(SCM self, SCM signal, SCM s_detail, SCM args) ret = scm_cons(gig_value_as_scm(&retval, FALSE), ret); SCM output_mask = gig_signal_ref(signal, GIG_SIGNAL_SLOT_OUTPUT_MASK); - if (scm_is_true(scm_bitvector_p(output_mask))) { + if (scm_is_bitvector(output_mask)) { gsize offset, length; gssize pos = 0, inc; scm_t_array_handle handle; From b39c4898515db04aa3ed0e5d6f292ee4a9adf4ba Mon Sep 17 00:00:00 2001 From: LordYuuma Date: Sun, 25 Oct 2020 16:40:03 +0100 Subject: [PATCH 2/5] Add backwards compatibility with 3.0.2 --- src/gig_function.c | 2 +- src/gig_util.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gig_function.c b/src/gig_function.c index 2a9b2bff..e3960e30 100644 --- a/src/gig_function.c +++ b/src/gig_function.c @@ -233,7 +233,7 @@ proc4signal(GISignalInfo *info, const gchar *name, SCM self_type, int *req, int // use base_info name without transformations, otherwise we could screw things up values[0] = scm_from_utf8_string(g_base_info_get_name(info)); - values[1] = scm_c_make_bitvector(scm_from_int(*req + *opt), SCM_BOOL_F); + values[1] = scm_c_make_bitvector(*req + *opt, SCM_BOOL_F); gsize offset, length; gssize pos = 0, inc; diff --git a/src/gig_util.h b/src/gig_util.h index 5b4d9df4..5fab744e 100644 --- a/src/gig_util.h +++ b/src/gig_util.h @@ -49,3 +49,7 @@ G_END_DECLS #define gig_debug_load(...) gig_debug_internal(G_LOG_LEVEL_DEBUG, "load", __VA_ARGS__) #define gig_warning_load(...) gig_debug_internal(G_LOG_LEVEL_WARNING, "load", __VA_ARGS__) #define gig_critical_load(...) gig_debug_internal(G_LOG_LEVEL_CRITICAL, "load", __VA_ARGS__) + +#if SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION <= 4 +#define scm_c_bitvector_count(x) scm_to_size_t(scm_bit_count(SCM_BOOL_T, (x))) +#endif From 10c86306914bf824885f32be291408f44fd8e26f Mon Sep 17 00:00:00 2001 From: LordYuuma Date: Sun, 25 Oct 2020 16:45:44 +0100 Subject: [PATCH 3/5] Deprecated in 3.0.4 --- src/gig_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gig_util.h b/src/gig_util.h index 5fab744e..b9800b94 100644 --- a/src/gig_util.h +++ b/src/gig_util.h @@ -50,6 +50,6 @@ G_END_DECLS #define gig_warning_load(...) gig_debug_internal(G_LOG_LEVEL_WARNING, "load", __VA_ARGS__) #define gig_critical_load(...) gig_debug_internal(G_LOG_LEVEL_CRITICAL, "load", __VA_ARGS__) -#if SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION <= 4 +#if SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION < 4 #define scm_c_bitvector_count(x) scm_to_size_t(scm_bit_count(SCM_BOOL_T, (x))) #endif From b1d3529d3bf4192c53fae8564773d8c8a143efce Mon Sep 17 00:00:00 2001 From: LordYuuma Date: Fri, 18 Dec 2020 15:01:39 +0100 Subject: [PATCH 4/5] Guile 2.2 compatibility. --- src/gig_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gig_util.h b/src/gig_util.h index b9800b94..4ec9d763 100644 --- a/src/gig_util.h +++ b/src/gig_util.h @@ -50,6 +50,6 @@ G_END_DECLS #define gig_warning_load(...) gig_debug_internal(G_LOG_LEVEL_WARNING, "load", __VA_ARGS__) #define gig_critical_load(...) gig_debug_internal(G_LOG_LEVEL_CRITICAL, "load", __VA_ARGS__) -#if SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION < 4 +#if (SCM_MAJOR_VERSION == 2) || (SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION < 4) #define scm_c_bitvector_count(x) scm_to_size_t(scm_bit_count(SCM_BOOL_T, (x))) #endif From efd317dba99bcaa733d7afd5e9b050fab254fe0f Mon Sep 17 00:00:00 2001 From: LordYuuma Date: Fri, 18 Dec 2020 16:04:13 +0100 Subject: [PATCH 5/5] Add Guile 2.2 workflow --- .github/workflows/ubuntu-bionic-guile-2.2.yml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/ubuntu-bionic-guile-2.2.yml diff --git a/.github/workflows/ubuntu-bionic-guile-2.2.yml b/.github/workflows/ubuntu-bionic-guile-2.2.yml new file mode 100644 index 00000000..ec6186d2 --- /dev/null +++ b/.github/workflows/ubuntu-bionic-guile-2.2.yml @@ -0,0 +1,52 @@ +name: Ubuntu Bionic w/ Guile 2.2 + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: env + run: export LANG=C.UTF-8 TERM=dumb VERBOSE=true DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles + - name: install packages + run: sudo apt-get install -y libgirepository1.0-dev guile-2.2-dev gnulib texlive + - name: look for guile + run: ls -l /usr/bin/gu* + - name: make dist directory + run: mkdir `pwd`/dist + - name: bootstrap + run: ./bootstrap + - name: configure + run: GUILD=/usr/bin/guild ./configure --enable-hardening --with-gnu-filesystem-hierarchy --prefix=`pwd`/dist + - name: make + run: make + - name: make check + run: make check + - name: make install + run: make install + - name: make distcheck + run: GUILD=/usr/bin/guild make distcheck + - name: Archive production artifacts + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist + - name: Uncompress tarballs + run: gunzip *.tar.gz + - name: Archive tarball + uses: actions/upload-artifact@v2 + with: + name: tarball + path: guile_gi*tar + - name: Archive test logs + uses: actions/upload-artifact@v2 + with: + name: logs + path: test-suite.log