Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision c92fc8261dd89cfc1d11a5aee28ed28df4579346 authored by Florent Xicluna on 27 February 2010, 11:26:58 UTC, committed by Florent Xicluna on 27 February 2010, 11:26:58 UTC
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78461 | florent.xicluna | 2010-02-26 11:40:58 +0100 (ven, 26 fév 2010) | 2 lines #691291: codecs.open() should not convert end of lines on reading and writing. ........ r78482 | florent.xicluna | 2010-02-27 12:19:18 +0100 (sam, 27 fév 2010) | 2 lines Add entry for issue #691291. ........
1 parent 9ea3bba
Tip revision: c92fc8261dd89cfc1d11a5aee28ed28df4579346 authored by Florent Xicluna on 27 February 2010, 11:26:58 UTC
Merged revisions 78461,78482 via svnmerge from
Merged revisions 78461,78482 via svnmerge from
Tip revision: c92fc82
sgimodule.c
/* SGI module -- random SGI-specific things */
#include "Python.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
static PyObject *
sgi_nap(PyObject *self, PyObject *args)
{
long ticks;
if (!PyArg_ParseTuple(args, "l:nap", &ticks))
return NULL;
Py_BEGIN_ALLOW_THREADS
sginap(ticks);
Py_END_ALLOW_THREADS
Py_INCREF(Py_None);
return Py_None;
}
extern char *_getpty(int *, int, mode_t, int);
static PyObject *
sgi__getpty(PyObject *self, PyObject *args)
{
int oflag;
int mode;
int nofork;
char *name;
int fildes;
if (!PyArg_ParseTuple(args, "iii:_getpty", &oflag, &mode, &nofork))
return NULL;
errno = 0;
name = _getpty(&fildes, oflag, (mode_t)mode, nofork);
if (name == NULL) {
PyErr_SetFromErrno(PyExc_IOError);
return NULL;
}
return Py_BuildValue("(si)", name, fildes);
}
static PyMethodDef sgi_methods[] = {
{"nap", sgi_nap, METH_VARARGS},
{"_getpty", sgi__getpty, METH_VARARGS},
{NULL, NULL} /* sentinel */
};
void
initsgi(void)
{
Py_InitModule("sgi", sgi_methods);
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...