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:16 -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)
|
|
|
|
|
|
2022-11-30 14:11:54 -08:00
|
|
|
#include "google/protobuf/python_protobuf.h"
|
2014-08-12 21:10:30 +00:00
|
|
|
|
2025-03-30 20:51:08 -07:00
|
|
|
#include <Python.h>
|
|
|
|
|
|
2014-08-12 21:10:30 +00:00
|
|
|
namespace google {
|
|
|
|
|
namespace protobuf {
|
|
|
|
|
namespace python {
|
|
|
|
|
|
2022-02-01 18:24:53 +00:00
|
|
|
static const Message* GetCProtoInsidePyProtoStub(PyObject* msg) {
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
static Message* MutableCProtoInsidePyProtoStub(PyObject* msg) {
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
2017-03-29 14:32:48 -07:00
|
|
|
|
|
|
|
|
// This is initialized with a default, stub implementation.
|
|
|
|
|
// If python-google.protobuf.cc is loaded, the function pointer is overridden
|
|
|
|
|
// with a full implementation.
|
|
|
|
|
const Message* (*GetCProtoInsidePyProtoPtr)(PyObject* msg) =
|
|
|
|
|
GetCProtoInsidePyProtoStub;
|
|
|
|
|
Message* (*MutableCProtoInsidePyProtoPtr)(PyObject* msg) =
|
|
|
|
|
MutableCProtoInsidePyProtoStub;
|
|
|
|
|
|
|
|
|
|
const Message* GetCProtoInsidePyProto(PyObject* msg) {
|
|
|
|
|
return GetCProtoInsidePyProtoPtr(msg);
|
|
|
|
|
}
|
|
|
|
|
Message* MutableCProtoInsidePyProto(PyObject* msg) {
|
|
|
|
|
return MutableCProtoInsidePyProtoPtr(msg);
|
|
|
|
|
}
|
2014-08-12 21:10:30 +00:00
|
|
|
|
|
|
|
|
} // namespace python
|
|
|
|
|
} // namespace protobuf
|
|
|
|
|
} // namespace google
|