本文整理汇总了Python中djinni.pycffi_marshal.CPyString.toPyWithoutTakingOwnership方法的典型用法代码示例。如果您正苦于以下问题:Python CPyString.toPyWithoutTakingOwnership方法的具体用法?Python CPyString.toPyWithoutTakingOwnership怎么用?Python CPyString.toPyWithoutTakingOwnership使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类djinni.pycffi_marshal.CPyString
的用法示例。
在下文中一共展示了CPyString.toPyWithoutTakingOwnership方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __get_value
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyWithoutTakingOwnership [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
示例2: __get_value
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyWithoutTakingOwnership [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
示例3: __get_value
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyWithoutTakingOwnership [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