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


Python CPyPrimitive.toPy方法代码示例

本文整理汇总了Python中djinni.pycffi_marshal.CPyPrimitive.toPy方法的典型用法代码示例。如果您正苦于以下问题:Python CPyPrimitive.toPy方法的具体用法?Python CPyPrimitive.toPy怎么用?Python CPyPrimitive.toPy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在djinni.pycffi_marshal.CPyPrimitive的用法示例。


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

示例1: python_create_foo_client_returned_record

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_foo_client_returned_record(record_id, content, some_record):
     py_rec = FooClientReturnedRecord(
         CPyPrimitive.toPy(record_id),
         CPyString.toPy(content),
         CPyRecord.toPy(FooSomeOtherRecord.c_data_set, some_record),
     )
     return CPyRecord.fromPy(FooClientReturnedRecord.c_data_set, py_rec)  # to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:9,代码来源:foo_client_returned_record_helper.py

示例2: cause_changes_int_returned

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def cause_changes_int_returned(self, i, f, s, binar, b, d):
     with CPyString.fromPy(s) as pys_s,\
             CPyBinary.fromPy(binar) as pybin_binar:
         _ret_c = lib.cw__foo_receiver_cause_changes_int_returned(self._cpp_impl, CPyPrimitive.fromPy(i), CPyPrimitive.fromPy(f), pys_s.release_djinni_string(), pybin_binar.release_djinni_binary(), CPyPrimitive.fromPy(b), CPyDate.fromPy(d))
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyPrimitive.toPy(_ret_c)
         assert _ret is not None
         return _ret
开发者ID:trafi,项目名称:djinni,代码行数:10,代码来源:foo_receiver.py

示例3: __get_value

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def __get_value(cself, key):
     pyKey = CPyPrimitive.toPy(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_int32_t_int32_t.py

示例4: __get_value

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [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: python_create_assorted_primitives

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_assorted_primitives(b,eight,sixteen,thirtytwo,sixtyfour,fthirtytwo,fsixtyfour,o_b,o_eight,o_sixteen,o_thirtytwo,o_sixtyfour,o_fthirtytwo,o_fsixtyfour):
     py_rec = AssortedPrimitives(
         CPyPrimitive.toPy(b),
         CPyPrimitive.toPy(eight),
         CPyPrimitive.toPy(sixteen),
         CPyPrimitive.toPy(thirtytwo),
         CPyPrimitive.toPy(sixtyfour),
         CPyPrimitive.toPy(fthirtytwo),
         CPyPrimitive.toPy(fsixtyfour),
         CPyBoxedBool.toPyOpt(o_b),
         CPyBoxedI8.toPyOpt(o_eight),
         CPyBoxedI16.toPyOpt(o_sixteen),
         CPyBoxedI32.toPyOpt(o_thirtytwo),
         CPyBoxedI64.toPyOpt(o_sixtyfour),
         CPyBoxedF32.toPyOpt(o_fthirtytwo),
         CPyBoxedF64.toPyOpt(o_fsixtyfour))
     return CPyRecord.fromPy(AssortedPrimitives.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:19,代码来源:assorted_primitives_helper.py

示例6: python_create_foo_constants

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_foo_constants(some_integer,some_string):
     py_rec = FooConstants(
         CPyPrimitive.toPy(some_integer),
         CPyString.toPy(some_string))
     return CPyRecord.fromPy(FooConstants.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_constants_helper.py

示例7: __python_add

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def __python_add(cself, key, value):
     CPyObjectProxy.toPyObj(None, cself)[CPyString.toPy(key)] = CPyPrimitive.toPy(value)
开发者ID:trafi,项目名称:djinni,代码行数:4,代码来源:dh__map_string_int32_t.py

示例8: python_create_some_const_record

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_some_const_record(number1,number2):
     py_rec = SomeConstRecord(
         CPyPrimitive.toPy(number1),
         CPyPrimitive.toPy(number2))
     return CPyRecord.fromPy(SomeConstRecord.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:some_const_record_helper.py

示例9: python_create_client_returned_record

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_client_returned_record(record_id,content,misc):
     py_rec = ClientReturnedRecord(
         CPyPrimitive.toPy(record_id),
         CPyString.toPy(content),
         CPyString.toPyOpt(misc))
     return CPyRecord.fromPy(ClientReturnedRecord.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:client_returned_record_helper.py

示例10: check_map_list_record

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def check_map_list_record(m):
     _ret_c = lib.cw__test_helpers_check_map_list_record(CPyRecord.fromPy(MapListRecord.c_data_set, m))
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyPrimitive.toPy(_ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:test_helpers.py

示例11: __python_add

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def __python_add(cself, el):
     CPyObjectProxy.toPyObj(None, cself).add(CPyPrimitive.toPy(el))
开发者ID:trafi,项目名称:djinni,代码行数:4,代码来源:dh__set_int32_t.py

示例12: __python_add

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyPrimitive.toPy(el))
开发者ID:trafi,项目名称:djinni,代码行数:4,代码来源:dh__list_int32_t.py

示例13: check_nested_collection

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def check_nested_collection(nc):
     _ret_c = lib.cw__test_helpers_check_nested_collection(CPyRecord.fromPy(NestedCollection.c_data_set, nc))
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyPrimitive.toPy(_ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:test_helpers.py

示例14: python_create_foo_some_other_record

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_foo_some_other_record(number1,number2):
     py_rec = FooSomeOtherRecord(
         CPyPrimitive.toPy(number1),
         CPyPrimitive.toPy(number2))
     return CPyRecord.fromPy(FooSomeOtherRecord.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_some_other_record_helper.py

示例15: python_create_extended_record

# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import toPy [as 别名]
 def python_create_extended_record(foo):
     py_rec = ExtendedRecord(
         CPyPrimitive.toPy(foo))
     return CPyRecord.fromPy(ExtendedRecord.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:6,代码来源:extended_record_helper.py


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