CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/08/28 12:48:54

Index: m4/module.c
===================================================================
RCS file: /sources/m4/m4/m4/module.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- m4/module.c 25 Aug 2006 22:06:42 -0000      1.40
+++ m4/module.c 28 Aug 2006 12:48:54 -0000      1.41
@@ -145,6 +145,12 @@
          m4_symbol_value *value = m4_symbol_value_create ();
          char *           name;
 
+         /* Sanity check that builtins meet the required interface.  */
+         assert (bp->min_args <= bp->max_args);
+         assert (bp->min_args > 0
+                 || (bp->flags & (M4_BUILTIN_BLIND
+                                  | M4_BUILTIN_SIDE_EFFECT)) == 0);
+
          m4_set_symbol_value_func (value, bp->func);
          VALUE_HANDLE   (value)        = handle;
          VALUE_FLAGS    (value)        = bp->flags;


Reply via email to