当前位置: 首页>>代码示例>>Python>>正文


Python pycffi_marshal.CPyObject类代码示例

本文整理汇总了Python中djinni.pycffi_marshal.CPyObject的典型用法代码示例。如果您正苦于以下问题:Python CPyObject类的具体用法?Python CPyObject怎么用?Python CPyObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CPyObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __get_elem

 def __get_elem(cself, index):
     try:
         _ret = CPyObject.fromPy(ListStringHelper.c_data_set, CPyObject.toPy(None, cself)[index])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:dh__list_list_string.py

示例2: __get_elem

 def __get_elem(cself, index):
     try:
         _ret = CPyPrimitive.fromPy(CPyObject.toPy(None, cself)[index])
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:dh__list_int32_t.py

示例3: __get_elem

 def __get_elem(cself, index):
     try:
         with CPyBinary.fromPyOpt(CPyObject.toPy(None, cself)[index]) as py_obj:
             return py_obj.release_djinni_binary()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:dh__list_optional_binary.py

示例4: __get_elem

 def __get_elem(cself, index):
     try:
         _ret = CPyRecord.fromPy(FooSomeOtherRecord.c_data_set, CPyObject.toPy(None, cself)[index])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:dh__list_record_foo_some_other_record.py

示例5: get_foo_containers_record_f4

 def get_foo_containers_record_f4(cself):
     try:
         _ret = CPyObject.fromPy(ListOptionalBinaryHelper.c_data_set, CPyRecord.toPy(None, cself).list_optional_binary)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_containers_record_helper.py

示例6: get_primitive_list_f1

 def get_primitive_list_f1(cself):
     try:
         _ret = CPyObject.fromPy(ListInt64THelper.c_data_set, CPyRecord.toPy(None, cself).list)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:primitive_list_helper.py

示例7: get_foo_containers_record_f5

 def get_foo_containers_record_f5(cself):
     try:
         _ret = CPyObject.fromPy(ListListStringHelper.c_data_set, CPyRecord.toPy(None, cself).list_list_string)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_containers_record_helper.py

示例8: get_foo_containers_record_f6

 def get_foo_containers_record_f6(cself):
     try:
         _ret = CPyObject.fromPy(ListRecordFooSomeOtherRecordHelper.c_data_set, CPyRecord.toPy(None, cself).list_record)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_containers_record_helper.py

示例9: get_nested_collection_f1

 def get_nested_collection_f1(cself):
     try:
         _ret = CPyObject.fromPy(ListSetStringHelper.c_data_set, CPyRecord.toPy(None, cself).set_list)
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:nested_collection_helper.py

示例10: __get_elem

 def __get_elem(cself, index):
     try:
         with CPyString.fromPy(CPyObject.toPy(None, cself)[index]) as py_obj:
             _ret = py_obj.release_djinni_string()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:9,代码来源:dh__list_string.py

示例11: __get_value

 def __get_value(cself, key):
     pyKey = CPyPrimitive.toPy(key)
     assert pyKey is not None
     try:
         _ret = CPyObject.fromPy(ListDateHelper.c_data_set, CPyObjectProxy.toPyObj(None, cself)[pyKey])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:10,代码来源:dh__map_int8_t_list_date.py

示例12: python_create_foo_containers_record

 def python_create_foo_containers_record(optional_list_int,list_int,list_binary,list_optional_binary,list_list_string,list_record,optional_map_string_int,map_string_int,map_string_string,map_optional_string_optional_string,map_int_list_date,optional_set_string,set_string,set_optional_string,map_int_set_string,map_optional_int_set_string):
     py_rec = FooContainersRecord(
         CPyObject.toPyOpt(ListInt32THelper.c_data_set, optional_list_int),
         CPyObject.toPy(ListInt32THelper.c_data_set, list_int),
         CPyObject.toPy(ListBinaryHelper.c_data_set, list_binary),
         CPyObject.toPy(ListOptionalBinaryHelper.c_data_set, list_optional_binary),
         CPyObject.toPy(ListListStringHelper.c_data_set, list_list_string),
         CPyObject.toPy(ListRecordFooSomeOtherRecordHelper.c_data_set, list_record),
         CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set, optional_map_string_int),
         CPyObjectProxy.toPyObj(MapStringInt32THelper.c_data_set, map_string_int),
         CPyObjectProxy.toPyObj(MapStringStringHelper.c_data_set, map_string_string),
         CPyObjectProxy.toPyObj(MapOptionalStringOptionalStringHelper.c_data_set, map_optional_string_optional_string),
         CPyObjectProxy.toPyObj(MapInt8TListDateHelper.c_data_set, map_int_list_date),
         CPyObjectProxy.toPyObjOpt(SetStringHelper.c_data_set, optional_set_string),
         CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set_string),
         CPyObjectProxy.toPyObj(SetOptionalStringHelper.c_data_set, set_optional_string),
         CPyObjectProxy.toPyObj(MapInt8TSetStringHelper.c_data_set, map_int_set_string),
         CPyObjectProxy.toPyObj(MapBoxedInt32TSetStringHelper.c_data_set, map_optional_int_set_string))
     return CPyRecord.fromPy(FooContainersRecord.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:19,代码来源:foo_containers_record_helper.py

示例13: __get_elem

 def __get_elem(cself, index):
     try:
         _ret = CPyObjectProxy.fromPy(MapStringInt64THelper.c_data_set, MapStringInt64TProxy(CPyObject.toPy(None, cself)[index]))
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:dh__list_map_string_int64_t.py

示例14: set_list_binary

 def set_list_binary(self, lb):
     lib.cw__foo_containers_interface_set_list_binary(self._cpp_impl, CPyObject.fromPy(ListBinaryHelper.c_data_set, lb))
     CPyException.toPyCheckAndRaise(ffi.NULL)
开发者ID:trafi,项目名称:djinni,代码行数:3,代码来源:foo_containers_interface.py

示例15: get_list_binary

 def get_list_binary(self):
     _ret_c = lib.cw__foo_containers_interface_get_list_binary(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObject.toPy(ListBinaryHelper.c_data_set, _ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:6,代码来源:foo_containers_interface.py


注:本文中的djinni.pycffi_marshal.CPyObject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。