本文整理汇总了Python中djinni.pycffi_marshal.CPyString.toPyOpt方法的典型用法代码示例。如果您正苦于以下问题:Python CPyString.toPyOpt方法的具体用法?Python CPyString.toPyOpt怎么用?Python CPyString.toPyOpt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类djinni.pycffi_marshal.CPyString
的用法示例。
在下文中一共展示了CPyString.toPyOpt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cause_changes_string_optional_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyOpt [as 别名]
def cause_changes_string_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_string_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 = CPyString.toPyOpt(_ret_c)
return _ret
示例2: on_changes_int_optional_returned
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyOpt [as 别名]
def on_changes_int_optional_returned(cself, i, f, s, binar, b, d):
try:
with CPyBoxedI32.fromPyOpt(FooListenerHelper.selfToPy(cself).on_changes_int_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_boxed()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例3: __python_add
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyOpt [as 别名]
def __python_add(cself, key, value):
CPyObjectProxy.toPyObj(None, cself)[CPyString.toPyOpt(key)] = CPyString.toPyOpt(value)
示例4: python_create_client_returned_record
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyOpt [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?
示例5: __python_add
# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPyOpt [as 别名]
def __python_add(cself, el):
CPyObjectProxy.toPyObj(None, cself).add(CPyString.toPyOpt(el))