mirror of
https://github.com/python/cpython.git
synced 2025-12-08 02:08:20 +00:00
Corrected two errors introduced by the renaming (and the subsequent
style corrections, I presume), found by Jack. Added warning that this has not been tested (Jack could only compile and link it).
This commit is contained in:
parent
b15bef85a7
commit
c88c9cb23f
1 changed files with 10 additions and 5 deletions
|
|
@ -31,6 +31,11 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
/* SV module -- interface to the Indigo video board */
|
/* SV module -- interface to the Indigo video board */
|
||||||
|
|
||||||
|
/* WARNING! This module is for hardware that we don't have any more,
|
||||||
|
so it hasn't been tested. It has been converted to the new coding
|
||||||
|
style, and it is possible that this conversion has broken something
|
||||||
|
-- user beware! */
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <svideo.h>
|
#include <svideo.h>
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
@ -593,7 +598,7 @@ sv_CaptureBurst(self, args)
|
||||||
void *bitvector = NULL;
|
void *bitvector = NULL;
|
||||||
PyObject *videodata = NULL;
|
PyObject *videodata = NULL;
|
||||||
PyObject *bitvecobj = NULL;
|
PyObject *bitvecobj = NULL;
|
||||||
PyObject* *res = NULL;
|
PyObject *res = NULL;
|
||||||
static PyObject *evenitem, *odditem;
|
static PyObject *evenitem, *odditem;
|
||||||
|
|
||||||
if (!PyArg_Parse(args, "(iiiii)", &info.format,
|
if (!PyArg_Parse(args, "(iiiii)", &info.format,
|
||||||
|
|
@ -686,6 +691,7 @@ sv_CaptureOneFrame(self, args)
|
||||||
int bytes;
|
int bytes;
|
||||||
PyObject *videodata = NULL;
|
PyObject *videodata = NULL;
|
||||||
PyObject *res = NULL;
|
PyObject *res = NULL;
|
||||||
|
char *str;
|
||||||
|
|
||||||
if (!PyArg_Parse(args, "(iii)", &format, &width, &height))
|
if (!PyArg_Parse(args, "(iii)", &format, &width, &height))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -701,10 +707,9 @@ sv_CaptureOneFrame(self, args)
|
||||||
if (!(videodata = PyString_FromStringAndSize(NULL, bytes)))
|
if (!(videodata = PyString_FromStringAndSize(NULL, bytes)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
{
|
str = PyString_AsString(videodata);
|
||||||
char* str = PyString_AsString(videodata);
|
if (!str)
|
||||||
if (!str)
|
goto finally;
|
||||||
goto finally;
|
|
||||||
|
|
||||||
if (svCaptureOneFrame(self->ob_svideo, format, &width, &height, str)) {
|
if (svCaptureOneFrame(self->ob_svideo, format, &width, &height, str)) {
|
||||||
res = sv_error();
|
res = sv_error();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue