search for: pylong_

Displaying 3 results from an estimated 3 matches for "pylong_".

Did you mean: pylong
2012 Sep 20
0
[PATCH] python: PyInt_* no longer exists in python3, replace with PyLong_*
...gs (char **argv) pr " optargs_s.bitmask |= %s_%s_BITMASK;\n" c_optarg_prefix uc_n; (match optarg with | OBool _ | OInt _ -> - pr " optargs_s.%s = PyInt_AsLong (py_%s);\n" n n; + pr " optargs_s.%s = PyLong_AsLong (py_%s);\n" n n; pr " if (PyErr_Occurred ()) return NULL;\n" | OInt64 _ -> pr " optargs_s.%s = PyLong_AsLongLong (py_%s);\n" n n; -- 1.7.10.4
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...quot;extents method did not return a list of 3-tuples"); > + Py_DECREF (r); > + return -1; > + } > + py_offset = PyTuple_GetItem (t, 0); > + py_length = PyTuple_GetItem (t, 1); > + py_type = PyTuple_GetItem (t, 2); > + extent_offset = PyLong_AsUnsignedLongLong (py_offset); > + extent_length = PyLong_AsUnsignedLongLong (py_length); > + extent_type = PyLong_AsUnsignedLong (py_type); > + if (check_python_failure ("PyLong") == -1) { Is it really right to be doing error checking only once, but after three...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...t) != 3) { + nbdkit_error ("extents method did not return a list of 3-tuples"); + Py_DECREF (r); + return -1; + } + py_offset = PyTuple_GetItem (t, 0); + py_length = PyTuple_GetItem (t, 1); + py_type = PyTuple_GetItem (t, 2); + extent_offset = PyLong_AsUnsignedLongLong (py_offset); + extent_length = PyLong_AsUnsignedLongLong (py_length); + extent_type = PyLong_AsUnsignedLong (py_type); + if (check_python_failure ("PyLong") == -1) { + Py_DECREF (r); + return -1; + } + if (nbdkit_add_extent (extents...