]> andersk Git - libyaml.git/blobdiff - src/yaml_private.h
Added .hgignore.
[libyaml.git] / src / yaml_private.h
index ed5ea66cc3ff639316ac8574dcc25b015d7f593f..f835d3d95c24b906a510318ae648cc2ad49d61c5 100644 (file)
@@ -421,6 +421,12 @@ yaml_queue_extend(void **start, void **head, void **tail, void **end);
 #define STACK_EMPTY(context,stack)                                              \
     ((stack).start == (stack).top)
 
+#define STACK_LIMIT(context,stack,size)                                         \
+    ((stack).top - (stack).start < (size) ?                                     \
+        1 :                                                                     \
+        ((context)->error = YAML_MEMORY_ERROR,                                  \
+         0))
+
 #define PUSH(context,stack,value)                                               \
     (((stack).top != (stack).end                                                \
       || yaml_stack_extend((void **)&(stack).start,                             \
This page took 0.041572 seconds and 4 git commands to generate.