summaryrefslogtreecommitdiff
path: root/libguile/deprecated.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2021-01-22 16:39:11 +0100
committerAndy Wingo <wingo@pobox.com>2021-02-03 23:02:21 +0100
commit2e26538d6a51bdd6c2e68ad4539ab3750ef8670a (patch)
tree85f3f2ae182708804c673e95dc3a739d868771a5 /libguile/deprecated.c
parent480d86df6847deb55db6731811407c268d2254ed (diff)
downloadguile-2e26538d6a51bdd6c2e68ad4539ab3750ef8670a.tar.gz
Replace libltdl with raw dlopen, dlsym
* NEWS: Update. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add system/foreign-library.scm. * configure.ac: Replace ltdl check with -ldl check. * libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a helper Scheme module. (scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function) (scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system foreign-library). * libguile/extensions.c (load_extension): Avoid scm_dynamic_call. * module/system/foreign-library.scm: New file. * module/oop/goops.scm (<dynamic-object>): Hackily export <foreign-library> instead of a class here. * doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only document the new interfaces. Eventually we will deprecate dynamic-link and friends. * doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign Function Interface. Seems there should be some closer relationship but this will do for now. * doc/ref/tour.texi (Putting Extensions into Modules): * doc/ref/libguile-parallel.texi (Parallel Installations): Update for rename of Modules and Extensions to Foreign Extensions. * libguile/deprecated.h: * libguile/deprecated.c (scm_dynamic_unlink): Deprecate. * libguile/guile.c: Remove ltdl include. * test-suite/tests/foreign.test: Update tests to use new API, and update error expectations.
Diffstat (limited to 'libguile/deprecated.c')
-rw-r--r--libguile/deprecated.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index fcc4e8343..e4909dfc6 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -1,4 +1,4 @@
-/* Copyright 2003-2004,2006,2008-2018,2020
+/* Copyright 2003-2004,2006,2008-2018,2020,2021
Free Software Foundation, Inc.
This file is part of Guile.
@@ -31,7 +31,9 @@
#include "boolean.h"
#include "bitvectors.h"
#include "deprecation.h"
+#include "dynl.h"
#include "eval.h"
+#include "foreign.h"
#include "gc.h"
#include "gsubr.h"
#include "modules.h"
@@ -601,6 +603,19 @@ scm_copy_tree (SCM obj)
+SCM_DEFINE (scm_dynamic_unlink, "dynamic-unlink", 1, 0, 0, (SCM obj), "")
+#define FUNC_NAME s_scm_dynamic_unlink
+{
+ scm_c_issue_deprecation_warning
+ ("scm_dynamic_unlink has no effect and is deprecated. Unloading "
+ "shared libraries is no longer supported.");
+ return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+
+
+
+
void
scm_i_init_deprecated ()
{