Skip to content

Commit 84599f1

Browse files
committed
fixed type conversion type (f->d)
1 parent 7585bbe commit 84599f1

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

linuxfd-1.3.ebuild

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 1999-2013 Gentoo Foundation
2+
# Distributed under the terms of the GNU General Public License v2
3+
# $Header: $
4+
5+
EAPI=5
6+
PYTHON_COMPAT=( python{3_3,3_4} )
7+
8+
inherit distutils-r1 linux-info
9+
10+
DESCRIPTION="Python bindings for the Linux eventfd/signalfd/timerfd syscalls"
11+
HOMEPAGE="https://pypi.python.org/pypi/linuxfd/1.3 https://www.github.com/abelbeck/linuxfd"
12+
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13+
14+
LICENSE="LGPL"
15+
SLOT="0"
16+
KEYWORDS="~amd64"
17+
IUSE=""
18+
19+
DEPEND=""
20+
RDEPEND=""
21+
22+
DOCS=( COPYING README )
23+
24+
CONFIG_CHECK="EVENTFD SIGNALFD TIMERFD"
25+
ERROR_EVENTFD="${PN} requires support for timerfd() system calls (CONFIG_EVENTFD), being enabled in 'General setup -> Configure standard kernel features (expert users)'."
26+
ERROR_SIGNALFD="${PN} requires support for signalfd() system calls (CONFIG_SIGNALFD), being enabled in 'General setup -> Configure standard kernel features (expert users)'."
27+
ERROR_TIMERFD="${PN} requires support for eventfd() system calls (CONFIG_TIMERFD), being enabled in 'General setup -> Configure standard kernel features (expert users)'."
28+
29+
pkg_setup() {
30+
linux-info_pkg_setup
31+
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
setup(
2828
name = "linuxfd",
29-
version = "1.2",
29+
version = "1.3",
3030
description = "Python bindings for the Linux eventfd/signalfd/timerfd syscalls",
3131
long_description = longdescription,
3232
author = "Frank Abelbeck",

source/timerfd_c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static PyObject * _timerfd_settime(PyObject *self, PyObject *args) {
5959
PyObject *resulttuple;
6060

6161
/* parse the function's arguments: int fd, int flags, double value, double interval */
62-
if (!PyArg_ParseTuple(args, "iiff", &fd, &flags, &value, &interval)) return NULL;
62+
if (!PyArg_ParseTuple(args, "iidd", &fd, &flags, &value, &interval)) return NULL;
6363

6464
/* prepare struct itimerspec */
6565
new_value.it_value.tv_sec = (time_t)value;
@@ -77,7 +77,7 @@ static PyObject * _timerfd_settime(PyObject *self, PyObject *args) {
7777
/* convert returned struct old_value */
7878
value = (double)old_value.it_value.tv_sec + (double)old_value.it_value.tv_nsec / 1e9;
7979
interval = (double)old_value.it_interval.tv_sec + (double)old_value.it_interval.tv_nsec / 1e9;
80-
resulttuple = Py_BuildValue("(ff)", value, interval);
80+
resulttuple = Py_BuildValue("(dd)", value, interval);
8181

8282
/* everything's fine, return tuple (value,interval) created from old_value */
8383
return resulttuple;

0 commit comments

Comments
 (0)