
#
# Autogenerated by Thrift for thrift/compiler/test/fixtures/py3/src/module.thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#  @generated
#

from libcpp.memory cimport make_shared
from thrift.python.capi.cpp_converter cimport cpp_to_python, python_to_cpp
from cython.operator cimport dereference as deref

cdef extern from "thrift/compiler/test/fixtures/py3/gen-python-capi/module/thrift_types_capi.h":
    pass

cdef shared_ptr[_fbthrift_cbindings.cSimpleException] SimpleException_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cSimpleException](python_to_cpp[_fbthrift_cbindings.cSimpleException](inst))


cdef object SimpleException_from_cpp(const shared_ptr[_fbthrift_cbindings.cSimpleException]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cSimpleException](deref(c_struct))
cdef shared_ptr[_fbthrift_cbindings.cOptionalRefStruct] OptionalRefStruct_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cOptionalRefStruct](python_to_cpp[_fbthrift_cbindings.cOptionalRefStruct](inst))


cdef object OptionalRefStruct_from_cpp(const shared_ptr[_fbthrift_cbindings.cOptionalRefStruct]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cOptionalRefStruct](deref(c_struct))
cdef shared_ptr[_fbthrift_cbindings.cSimpleStruct] SimpleStruct_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cSimpleStruct](python_to_cpp[_fbthrift_cbindings.cSimpleStruct](inst))


cdef object SimpleStruct_from_cpp(const shared_ptr[_fbthrift_cbindings.cSimpleStruct]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cSimpleStruct](deref(c_struct))
cdef shared_ptr[_fbthrift_cbindings.cHiddenTypeFieldsStruct] HiddenTypeFieldsStruct_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cHiddenTypeFieldsStruct](python_to_cpp[_fbthrift_cbindings.cHiddenTypeFieldsStruct](inst))


cdef object HiddenTypeFieldsStruct_from_cpp(const shared_ptr[_fbthrift_cbindings.cHiddenTypeFieldsStruct]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cHiddenTypeFieldsStruct](deref(c_struct))
cdef shared_ptr[_fbthrift_cbindings.cComplexStruct] ComplexStruct_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cComplexStruct](python_to_cpp[_fbthrift_cbindings.cComplexStruct](inst))


cdef object ComplexStruct_from_cpp(const shared_ptr[_fbthrift_cbindings.cComplexStruct]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cComplexStruct](deref(c_struct))
cdef shared_ptr[_fbthrift_cbindings.cBinaryUnion] BinaryUnion_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cBinaryUnion](python_to_cpp[_fbthrift_cbindings.cBinaryUnion](inst))


cdef object BinaryUnion_from_cpp(const shared_ptr[_fbthrift_cbindings.cBinaryUnion]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cBinaryUnion](deref(c_struct))
cdef shared_ptr[_fbthrift_cbindings.cBinaryUnionStruct] BinaryUnionStruct_convert_to_cpp(object inst) except*:
    return make_shared[_fbthrift_cbindings.cBinaryUnionStruct](python_to_cpp[_fbthrift_cbindings.cBinaryUnionStruct](inst))


cdef object BinaryUnionStruct_from_cpp(const shared_ptr[_fbthrift_cbindings.cBinaryUnionStruct]& c_struct):
    return cpp_to_python[_fbthrift_cbindings.cBinaryUnionStruct](deref(c_struct))
