libcbor 0.12.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Loading...
Searching...
No Matches
stack.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014-2020 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
14extern "C" {
15#endif
16
33
37 size_t size;
38};
39
41struct _cbor_stack _cbor_stack_init(void);
42
43void _cbor_stack_pop(struct _cbor_stack*);
44
47 size_t);
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif // LIBCBOR_STACK_H
#define _CBOR_NODISCARD
Definition common.h:93
struct _cbor_stack _cbor_stack_init(void)
Definition stack.c:10
struct _cbor_stack_record * _cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t)
Definition stack.c:21
void _cbor_stack_pop(struct _cbor_stack *)
Definition stack.c:14
Simple stack record for the parser.
Definition stack.h:18
cbor_item_t * item
Item under construction.
Definition stack.h:22
size_t subitems
How many outstanding subitems are expected.
Definition stack.h:31
struct _cbor_stack_record * lower
Pointer to the parent stack frame.
Definition stack.h:20
Stack handle - contents and size.
Definition stack.h:35
struct _cbor_stack_record * top
Definition stack.h:36
size_t size
Definition stack.h:37
The item handle.
Definition data.h:171