Merge branch 'guile-stop-using-deprecated-aliases'

This commit is contained in:
Olly Betts 2022-08-04 10:41:35 +12:00
commit 7556ed0889
6 changed files with 20 additions and 15 deletions

View file

@ -67,6 +67,10 @@ jobs:
- SWIGLANG: go - SWIGLANG: go
VER: '1.17' VER: '1.17'
- SWIGLANG: guile - SWIGLANG: guile
- SWIGLANG: guile
VER: '2.2'
- SWIGLANG: guile
VER: '3.0'
- SWIGLANG: java - SWIGLANG: java
- SWIGLANG: javascript - SWIGLANG: javascript
ENGINE: node ENGINE: node

View file

@ -52,9 +52,10 @@ This section details guile-specific support in SWIG.
<p> <p>
SWIG works with Guile versions 1.8.x and 2.0.x. Support for version SWIG is known to work with Guile versions 2.0.x, 2.2.x and 3.0.x. We believe
1.6.x has been dropped. The last version of SWIG that still works with it still works with 1.8.x, but we're no longer able to easily test this.
Guile version 1.6.x is SWIG 2.0.9. Support for version 1.6.x has been dropped. The last version of SWIG that still
works with Guile version 1.6.x is SWIG 2.0.9.
<p> <p>
Note that starting with guile 2.0, the guile sources can be compiled for Note that starting with guile 2.0, the guile sources can be compiled for

View file

@ -19,6 +19,6 @@ SCM test_create()
SCM test_is_pointer(SCM val) SCM test_is_pointer(SCM val)
{ {
#define FUNC_NAME "test-is-pointer" #define FUNC_NAME "test-is-pointer"
return SCM_BOOL(SWIG_IsPointer(val)); return scm_from_bool(SWIG_IsPointer(val));
#undef FUNC_NAME #undef FUNC_NAME
} }

View file

@ -131,7 +131,7 @@ SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
else else
SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type); SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type);
if (!cdata || SCM_NULLP(cdata->goops_class) || swig_make_func == SCM_EOL ) { if (!cdata || scm_is_null(cdata->goops_class) || swig_make_func == SCM_EOL ) {
return smob; return smob;
} else { } else {
/* the scm_make() C function only handles the creation of gf, /* the scm_make() C function only handles the creation of gf,
@ -151,7 +151,7 @@ SWIGINTERN unsigned long
SWIG_Guile_PointerAddress(SCM object) SWIG_Guile_PointerAddress(SCM object)
{ {
SCM smob = SWIG_Guile_GetSmob(object); SCM smob = SWIG_Guile_GetSmob(object);
if (SCM_NULLP(smob)) return 0; if (scm_is_null(smob)) return 0;
else if (SCM_SMOB_PREDICATE(swig_tag, smob) else if (SCM_SMOB_PREDICATE(swig_tag, smob)
|| SCM_SMOB_PREDICATE(swig_collectable_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
|| SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) { || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
@ -164,7 +164,7 @@ SWIGINTERN swig_type_info *
SWIG_Guile_PointerType(SCM object) SWIG_Guile_PointerType(SCM object)
{ {
SCM smob = SWIG_Guile_GetSmob(object); SCM smob = SWIG_Guile_GetSmob(object);
if (SCM_NULLP(smob)) return NULL; if (scm_is_null(smob)) return NULL;
else if (SCM_SMOB_PREDICATE(swig_tag, smob) else if (SCM_SMOB_PREDICATE(swig_tag, smob)
|| SCM_SMOB_PREDICATE(swig_collectable_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
|| SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) { || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
@ -192,7 +192,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
swig_type_info *from; swig_type_info *from;
SCM smob = SWIG_Guile_GetSmob(s); SCM smob = SWIG_Guile_GetSmob(s);
if (SCM_NULLP(smob)) { if (scm_is_null(smob)) {
*result = NULL; *result = NULL;
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
#if SCM_MAJOR_VERSION >= 2 #if SCM_MAJOR_VERSION >= 2
@ -258,7 +258,7 @@ SWIGINTERN void
SWIG_Guile_MarkPointerNoncollectable(SCM s) SWIG_Guile_MarkPointerNoncollectable(SCM s)
{ {
SCM smob = SWIG_Guile_GetSmob(s); SCM smob = SWIG_Guile_GetSmob(s);
if (!SCM_NULLP(smob)) { if (!scm_is_null(smob)) {
if (SWIG_Guile_IsValidSmob(smob)) { if (SWIG_Guile_IsValidSmob(smob)) {
SCM_SET_CELL_TYPE(smob, swig_tag); SCM_SET_CELL_TYPE(smob, swig_tag);
} }
@ -271,7 +271,7 @@ SWIGINTERN void
SWIG_Guile_MarkPointerDestroyed(SCM s) SWIG_Guile_MarkPointerDestroyed(SCM s)
{ {
SCM smob = SWIG_Guile_GetSmob(s); SCM smob = SWIG_Guile_GetSmob(s);
if (!SCM_NULLP(smob)) { if (!scm_is_null(smob)) {
if (SWIG_Guile_IsValidSmob(smob)) { if (SWIG_Guile_IsValidSmob(smob)) {
SCM_SET_CELL_TYPE(smob, swig_destroyed_tag); SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
} }
@ -492,20 +492,20 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int i; int i;
int num_args_passed = 0; int num_args_passed = 0;
for (i = 0; i<reqargs; i++) { for (i = 0; i<reqargs; i++) {
if (!SCM_CONSP(rest)) if (!scm_is_pair(rest))
scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure")); scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure"));
*dest++ = SCM_CAR(rest); *dest++ = SCM_CAR(rest);
rest = SCM_CDR(rest); rest = SCM_CDR(rest);
num_args_passed++; num_args_passed++;
} }
for (i = 0; i<optargs && SCM_CONSP(rest); i++) { for (i = 0; i<optargs && scm_is_pair(rest); i++) {
*dest++ = SCM_CAR(rest); *dest++ = SCM_CAR(rest);
rest = SCM_CDR(rest); rest = SCM_CDR(rest);
num_args_passed++; num_args_passed++;
} }
for (; i<optargs; i++) for (; i<optargs; i++)
*dest++ = SCM_UNDEFINED; *dest++ = SCM_UNDEFINED;
if (!SCM_NULLP(rest)) if (!scm_is_null(rest))
scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure")); scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure"));
return num_args_passed; return num_args_passed;
} }

View file

@ -425,7 +425,7 @@ typedef unsigned long SCM;
%typecheck(SWIG_TYPECHECK_BOOL) %typecheck(SWIG_TYPECHECK_BOOL)
bool, bool&, const bool& bool, bool&, const bool&
{ {
$1 = SCM_BOOLP($input) ? 1 : 0; $1 = scm_is_bool($input) ? 1 : 0;
} }
%typecheck(SWIG_TYPECHECK_DOUBLE) %typecheck(SWIG_TYPECHECK_DOUBLE)

View file

@ -62,7 +62,7 @@ case "$SWIGLANG" in
esac esac
;; ;;
"guile") "guile")
$RETRY sudo apt-get -qq install guile-2.0-dev $RETRY sudo apt-get -qq install guile-${VER:-2.0}-dev
;; ;;
"lua") "lua")
if [[ -z "$VER" ]]; then if [[ -z "$VER" ]]; then