From 0f391314f866786576e35ca79634b4fa844d16cd Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 18 Mar 2018 17:20:12 -0700 Subject: [PATCH] glib: Empty the (glib) package of files and explicitly export... ...all public (documented) bindings into it. This avoids exposing e.g. glib-mutex to the users of (glib), and simplifies source/documentation analysis (which, given explicit exports, needs only the .pkg file). --- src/glib/glib.pkg | 25 ++++++++++++++----------- src/glib/glib.scm | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/glib/glib.pkg b/src/glib/glib.pkg index 767f34c4a..2c818c75a 100644 --- a/src/glib/glib.pkg +++ b/src/glib/glib.pkg @@ -23,21 +23,24 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ;;;; Glib System Packaging -;;; When loaded, Scheme becomes a g_source attached to the default -;;; GMainContext. A glib-thread is spawned to periodically yield to -;;; the toolkit(s). - (global-definitions runtime/) (global-definitions sos/) (define-package (glib) - (parent ()) + (parent ())) + +(define-package (glib internal) + (parent (glib)) (files "glib") (import (runtime thread) - get-thread-event-block)) + get-thread-event-block) + (export (glib) + with-glib-lock without-glib-lock + assert-glib-locked assert-without-interruption + add-glib-cleanup execute-glib-cleanup)) (define-package (gobject) - (parent (glib)) + (parent (glib internal)) (files "gobject") ;;(depends-on "glib.bin" "glib") (export (glib) @@ -48,7 +51,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. gquark-from-string gquark-to-string)) (define-package (gio) - (parent (glib)) + (parent (glib internal)) (files "gio") ;;(depends-on "glib.bin" "glib") (import (runtime ffi) @@ -92,7 +95,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. make-gfile)) (define-package (glib main) - (parent (glib)) + (parent (glib internal)) (files "glib-main") ;;(depends-on "glib.bin" "glib") (import (runtime load) @@ -110,10 +113,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define-package (glib thread) (parent (runtime thread)) (files "glib-thread") - ;;(depends-on "main") + ;;(depends-on "glib-main") (export () stop-glib-thread) - (import (glib) + (import (glib internal) with-glib-lock assert-glib-locked run-glib-cleanups diff --git a/src/glib/glib.scm b/src/glib/glib.scm index 3296cfc01..0debcaf20 100644 --- a/src/glib/glib.scm +++ b/src/glib/glib.scm @@ -22,7 +22,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |# ;;;; Core utilities. -;;; package: (glib) +;;; package: (glib internal) (define-syntax define-integrable-operator #;(er-macro-transformer -- 2.25.1