Skip to content

Commit

Permalink
Merge pull request #93 from spk121/guile-3.0.4
Browse files Browse the repository at this point in the history
Guile 3.0.4
  • Loading branch information
spk121 authored Dec 18, 2020
2 parents 858e062 + efd317d commit 9a1a317
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 6 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ubuntu-bionic-guile-2.2.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions src/gig_closure.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -142,15 +142,15 @@ 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;
gssize pos = 0, inc;
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));
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/gig_function.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(*req + *opt, SCM_BOOL_F);

gsize offset, length;
gssize pos = 0, inc;
Expand Down
2 changes: 1 addition & 1 deletion src/gig_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/gig_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 == 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

0 comments on commit 9a1a317

Please sign in to comment.