1a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// Protocol Buffers - Google's data interchange format
2a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// Copyright 2008 Google Inc.  All rights reserved.
3afb4b72037e3f13db208590fc782c4bc8e27f862Jeff Davidson// https://developers.google.com/protocol-buffers/
4a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//
5a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// Redistribution and use in source and binary forms, with or without
6a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// modification, are permitted provided that the following conditions are
7a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// met:
8a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//
9a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//     * Redistributions of source code must retain the above copyright
10a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// notice, this list of conditions and the following disclaimer.
11a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//     * Redistributions in binary form must reproduce the above
12a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// copyright notice, this list of conditions and the following disclaimer
13a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// in the documentation and/or other materials provided with the
14a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// distribution.
15a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//     * Neither the name of Google Inc. nor the names of its
16a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// contributors may be used to endorse or promote products derived from
17a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// this software without specific prior written permission.
18a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//
19a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
31a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// Author: qrczak@google.com (Marcin Kowalczyk)
32a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson//
33a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// This module exposes the C proto inside the given Python proto, in
34a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// case the Python proto is implemented with a C proto.
35a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
36a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson#ifndef GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
37a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson#define GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
38a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
39a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson#include <Python.h>
40a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
41a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidsonnamespace google {
42a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidsonnamespace protobuf {
43a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
44a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidsonclass Message;
45a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
46a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidsonnamespace python {
47a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
48a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// Return the pointer to the C proto inside the given Python proto,
49a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson// or NULL when this is not a Python proto implemented with a C proto.
50a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidsonconst Message* GetCProtoInsidePyProto(PyObject* msg);
51a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff DavidsonMessage* MutableCProtoInsidePyProto(PyObject* msg);
52a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
53a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson}  // namespace python
54a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson}  // namespace protobuf
55a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson
56a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson}  // namespace google
57a3b2a6da25a76f17c73d31def3952feb0fd2296eJeff Davidson#endif  // GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
58