2014-08-12 21:10:30 +00:00
|
|
|
// Protocol Buffers - Google's data interchange format
|
|
|
|
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
|
|
|
//
|
2023-09-08 18:03:24 -07:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2014-08-12 21:10:30 +00:00
|
|
|
|
|
|
|
|
// Author: qrczak@google.com (Marcin Kowalczyk)
|
|
|
|
|
//
|
|
|
|
|
// This module exposes the C proto inside the given Python proto, in
|
|
|
|
|
// case the Python proto is implemented with a C proto.
|
|
|
|
|
|
2022-11-30 14:11:54 -08:00
|
|
|
#ifndef GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
|
|
|
|
|
#define GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
|
2014-08-12 21:10:30 +00:00
|
|
|
|
2021-10-20 14:51:07 -07:00
|
|
|
#define PY_SSIZE_T_CLEAN
|
2014-08-12 21:10:30 +00:00
|
|
|
#include <Python.h>
|
|
|
|
|
|
|
|
|
|
namespace google {
|
|
|
|
|
namespace protobuf {
|
|
|
|
|
|
|
|
|
|
class Message;
|
|
|
|
|
|
|
|
|
|
namespace python {
|
|
|
|
|
|
|
|
|
|
// Return the pointer to the C proto inside the given Python proto,
|
|
|
|
|
// or NULL when this is not a Python proto implemented with a C proto.
|
|
|
|
|
const Message* GetCProtoInsidePyProto(PyObject* msg);
|
|
|
|
|
Message* MutableCProtoInsidePyProto(PyObject* msg);
|
|
|
|
|
|
|
|
|
|
} // namespace python
|
|
|
|
|
} // namespace protobuf
|
|
|
|
|
} // namespace google
|
2018-08-08 17:00:41 -07:00
|
|
|
|
2022-11-30 14:11:54 -08:00
|
|
|
#endif // GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__
|