本文整理汇总了Python中djinni.pycffi_marshal.CPyString.fromPyOpt方法的典型用法代码示例。如果您正苦于以下问题:Python CPyString.fromPyOpt方法的具体用法?Python CPyString.fromPyOpt怎么用?Python CPyString.fromPyOpt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类djinni.pycffi_marshal.CPyString
的用法示例。
在下文中一共展示了CPyString.fromPyOpt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_changes_string_optional_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import fromPyOpt [as 别名]
def on_changes_string_optional_returned(cself, i, f, s, binar, b, d):
try:
with CPyString.fromPyOpt(FooListenerHelper.selfToPy(cself).on_changes_string_optional_returned(CPyBoxedI32.toPyOpt(i), CPyPrimitive.toPy(f), CPyString.toPyOpt(s), CPyBinary.toPy(binar), CPyPrimitive.toPy(b), CPyDate.toPy(d))) as py_obj:
return py_obj.release_djinni_string()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例2: __python_next
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import fromPyOpt [as 别名]
def __python_next(cself):
try:
with CPyString.fromPyOpt(next(CPyObjectProxy.toPyIter(cself))) as py_obj:
return py_obj.release_djinni_string()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例3: get_client_returned_record_f3
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import fromPyOpt [as 别名]
def get_client_returned_record_f3(cself):
try:
with CPyString.fromPyOpt(CPyRecord.toPy(None, cself).misc) as py_obj:
return py_obj.release_djinni_string()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例4: __get_value
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import fromPyOpt [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
示例5: cause_changes_int_optional_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import fromPyOpt [as 别名]
def cause_changes_int_optional_returned(self, i, f, s, binar, b, d):
with CPyBoxedI32.fromPyOpt(i) as pyopt_i,\
CPyString.fromPyOpt(s) as pyopt_s,\
CPyBinary.fromPy(binar) as pybin_binar:
_ret_c = lib.cw__foo_receiver_cause_changes_int_optional_returned(self._cpp_impl, pyopt_i.release_djinni_boxed(), CPyPrimitive.fromPy(f), pyopt_s.release_djinni_string(), pybin_binar.release_djinni_binary(), CPyPrimitive.fromPy(b), CPyDate.fromPy(d))
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyBoxedI32.toPyOpt(_ret_c)
return _ret