X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2Fdolmod.c;h=fd026fa57a08d7ca944ecb7657a084a7703b6380;hb=32a93257286826206a956dc4b15a9542c5c608f5;hp=36910ec4a2febd2121c5a2e01678487de51a8b90;hpb=071ecf131bff73dd4456e4cc2c775ce7af335289;p=doldaconnect.git diff --git a/lib/python/dolmod.c b/lib/python/dolmod.c index 36910ec..fd026fa 100644 --- a/lib/python/dolmod.c +++ b/lib/python/dolmod.c @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -90,6 +90,9 @@ static PyObject *resp_intresp(struct respobj *self) case 3: PyList_SetItem(sl, i, PyFloat_FromDouble(ires->argv[i].val.flnum)); break; + case 4: + PyList_SetItem(sl, i, PyLong_FromLongLong(ires->argv[i].val.lnum)); + break; } } dc_freeires(ires); @@ -189,11 +192,11 @@ static PyObject *mod_select(PyObject *self, PyObject *args) return(NULL); } if(((pfd.revents & POLLIN) && dc_handleread()) || ((pfd.revents & POLLOUT) && dc_handlewrite())) { - if(errno == 0) { - fd = -1; + fd = -1; + if(errno == 0) Py_RETURN_FALSE; - } PyErr_SetFromErrno(PyExc_OSError); + return(NULL); } if(ret > 0) Py_RETURN_TRUE;