search for: pyarg_parsetupl

Displaying 20 results from an estimated 40 matches for "pyarg_parsetupl".

Did you mean: pyarg_parsetuple
2014 Jul 21
1
python-shout 0.2.1 with icecast 2.4.0 segfaults
...test.mp3 > > Using libshout version 2.3.1 > > opening file test.mp3 > > Segmentation fault > > > > As I'm not very well versed with those things it took me a bit, but I > eventually dug out the problem. Something changed in python 2.5 (sic!), > that broke the PyArg_ParseTuple call in shout.c > (https://docs.python.org/2/c-api/arg.html#PyArg_ParseTuple). > > Below is a diff of a quick-fix that works for me. Before I commit that > and roll a release, I'd like to hear though from someone well versed in > those things if it's the right-thing? to do....
2014 Jul 18
2
python-shout 0.2.1 with icecast 2.4.0 segfaults
Hi there, I am trying to use python-shout 0.2.1 to broadcast to a icecast 2.4.0 server, which result in a segmentation fault and I can't understand why. Is anyone else experiencing this problem? Here is the config that I use with icecast 2.4.0. <icecast> <limits> <clients>100</clients> <sources>2</sources>
2011 Apr 27
2
[PATCH] hivex/python fix for i386 integer size issue
...check | make[1]: Entering directory `/home/bengen/src/deb/hivex/hivex.git/python' | 010-import.py | 020-open.py | 021-close.py | 200-write.py | python: hivex-py.c:52: get_handle: Assertion `obj' failed. `---- I narrowed this down to hivex-py.c:py_hivex_node_add_child(): The call ,---- | PyArg_ParseTuple (args, (char *) "OLs:hivex_node_add_child", | &py_h, &parent, &name) `---- results in `py_h' set to NULL, though Python's documentation claims that this cannot happen. I think this happens because `parent' is declared a `long int', bu...
2014 Jul 21
0
python-shout 0.2.1 with icecast 2.4.0 segfaults
...[?] > # ./env/bin/python example.py test.mp3 > Using libshout version 2.3.1 > opening file test.mp3 > Segmentation fault > As I'm not very well versed with those things it took me a bit, but I eventually dug out the problem. Something changed in python 2.5 (sic!), that broke the PyArg_ParseTuple call in shout.c (https://docs.python.org/2/c-api/arg.html#PyArg_ParseTuple). Below is a diff of a quick-fix that works for me. Before I commit that and roll a release, I'd like to hear though from someone well versed in those things if it's the right-thing? to do. -----------------------...
2012 Mar 29
3
Unable to find Python development headers
When running ./configure, I get the following error message: checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts
2020 Sep 10
1
[libnbd PATCH] python: Fix more memory leaks
...or either the Closure or the OClosure, there was enough inaccuracy in python reference counting to cause a leak or double-free. We were not consistently checking for python function failures (such as when a wrong type is passed in). While touching this, drop a pointless cast to char* when calling PyArg_ParseTuple, and rearrange some of the code for fewer loops over args/optargs in the generator. Fixes: 4fab2104ab Fixes: bf0eee111f Fixes: 82dac49af0 --- I'm pushing this as followup to my previous patch. I'm pretty embarrassed that we've let nbdsh leak as many bytes as were read via h.pread(),...
2023 Feb 20
2
[PATCH 1/2] python: Avoid crash if callback parameters cannot be built
On Mon, Feb 20, 2023 at 10:45 AM Laszlo Ersek <lersek at redhat.com> wrote: > > On 2/17/23 17:52, Eric Blake wrote: > > On Thu, Feb 16, 2023 at 03:09:02PM +0100, Laszlo Ersek wrote: > > >> - Py_BuildValue with the "O" format specifier transfers the new list's > >> *sole* reference (= ownership) to the just-built higher-level object
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
The Python 3 bindings currently are unable to deal with non UTF8 characters. This series continues what proposed in RHBZ#1406906. A new function 'set_decode_error_handler' allows the User to specify how to deal with decoding errors. The default behaviour will be raising a UnicodeDecodeError. If the handler is changed to 'surrogateescape', non UTF8 characters will be escaped in a
2019 Jun 03
3
[PATCH libnbd] api: nbd_get_version, nbd_supports_uri and nbd_get_package_name.
....c b/python/handle.c index 7b5e139..7cff41a 100644 --- a/python/handle.c +++ b/python/handle.c @@ -89,28 +89,6 @@ free_aio_buffer (PyObject *capsule) free (buf); } -PyObject * -nbd_internal_py_get_package_name (PyObject *self, PyObject *args) -{ - static char name[] = PACKAGE_NAME; - - if (!PyArg_ParseTuple (args, (char *) ":nbd_internal_py_get_package_name")) - return NULL; - - return PyUnicode_FromStringAndSize (name, strlen (name)); -} - -PyObject * -nbd_internal_py_get_package_version (PyObject *self, PyObject *args) -{ - static char version[] = PACKAGE_VERSION; - - if (!PyArg_Par...
2012 Mar 28
0
[LLVMdev] GSoC 2012 Proposal: Python bindings for LLVM
...\ PyObject *obj1, *obj3; \ intype1 arg1; \ const char *arg2; \ intype3 arg3; \ \ if (!PyArg_ParseTuple(args, "OsO", &obj1, &arg2, &obj3)) \ return NULL; \ \ arg1 = ( intype1 ) PyCObject_AsVoidPtr(obj1); \ arg3 = ( intype3 ) PyCObject_AsVoidPtr(obj3); \...
2009 Feb 24
0
any help with pyogg and pyvorbis?
...: break no page is actually written, it returns None. And consequently it breaks. The wrapper-source says this: /* TODO: You can't keep a page between calls to flush or pageout!! */ static PyObject * py_ogg_stream_pageout(PyObject *self, PyObject *args) { ogg_page op; int res; if (!PyArg_ParseTuple(args, "")) return NULL; res = ogg_stream_pageout(PY_OGG_STREAM(self), &op); if (res == 0) { Py_INCREF(Py_None); return Py_None; } return py_ogg_page_from_page(&op); } And ogg_stream_pageout always returns 0, so, insufficent data has been accumulated to write...
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
...yObject **get_all_event_callbacks (guestfs_h *g, size_t *len_rtn); void @@ -45,6 +47,17 @@ guestfs_int_py_extend_module (PyObject *module) } PyObject * +guestfs_int_py_set_decode_error_handler (PyObject *self, PyObject *args) +{ + const char *previous_handler = decode_error_handler; + + if (!PyArg_ParseTuple (args, (char *) "s:set_decode_error_handler", &decode_error_handler)) + return NULL; + + return guestfs_int_py_fromstring (previous_handler); +} + +PyObject * guestfs_int_py_create (PyObject *self, PyObject *args) { guestfs_h *g; @@ -386,7 +399,8 @@ guestfs_int_py_fromstring...
2017 Jan 26
10
[nbdkit PATCH v2 0/6] bind .zero to Python
Fix some things I noticed while reviewing v1, and follow Rich's idea to add a new nbdkit_set_error() utility function with a binding for Python users to request a particular error (rather than being forced to live with whatever stale value is in errno after all the intermediate binding glue code). I could not easily find out how to register a C function callable from perl bindings, and have
2017 Jan 26
0
[nbdkit PATCH v2 5/6] python: Expose nbdkit_set_error to python script
...ugins/python/python.c b/plugins/python/python.c index 0504715..4a0ff50 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -54,6 +54,23 @@ static const char *script; static PyObject *module; +static PyObject * +set_error (PyObject *self, PyObject *args) +{ + int err; + + if (!PyArg_ParseTuple(args, "i", &err)) + return NULL; + nbdkit_set_error (err); + Py_RETURN_NONE; +} + +static PyMethodDef NbdkitMethods[] = { + { "set_error", set_error, METH_VARARGS, + "Store an errno value prior to throwing an exception" }, + { NULL } +}; + /* Is a callb...
2013 Aug 26
2
Problem with buliding Xen
...x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc ... checking for unistd.h... yes checking for python-config... /usr/bin/python-config checking Python.h usability... yes checking Python.h presence... yes checking for Python.h... yes checking for PyArg_ParseTuple in -lpython2.7... yes checking for xgettext... no configure: error: Unable to find xgettext, please install xgettext configure: error: ./configure failed for tools Based on this mailing thread that I found online ( http://lists.xen.org/archives/html/xen-devel/2012-03/msg00229.html), I do have tho...
2017 Jan 26
0
[nbdkit PATCH v2 6/6] python: Support zero callback
...00644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -54,6 +54,8 @@ static const char *script; static PyObject *module; +static int last_error; + static PyObject * set_error (PyObject *self, PyObject *args) { @@ -62,6 +64,7 @@ set_error (PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "i", &err)) return NULL; nbdkit_set_error (err); + last_error = err; Py_RETURN_NONE; } @@ -441,6 +444,48 @@ py_trim (void *handle, uint32_t count, uint64_t offset) } static int +py_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) +{ + PyObjec...
2017 Jan 27
0
[nbdkit PATCH v3 4/4] python: Support zero callback
...00644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -54,6 +54,8 @@ static const char *script; static PyObject *module; +static int last_error; + static PyObject * set_error (PyObject *self, PyObject *args) { @@ -62,6 +64,7 @@ set_error (PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "i", &err)) return NULL; nbdkit_set_error (err); + last_error = err; Py_RETURN_NONE; } @@ -441,6 +444,48 @@ py_trim (void *handle, uint32_t count, uint64_t offset) } static int +py_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) +{ + PyObjec...
2012 Nov 26
0
How to set GCC version for ovmf compilation
...memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for python-config... /usr/bin/python-config checking Python.h usability... yes checking Python.h presence... yes checking for Python.h... yes checking for PyArg_ParseTuple in -lpython2.7... no configure: error: Unable to find a suitable python development library I am using a Ubuntu guantal with recompiled binutils to include all targets. But is should not have any effect. The problem is that I cannot set the gcc version for OVMF to say 4.6 which should do the job...
2013 Jun 15
1
Bug#712366: xen: FTBFS: configure: error: Could not find libcrypto
..... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking for python-config... /usr/bin/python-config > checking Python.h usability... yes > checking Python.h presence... yes > checking for Python.h... yes > checking for PyArg_ParseTuple in -lpython2.7... yes > checking for xgettext... /usr/bin/xgettext > checking for as86... /usr/bin/as86 > checking for ld86... /usr/bin/ld86 > checking for bcc... /usr/bin/bcc > checking for iasl... /usr/bin/iasl > checking uuid/uuid.h usability... yes > checking uuid/uuid.h p...
2008 Aug 30
3
Updated version of patch
Attached is a patch against shout-python-0.2 which does two trivial but very useful things (1) The function "get_connected" is exported so that shout-python becomes usable in nonblocking mode. In the current version of shout-python "open" raises an exception in nonblocking mode. (2) The global interpreter lock is released in the potentially blocking functions