Inline `scm_is_string'.
authorLudovic Courtès <ludo@gnu.org>
Thu, 16 Dec 2010 14:20:10 +0000 (15:20 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 16 Dec 2010 22:45:23 +0000 (23:45 +0100)
* libguile/strings.c (scm_is_string): Move to...
* libguile/inline.h (scm_is_string): ... here.  Inline.

libguile/inline.h
libguile/strings.c

index 018e6c6..9cc23ba 100644 (file)
@@ -332,6 +332,14 @@ scm_is_pair (SCM x)
   return SCM_I_CONSP (x);
 }
 
+#ifndef SCM_INLINE_C_INCLUDING_INLINE_H
+SCM_C_EXTERN_INLINE
+#endif
+int
+scm_is_string (SCM x)
+{
+  return SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_string);
+}
 
 /* Port I/O.  */
 
index 729b33d..71f0b52 100644 (file)
@@ -1405,11 +1405,6 @@ SCM_DEFINE (scm_string_append, "string-append", 0, 0, 1,
 }
 #undef FUNC_NAME
 
-int
-scm_is_string (SCM obj)
-{
-  return IS_STRING (obj);
-}
 
 \f
 /* Conversion to/from other encodings.  */