guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 50/86: Devolve keyword-snarfing macros


From: Andy Wingo
Subject: [Guile-commits] 50/86: Devolve keyword-snarfing macros
Date: Wed, 20 Jun 2018 14:09:38 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit af32bf8ff10452ccb8a5c58d266880c4d3200938
Author: Andy Wingo <address@hidden>
Date:   Wed Jun 20 09:25:20 2018 +0200

    Devolve keyword-snarfing macros
    
    * libguile/snarf.h:
    * libguile/keywords.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Move here.
---
 libguile/keywords.h | 9 +++++++++
 libguile/snarf.h    | 8 --------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/libguile/keywords.h b/libguile/keywords.h
index 5479849..5f33903 100644
--- a/libguile/keywords.h
+++ b/libguile/keywords.h
@@ -26,6 +26,7 @@
 
 #include "libguile/__scm.h"
 #include <libguile/error.h>
+#include <libguile/snarf.h>
 
 
 
@@ -42,6 +43,14 @@ SCM_API SCM scm_from_utf8_keyword (const char *name);
 #define SCM_VALIDATE_KEYWORD(pos, v) \
   SCM_MAKE_VALIDATE_MSG (pos, v, KEYWORDP, "keyword")
 
+#define SCM_KEYWORD(c_name, scheme_name) \
+SCM_SNARF_HERE(static SCM c_name) \
+SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name))
+
+#define SCM_GLOBAL_KEYWORD(c_name, scheme_name) \
+SCM_SNARF_HERE(SCM c_name) \
+SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name))
+
 enum scm_keyword_arguments_flags
 {
   SCM_ALLOW_OTHER_KEYS            = (1U << 0),
diff --git a/libguile/snarf.h b/libguile/snarf.h
index 1dacfd7..83b40c8 100644
--- a/libguile/snarf.h
+++ b/libguile/snarf.h
@@ -85,14 +85,6 @@ DOCSTRING ^^ }
 # endif
 #endif
 
-#define SCM_KEYWORD(c_name, scheme_name) \
-SCM_SNARF_HERE(static SCM c_name) \
-SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name))
-
-#define SCM_GLOBAL_KEYWORD(c_name, scheme_name) \
-SCM_SNARF_HERE(SCM c_name) \
-SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name))
-
 #define SCM_VARIABLE(c_name, scheme_name) \
 SCM_SNARF_HERE(static SCM c_name) \
 SCM_SNARF_INIT(c_name = scm_c_define (scheme_name, SCM_BOOL_F);)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]