Displaying 8 results from an estimated 8 matches for "py_type".
Did you mean:
p_type
2020 Aug 10
2
[PATCH nbdkit] python: Allow extents to return any iterable (which includes lists).
...ect_GetIter (r);
+ if (iter == NULL) {
+ nbdkit_error ("extents method did not return "
+ "something which is iterable");
Py_DECREF (r);
return -1;
}
- for (i = 0; i < size; ++i) {
- PyObject *t, *py_offset, *py_length, *py_type;
+ size = 0;
+ while ((t = PyIter_Next (iter)) != NULL) {
+ PyObject *py_offset, *py_length, *py_type;
uint64_t extent_offset, extent_length;
uint32_t extent_type;
- t = PyList_GetItem (r, i);
+ size++;
+
if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...uple (offset, length, type).
+ */
+ if (!PyList_Check (r)) {
+ nbdkit_error ("extents method did not return a list");
+ Py_DECREF (r);
+ return -1;
+ }
+
+ size = PyList_Size (r);
+ for (i = 0; i < size; ++i) {
+ PyObject *t, *py_offset, *py_length, *py_type;
+ uint64_t extent_offset, extent_length;
+ uint32_t extent_type;
+
+ t = PyList_GetItem (r, i);
+ if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
+ nbdkit_error ("extents method did not return a list of 3-tuples");
+ Py_DECREF (r);
+ return -1;...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...if (!PyList_Check (r)) {
> + nbdkit_error ("extents method did not return a list");
> + Py_DECREF (r);
> + return -1;
> + }
> +
> + size = PyList_Size (r);
> + for (i = 0; i < size; ++i) {
> + PyObject *t, *py_offset, *py_length, *py_type;
> + uint64_t extent_offset, extent_length;
> + uint32_t extent_type;
> +
> + t = PyList_GetItem (r, i);
> + if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
> + nbdkit_error ("extents method did not return a list of 3-tuples");
> +...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...is
supported by the C API.
> + nbdkit_error ("extents method did not return a list");
> + Py_DECREF (r);
> + return -1;
> + }
> +
> + size = PyList_Size (r);
> + for (i = 0; i < size; ++i) {
> + PyObject *t, *py_offset, *py_length, *py_type;
> + uint64_t extent_offset, extent_length;
> + uint32_t extent_type;
> +
> + t = PyList_GetItem (r, i);
> + if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
> + nbdkit_error ("extents method did not return a list of 3-tuples");
> +...
2012 Mar 28
0
[LLVMdev] GSoC 2012 Proposal: Python bindings for LLVM
...P 3121) [2]
In Python 3, the module initialization routines should look like this:
*PyObject *PyInit_<modulename>()*
When creating a module, a struct PyModuleDef should be passed as a
parameter.
2. Making PyObject_HEAD conform to standard C (PEP 3123) [3]
Some macros are added, for instance, *PY_TYPE, PY_REFCNT,PY_SIZE*. So a
code block *func->ob_type->tp_name* in Python 2.x should be replaced with *
PY_TYPE(func)->ty_nam*e in Python 3.
3. Byte vectors and String/Unicode Unification (PEP 0332) [4]
The *str* type and its accompanying support functions are gone and is
replaced with *byte...
2010 Sep 09
2
[PATCH]: add libxl python binding
...xen/lowlevel/xl/_pyxl_types.c
rm -f $(DEPS)
-include $(DEPS)
diff -r b19856f6dd76 tools/python/genwrap.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/python/genwrap.py Thu Sep 09 12:06:50 2010 +0100
@@ -0,0 +1,346 @@
+#!/usr/bin/python
+
+import sys,os
+
+import libxltypes
+
+def py_type(ty):
+ if ty == libxltypes.bool or isinstance(ty, libxltypes.BitField) and ty.width == 1:
+ return "Bool"
+ if isinstance(ty, libxltypes.Number):
+ if ty.signed:
+ return "Int"
+ else:
+ return "Uint"
+ if ty == libxl...
2012 Apr 04
10
[PATCH 0 of 2] libxl: add libxl_domain_config_init
The following series implements libxl_domain_config_init as per the
libxl API requirement that each type has an init function.
The first function does this in an open coded manner and is proposed
for Xen 4.2.
The second function is RFC only since it moves the definition of this
type into the IDL and makes the required infrastructure updates to
enable this. I think this is more 4.3 material at
2012 Jul 04
53
[PATCH 00 of 10 v3] Automatic NUMA placement for xl
Hello,
Third version of the NUMA placement series Xen 4.2.
All the comments received during v2''s review have been addressed (more details
in single changelogs).
The most notable changes are the following:
- the libxl_cpumap --> libxl_bitmap renaming has been rebased on top of the
recent patches that allows us to allocate bitmaps of different sizes;
- the heuristics for deciding