libcbor  0.5.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
stack.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_STACK_H
9 #define LIBCBOR_STACK_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
21  size_t subitems;
22 };
23 
25 struct _cbor_stack {
27  size_t size;
28 };
29 
31 
32 void _cbor_stack_pop(struct _cbor_stack *);
33 
34 struct _cbor_stack_record *_cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif //LIBCBOR_STACK_H
size_t size
Definition: stack.h:27
size_t subitems
Definition: stack.h:21
Stack handle - contents and size.
Definition: stack.h:25
struct _cbor_stack_record * lower
Definition: stack.h:19
struct _cbor_stack _cbor_stack_init()
Definition: stack.c:10
Simple stack record for the parser.
Definition: stack.h:18
struct _cbor_stack_record * _cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t)
Definition: stack.c:23
void _cbor_stack_pop(struct _cbor_stack *)
Definition: stack.c:15
cbor_item_t * item
Definition: stack.h:20
The item handle.
Definition: data.h:149
struct _cbor_stack_record * top
Definition: stack.h:26