wingo pushed a commit to branch wip-whippet
in repository guile.

commit df113d1589cbab12bc6756bfc55201e26054eddc
Author: Andy Wingo <wi...@pobox.com>
AuthorDate: Fri Jun 13 15:07:29 2025 +0200

    Make scm_tc16_dir, SCM_DIRP etc private
    
    * libguile/filesys.h:
    * libguile/filesys.c (SCM_DIR_FLAG_OPEN):
    (SCM_DIR_OPEN_P):
    (SCM_DIRP):
    (SCM_VALIDATE_DIR): Move here, from the header.  I don't think people
    use them.
---
 libguile/filesys.c | 11 +++++++++--
 libguile/filesys.h | 14 +-------------
 2 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/libguile/filesys.c b/libguile/filesys.c
index be223a85d..1c0556ab2 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1,4 +1,4 @@
-/* Copyright 1996-2002,2004,2006,2009-2019,2021
+/* Copyright 1996-2002,2004,2006,2009-2019,2021,2025
      Free Software Foundation, Inc.
    Copyright 2021 Maxime Devos <maximede...@telenet.be>
    Copyright 2024, 2025 Tomas Volf <~@wolfsden.cz>
@@ -2192,8 +2192,15 @@ scm_i_relativize_path (SCM path, SCM in_path)
 /* Examining directories.  These procedures are used by `check-guile'
    and thus compiled unconditionally.  */
 
-scm_t_bits scm_tc16_dir;
+static scm_t_bits scm_tc16_dir;
 
+#define SCM_DIR_FLAG_OPEN (1L << 0)
+
+#define SCM_DIRP(x) (SCM_HAS_TYP16 (x, scm_tc16_dir))
+#define SCM_DIR_OPEN_P(x) (SCM_SMOB_FLAGS (x) & SCM_DIR_FLAG_OPEN)
+
+#define SCM_VALIDATE_DIR(pos, port) \
+  SCM_MAKE_VALIDATE_MSG (pos, port, DIRP, "directory port")
 
 SCM_DEFINE (scm_directory_stream_p, "directory-stream?", 1, 0, 0,
            (SCM obj),
diff --git a/libguile/filesys.h b/libguile/filesys.h
index 8e849fe7a..5caf398f4 100644
--- a/libguile/filesys.h
+++ b/libguile/filesys.h
@@ -1,7 +1,7 @@
 #ifndef SCM_FILESYS_H
 #define SCM_FILESYS_H
 
-/* Copyright 1995,1997-2001,2006,2008-2011,2013,2018,2021
+/* Copyright 1995,1997-2001,2006,2008-2011,2013,2018,2021,2025
      Free Software Foundation, Inc.
 
    This file is part of Guile.
@@ -26,18 +26,6 @@
 
 
 
-SCM_API scm_t_bits scm_tc16_dir;
-
-#define SCM_DIR_FLAG_OPEN (1L << 0)
-
-#define SCM_DIRP(x) (SCM_HAS_TYP16 (x, scm_tc16_dir))
-#define SCM_DIR_OPEN_P(x) (SCM_SMOB_FLAGS (x) & SCM_DIR_FLAG_OPEN)
-
-#define SCM_VALIDATE_DIR(pos, port) \
-  SCM_MAKE_VALIDATE_MSG (pos, port, DIRP, "directory port")
-
-
-
 SCM_API SCM scm_chown (SCM object, SCM owner, SCM group);
 SCM_API SCM scm_chownat (SCM dir, SCM object, SCM owner, SCM group, SCM flags);
 SCM_API SCM scm_chmod (SCM object, SCM mode);

Reply via email to