refactor tc7 and tc16 checks
[bpt/guile.git] / libguile / strports.h
index 3a9c3ec..b4bafdf 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef SCM_STRPORTS_H
 #define SCM_STRPORTS_H
 
-/* Copyright (C) 1995,1996,2000,2001,2002, 2006, 2008, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,2000,2001,2002, 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -28,8 +28,7 @@
 \f
 
 
-#define SCM_STRPORTP(x)      (!SCM_IMP (x) && \
-                              (SCM_TYP16 (x) == scm_tc16_strport))
+#define SCM_STRPORTP(x)      (SCM_HAS_TYP16 (x, scm_tc16_strport))
 #define SCM_OPSTRPORTP(x)    (SCM_STRPORTP (x) && \
                               (SCM_CELL_WORD_0 (x) & SCM_OPN))
 #define SCM_OPINSTRPORTP(x)  (SCM_OPSTRPORTP (x) && \