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


Python pycffi_marshal.CPyPrimitive类代码示例

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


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

示例1: cause_changes_int_returned

 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
开发者ID:trafi,项目名称:djinni,代码行数:8,代码来源:foo_receiver.py

示例2: __get_value

 def __get_value(cself, key):
     pyKey = CPyPrimitive.toPy(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
开发者ID:trafi,项目名称:djinni,代码行数:9,代码来源:dh__map_int32_t_int32_t.py

示例3: python_create_foo_client_returned_record

 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,代码行数:7,代码来源:foo_client_returned_record_helper.py

示例4: get_foo_client_returned_record_f1

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_client_returned_record_helper.py

示例5: __get_elem

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:dh__list_int32_t.py

示例6: get_record_with_derivings_f1

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:record_with_derivings_helper.py

示例7: get_foo_extensible_record_f1

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_extensible_record_helper.py

示例8: on_changes_int_returned

 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,代码行数:7,代码来源:foo_listener.py

示例9: get_assorted_primitives_f7

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:assorted_primitives_helper.py

示例10: get_foo_constants_f1

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_constants_helper.py

示例11: __python_next

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:dh__set_int32_t.py

示例12: get_some_const_record_f2

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:some_const_record_helper.py

示例13: get_private_int

 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
开发者ID:trafi,项目名称:djinni,代码行数:7,代码来源:foo_listener.py

示例14: __get_value

 def __get_value(cself, key):
     pyKey = CPyPrimitive.toPy(key)
     assert pyKey is not None
     try:
         _ret = CPyObject.fromPy(ListDateHelper.c_data_set, CPyObjectProxy.toPyObj(None, cself)[pyKey])
         assert _ret != ffi.NULL
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
开发者ID:trafi,项目名称:djinni,代码行数:10,代码来源:dh__map_int8_t_list_date.py

示例15: python_create_assorted_primitives

 def python_create_assorted_primitives(b,eight,sixteen,thirtytwo,sixtyfour,fthirtytwo,fsixtyfour,o_b,o_eight,o_sixteen,o_thirtytwo,o_sixtyfour,o_fthirtytwo,o_fsixtyfour):
     py_rec = AssortedPrimitives(
         CPyPrimitive.toPy(b),
         CPyPrimitive.toPy(eight),
         CPyPrimitive.toPy(sixteen),
         CPyPrimitive.toPy(thirtytwo),
         CPyPrimitive.toPy(sixtyfour),
         CPyPrimitive.toPy(fthirtytwo),
         CPyPrimitive.toPy(fsixtyfour),
         CPyBoxedBool.toPyOpt(o_b),
         CPyBoxedI8.toPyOpt(o_eight),
         CPyBoxedI16.toPyOpt(o_sixteen),
         CPyBoxedI32.toPyOpt(o_thirtytwo),
         CPyBoxedI64.toPyOpt(o_sixtyfour),
         CPyBoxedF32.toPyOpt(o_fthirtytwo),
         CPyBoxedF64.toPyOpt(o_fsixtyfour))
     return CPyRecord.fromPy(AssortedPrimitives.c_data_set, py_rec) #to do: can be optional?
开发者ID:trafi,项目名称:djinni,代码行数:17,代码来源:assorted_primitives_helper.py


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