Author: particle
Date: Tue May  1 16:41:18 2007
New Revision: 18381

Modified:
   trunk/include/parrot/interpreter.h

Log:
[core]: add string macros STRING_IS_EMPTY(s) and STRING_IS_NULL(s)

Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h  (original)
+++ trunk/include/parrot/interpreter.h  Tue May  1 16:41:18 2007
@@ -446,6 +446,10 @@
 #  define PMC_IS_NULL(p)  ((p) == PMCNULL)
 #endif /* PARROT_CATCH_NULL */
 
+
+#define STRING_IS_NULL(s) ((s) == NULL)
+#define STRING_IS_EMPTY(s) !(int)(s)->strlen
+
 /* &gen_from_def(sysinfo.pasm) prefix(SYSINFO_) */
 
 #define PARROT_INTSIZE               1

Reply via email to