{{! Copyright (c) Meta Platforms, Inc. and affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. }}{{! Generated Cpp2 <-> thrift-python converters for Thrift structs }} {{> common/auto_generated_cython}} {{#program:structs}} {{#first?}} cdef extern from "{{program:includePrefix}}gen-cpp2/{{program:name}}_types.h": {{/first?}} cdef cppclass c{{struct:py_name}} "{{struct:cpp_name}}": c{{struct:py_name}}() {{/program:structs}} {{#program:enums}} {{#first?}} cdef extern from "{{program:includePrefix}}gen-cpp2/{{program:name}}_types.h": {{/first?}} cdef cppclass c{{enum:name}} "{{program:cpp_namespaces}}::{{enum:cpp_name}}": pass {{/program:enums}} {{#program:structs}} cdef c{{struct:py_name}} {{struct:py_name}}_convert_to_cpp(object inst) except* cdef object {{struct:py_name}}_from_cpp(const c{{struct:py_name}}& c_struct) {{/program:structs}}