コード例 #1
0
ファイル: foo_static.py プロジェクト: ubook-editora/finn
 def opt_i64_id(od):
     with CPyBoxedI64.fromPyOpt(od) as pyopt_od:
         _ret_c = lib.cw__foo_static_opt_i64_id(
             pyopt_od.release_djinni_boxed())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyBoxedI64.toPyOpt(_ret_c)
         return _ret
コード例 #2
0
 def get_assorted_primitives_f12(cself):
     try:
         with CPyBoxedI64.fromPyOpt(CPyRecord.toPy(None, cself).o_sixtyfour) as py_obj:
             return py_obj.release_djinni_boxed()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
コード例 #3
0
 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?
コード例 #4
0
ファイル: foo_static.py プロジェクト: trafi/djinni
 def opt_i64_id(od):
     with CPyBoxedI64.fromPyOpt(od) as pyopt_od:
         _ret_c = lib.cw__foo_static_opt_i64_id(pyopt_od.release_djinni_boxed())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyBoxedI64.toPyOpt(_ret_c)
         return _ret