• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 // Author: qrczak@google.com (Marcin Kowalczyk)
9 //
10 // This module exposes the C proto inside the given Python proto, in
11 // case the Python proto is implemented with a C proto.
12 
13 #ifndef GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
14 #define GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
15 
16 #define PY_SSIZE_T_CLEAN
17 #include <Python.h>
18 
19 namespace google {
20 namespace protobuf {
21 
22 class Message;
23 
24 namespace python {
25 
26 // Return the pointer to the C proto inside the given Python proto,
27 // or NULL when this is not a Python proto implemented with a C proto.
28 const Message* GetCProtoInsidePyProto(PyObject* msg);
29 Message* MutableCProtoInsidePyProto(PyObject* msg);
30 
31 }  // namespace python
32 }  // namespace protobuf
33 }  // namespace google
34 
35 #endif  // GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
36