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


Python CPyString.toPy方法代码示例

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


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

示例1: update_static_messg_to

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def update_static_messg_to(static_string):
     with CPyString.fromPy(static_string) as pys_static_string:
         _ret_c = lib.cw__foo_static_update_static_messg_to(pys_static_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
开发者ID:trafi,项目名称:djinni,代码行数:9,代码来源:foo_static.py

示例2: python_create_foo_client_returned_record

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

示例3: on_string_change

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def on_string_change(self, private_string):
     with CPyString.fromPy(private_string) as pys_private_string:
         _ret_c = lib.cw__foo_listener_bf_on_string_change(self._cpp_impl, pys_private_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
开发者ID:trafi,项目名称:djinni,代码行数:9,代码来源:foo_listener_bf.py

示例4: get_set_strings

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def get_set_strings(self, ps1, ps2):
     with CPyString.fromPy(ps1) as pys_ps1,\
             CPyString.fromPy(ps2) as pys_ps2:
         _ret_c = lib.cw__foo_interface_get_set_strings(self._cpp_impl, pys_ps1.release_djinni_string(), pys_ps2.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
开发者ID:trafi,项目名称:djinni,代码行数:10,代码来源:foo_interface.py

示例5: cause_changes_string_returned

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def cause_changes_string_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_string_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 = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
开发者ID:trafi,项目名称:djinni,代码行数:10,代码来源:foo_receiver.py

示例6: on_string_change

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def on_string_change(cself, private_string):
     try:
         with CPyString.fromPy(FooListenerHelper.selfToPy(cself).on_string_change(CPyString.toPy(private_string))) 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
开发者ID:trafi,项目名称:djinni,代码行数:11,代码来源:foo_listener.py

示例7: get_extensible_record_string2

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def get_extensible_record_string2(self):
     _ret_c = lib.cw__foo_client_interface_get_extensible_record_string2(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyString.toPy(_ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_client_interface.py

示例8: on_changes_int_returned

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [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
开发者ID:trafi,项目名称:djinni,代码行数:9,代码来源:foo_listener.py

示例9: cause_py_exception

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def cause_py_exception(cself, exception_arg):
     try:
         FooListenerHelper.selfToPy(cself).cause_py_exception(CPyString.toPy(exception_arg))
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_listener.py

示例10: create_py_from_cpp_exception

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def create_py_from_cpp_exception(ds_error_message):
     e = DjinniException(CPyString.toPy(ds_error_message))
     c_ptr = ffi.new_handle(e)
     ExceptionHelper.c_data_set.add(c_ptr)
     return c_ptr
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:exception.py

示例11: __python_add

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

示例12: get_static_messg

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def get_static_messg():
     _ret_c = lib.cw__foo_static_get_static_messg()
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyString.toPy(_ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_static.py

示例13: whoami

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def whoami(self):
     _ret_c = lib.cw__user_token_whoami(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyString.toPy(_ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:user_token.py

示例14: __python_add

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

示例15: get_listener_bf_string

# 需要导入模块: from djinni.pycffi_marshal import CPyString [as 别名]
# 或者: from djinni.pycffi_marshal.CPyString import toPy [as 别名]
 def get_listener_bf_string(self):
     _ret_c = lib.cw__foo_receiver_get_listener_bf_string(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyString.toPy(_ret_c)
     assert _ret is not None
     return _ret
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_receiver.py


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