blob: 2c52930d14fbe1c47d3c36c0f686741028acd990 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/*
* pbstream - a stream-oriented implementation of protocol buffers.
*
* Copyright (c) 2009 Joshua Haberman. See LICENSE for details.
*/
#include <stddef.h>
#include "pbstruct.h"
#define alignof(t) offsetof(struct { char c; t x; }, x)
#define ALIGN_UP(p, t) (alignof(t) + ((p - 1) & ~(alignof(t) - 1)))
|