Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision af211c85afff4080fa5a650348d1bd21d9ae0e50 authored by Mark Dickinson on 18 February 2010, 14:55:26 UTC, committed by Mark Dickinson on 18 February 2010, 14:55:26 UTC
........ r78217 | mark.dickinson | 2010-02-18 14:27:02 +0000 (Thu, 18 Feb 2010) | 5 lines Issue #7633: Context method in the decimal module (with the exception of the 'canonical' and 'is_canonical' methods) now consistently accept integer arguments wherever a Decimal instance is accepted. Thanks Juan José Conti for the patch. ........ r78218 | mark.dickinson | 2010-02-18 14:45:33 +0000 (Thu, 18 Feb 2010) | 1 line Doctest fixes for decimal.py: add an integer-argument doctest for logical_invert; don't use integer literals with a leading zero. ........
1 parent 5f943ed
Tip revision: af211c85afff4080fa5a650348d1bd21d9ae0e50 authored by Mark Dickinson on 18 February 2010, 14:55:26 UTC
Blocked revisions 78217-78218 via svnmerge
Blocked revisions 78217-78218 via svnmerge
Tip revision: af211c8
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);
}
Computing file changes ...