From 4e356a11bfe43202e17532506258603220151b28 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 30 Apr 2021 19:04:59 -0700 Subject: RESET-DATA-SOURCES: also reset cache of items of STRING-DATA Signed-off-by: Sean Whitton --- src/data.lisp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/data.lisp') diff --git a/src/data.lisp b/src/data.lisp index e04802c..2861cd0 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -99,6 +99,9 @@ sources are not expected to be available outside of the root Lisp.")) (defvar *no-data-sources* nil "If t, silently fail to register any data sources.") +(defvar *string-data* (make-hash-table :test #'equal) + "Items of STRING-DATA obtained from data sources by this Lisp image.") + (defun try-register-data-source (&rest args) "Register sources of prerequisite data. This function is typically called in consfigs. Any relative pathnames in ARGS @@ -124,9 +127,11 @@ as, before being passed to implementations of REGISTER-DATA-SOURCE." (invoke-restart 'skip-data-source)) (defun reset-data-sources () - "Forget all data sources registered in this Lisp image. + "Forget all data sources registered in this Lisp image and items of string +data obtained from data sources by this Lisp image. This function is typically called at the REPL." - (setq *data-sources* nil + (setq *string-data* (clrhash *string-data*) + *data-sources* nil *data-source-registrations* nil)) (defun get-data-string (iden1 iden2) @@ -155,9 +160,6 @@ This function is called by property :APPLY and :UNAPPLY subroutines." (format stream "Could not provide prerequisite data ~S | ~S" (missing-iden1 condition) (missing-iden2 condition))))) -(defvar *string-data* (make-hash-table :test #'equal) - "Items of STRING-DATA obtained from data sources by this Lisp image.") - (defun %get-data (iden1 iden2) (let* ((idenpair (cons iden1 iden2)) (from-source (query-data-sources iden1 iden2)) -- cgit v1.2.3