summaryrefslogtreecommitdiff
path: root/lang_ext/python/definition.h
blob: 8731b8a42ea75c8533f5a04e7da55148ef36f0b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * upb - a minimalist implementation of protocol buffers.
 *
 * Copyright (c) 2009 Joshua Haberman.  See LICENSE for details.
 *
 * See def.h for a general description.  These definitions
 * must be shared so that specific Python message types (for the
 * different proto APIs) can have access to the C definitions. */

#ifndef UPB_PYTHON_DEFINITION_H_
#define UPB_PYTHON_DEFINITION_H_

#include <Python.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
  PyObject_HEAD
  struct upb_msgdef *def;
} PyUpb_MessageDefinition;

extern PyTypeObject PyUpb_MessageDefinitionType;

/* What format string should be passed to PyArg_ParseTuple to get just a raw
 * string of bytes and a length. */
extern const char *bytes_format;

#ifdef __cplusplus
}  /* extern "C" */
#endif

#endif
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback