當前位置: 首頁>>代碼示例>>Python>>正文


Python CPyObjectProxy.toPyObj方法代碼示例

本文整理匯總了Python中djinni.pycffi_marshal.CPyObjectProxy.toPyObj方法的典型用法代碼示例。如果您正苦於以下問題:Python CPyObjectProxy.toPyObj方法的具體用法?Python CPyObjectProxy.toPyObj怎麽用?Python CPyObjectProxy.toPyObj使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在djinni.pycffi_marshal.CPyObjectProxy的用法示例。


在下文中一共展示了CPyObjectProxy.toPyObj方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __get_value

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __get_value(cself, key):
     pyKey = CPyString.toPyWithoutTakingOwnership(key)
     try:
         with CPyString.fromPyOpt(CPyObjectProxy.toPyObj(None, cself)[pyKey]) as py_obj:
             return py_obj.release_djinni_string()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
開發者ID:trafi,項目名稱:djinni,代碼行數:10,代碼來源:dh__map_optional_string_optional_string.py

示例2: __get_value

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __get_value(cself, key):
     pyKey = CPyString.toPyWithoutTakingOwnership(key)
     assert pyKey is not None
     try:
         _ret = CPyPrimitive.fromPy(CPyObjectProxy.toPyObj(None, cself)[pyKey])
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
開發者ID:trafi,項目名稱:djinni,代碼行數:11,代碼來源:dh__map_string_int32_t.py

示例3: __get_value

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __get_value(cself, key):
     pyKey = CPyBoxedI32.toPyOptWithoutTakingOwnership(key)
     try:
         _ret = CPyObjectProxy.fromPy(SetStringHelper.c_data_set, SetStringProxy(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,代碼行數:11,代碼來源:dh__map_boxed_int32_t_set_string.py

示例4: __get_value

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 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,代碼行數:12,代碼來源:dh__map_int8_t_list_date.py

示例5: __get_value

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __get_value(cself, key):
     pyKey = CPyString.toPyWithoutTakingOwnership(key)
     assert pyKey is not None
     try:
         with CPyString.fromPy(CPyObjectProxy.toPyObj(None, cself)[pyKey]) 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,代碼行數:13,代碼來源:dh__map_string_string.py

示例6: python_create_foo_containers_record

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 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,代碼行數:21,代碼來源:foo_containers_record_helper.py

示例7: __get_size

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __get_size(cself):
     return len(CPyObjectProxy.toPyObj(None, cself))
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__set_int32_t.py

示例8: get_empty_map

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def get_empty_map():
     _ret_c = lib.cw__test_helpers_get_empty_map()
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, _ret_c)
     assert _ret is not None
     return _ret
開發者ID:trafi,項目名稱:djinni,代碼行數:8,代碼來源:test_helpers.py

示例9: __python_add

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __python_add(cself, key, value):
     CPyObjectProxy.toPyObj(None, cself)[CPyString.toPy(key)] = CPyString.toPy(value)
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__map_string_string.py

示例10: __python_add

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __python_add(cself, key, value):
     CPyObjectProxy.toPyObj(None, cself)[CPyPrimitive.toPy(key)] = CPyObject.toPy(ListDateHelper.c_data_set, value)
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__map_int8_t_list_date.py

示例11: __python_add

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __python_add(cself, key, value):
     CPyObjectProxy.toPyObj(None, cself)[CPyBoxedI32.toPyOpt(key)] = CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, value)
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__map_boxed_int32_t_set_string.py

示例12: __python_add

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __python_add(cself, el):
     CPyObjectProxy.toPyObj(None, cself).add(CPyString.toPyOpt(el))
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__set_optional_string.py

示例13: __python_add

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __python_add(cself, key, value):
     CPyObjectProxy.toPyObj(None, cself)[CPyPrimitive.toPy(key)] = CPyPrimitive.toPy(value)
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__map_int32_t_int32_t.py

示例14: python_create_map_record

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def python_create_map_record(map,imap):
     py_rec = MapRecord(
         CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, map),
         CPyObjectProxy.toPyObj(MapInt32TInt32THelper.c_data_set, imap))
     return CPyRecord.fromPy(MapRecord.c_data_set, py_rec) #to do: can be optional?
開發者ID:trafi,項目名稱:djinni,代碼行數:7,代碼來源:map_record_helper.py

示例15: __python_add

# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObj [as 別名]
 def __python_add(cself, el):
     CPyObjectProxy.toPyObj(None, cself).add(CPyPrimitive.toPy(el))
開發者ID:trafi,項目名稱:djinni,代碼行數:4,代碼來源:dh__set_int32_t.py


注:本文中的djinni.pycffi_marshal.CPyObjectProxy.toPyObj方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。