本文整理汇总了Python中djinni.pycffi_marshal.CPyPrimitive.fromPy方法的典型用法代码示例。如果您正苦于以下问题:Python CPyPrimitive.fromPy方法的具体用法?Python CPyPrimitive.fromPy怎么用?Python CPyPrimitive.fromPy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类djinni.pycffi_marshal.CPyPrimitive
的用法示例。
在下文中一共展示了CPyPrimitive.fromPy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_foo_client_returned_record_f1
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_foo_client_returned_record_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).record_id)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例2: get_assorted_primitives_f7
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_assorted_primitives_f7(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).fsixtyfour)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例3: get_private_int
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_private_int(cself):
try:
_ret = CPyPrimitive.fromPy(FooListenerHelper.selfToPy(cself).get_private_int())
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例4: get_some_const_record_f2
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_some_const_record_f2(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number2)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例5: __python_next
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def __python_next(cself):
try:
_ret = CPyPrimitive.fromPy(next(CPyObjectProxy.toPyIter(cself)))
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例6: get_foo_constants_f1
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_foo_constants_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).some_integer)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例7: get_record_with_derivings_f1
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_record_with_derivings_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).key1)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例8: on_changes_int_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def on_changes_int_returned(cself, i, f, s, binar, b, d):
try:
_ret = CPyPrimitive.fromPy(FooListenerHelper.selfToPy(cself).on_changes_int_returned(CPyPrimitive.toPy(i), CPyPrimitive.toPy(f), CPyString.toPy(s), CPyBinary.toPy(binar), CPyPrimitive.toPy(b), CPyDate.toPy(d)))
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例9: __get_elem
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
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
示例10: get_foo_extensible_record_f1
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def get_foo_extensible_record_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number1)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例11: cause_changes_int_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [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
示例12: __get_value
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [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
示例13: set_bool
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def set_bool(self, private_bool):
lib.cw__foo_primitives_set_bool(self._cpp_impl, CPyPrimitive.fromPy(private_bool))
CPyException.toPyCheckAndRaise(ffi.NULL)
示例14: cause_changes_record_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def cause_changes_record_returned(self, n1, n2):
_ret_c = lib.cw__foo_receiver_cause_changes_record_returned(self._cpp_impl, CPyPrimitive.fromPy(n1), CPyPrimitive.fromPy(n2))
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyRecord.toPy(FooSomeOtherRecord.c_data_set, _ret_c)
assert _ret is not None
return _ret
示例15: set_private_int32
# 需要导入模块: from djinni.pycffi_marshal import CPyPrimitive [as 别名]
# 或者: from djinni.pycffi_marshal.CPyPrimitive import fromPy [as 别名]
def set_private_int32(self, private_int):
lib.cw__foo_interface_set_private_int32(self._cpp_impl, CPyPrimitive.fromPy(private_int))
CPyException.toPyCheckAndRaise(ffi.NULL)