Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
58ae13c1
Commit
58ae13c1
authored
Dec 31, 2002
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the parameter 'xp' in several methods to 'self', since that's
what it is.
parent
499b73e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
Modules/ossaudiodev.c
Modules/ossaudiodev.c
+23
-23
No files found.
Modules/ossaudiodev.c
View file @
58ae13c1
...
...
@@ -94,7 +94,7 @@ static PyObject *OSSAudioError;
static
oss_audio_t
*
newossobject
(
PyObject
*
arg
)
{
oss_audio_t
*
xp
;
oss_audio_t
*
self
;
int
fd
,
afmts
,
imode
;
char
*
basedev
=
NULL
;
char
*
mode
=
NULL
;
...
...
@@ -139,24 +139,24 @@ newossobject(PyObject *arg)
return
NULL
;
}
/* Create and initialize the object */
if
((
xp
=
PyObject_New
(
oss_audio_t
,
&
OSSAudioType
))
==
NULL
)
{
if
((
self
=
PyObject_New
(
oss_audio_t
,
&
OSSAudioType
))
==
NULL
)
{
close
(
fd
);
return
NULL
;
}
xp
->
fd
=
fd
;
xp
->
mode
=
imode
;
xp
->
icount
=
xp
->
ocount
=
0
;
xp
->
afmts
=
afmts
;
return
xp
;
self
->
fd
=
fd
;
self
->
mode
=
imode
;
self
->
icount
=
self
->
ocount
=
0
;
self
->
afmts
=
afmts
;
return
self
;
}
static
void
oss_dealloc
(
oss_audio_t
*
xp
)
oss_dealloc
(
oss_audio_t
*
self
)
{
/* if already closed, don't reclose it */
if
(
xp
->
fd
!=
-
1
)
close
(
xp
->
fd
);
PyObject_Del
(
xp
);
if
(
self
->
fd
!=
-
1
)
close
(
self
->
fd
);
PyObject_Del
(
self
);
}
...
...
@@ -169,7 +169,7 @@ newossmixerobject(PyObject *arg)
{
char
*
basedev
=
NULL
,
*
mode
=
NULL
;
int
fd
,
imode
;
oss_mixer_t
*
xp
;
oss_mixer_t
*
self
;
if
(
!
PyArg_ParseTuple
(
arg
,
"|ss"
,
&
basedev
,
&
mode
))
{
return
NULL
;
...
...
@@ -197,23 +197,23 @@ newossmixerobject(PyObject *arg)
return
NULL
;
}
if
((
xp
=
PyObject_New
(
oss_mixer_t
,
&
OSSMixerType
))
==
NULL
)
{
if
((
self
=
PyObject_New
(
oss_mixer_t
,
&
OSSMixerType
))
==
NULL
)
{
close
(
fd
);
return
NULL
;
}
xp
->
fd
=
fd
;
self
->
fd
=
fd
;
return
xp
;
return
self
;
}
static
void
oss_mixer_dealloc
(
oss_mixer_t
*
xp
)
oss_mixer_dealloc
(
oss_mixer_t
*
self
)
{
/* if already closed, don't reclose it */
if
(
xp
->
fd
!=
-
1
)
close
(
xp
->
fd
);
PyObject_Del
(
xp
);
if
(
self
->
fd
!=
-
1
)
close
(
self
->
fd
);
PyObject_Del
(
self
);
}
...
...
@@ -830,15 +830,15 @@ static PyMethodDef oss_mixer_methods[] = {
};
static
PyObject
*
oss_getattr
(
oss_audio_t
*
xp
,
char
*
name
)
oss_getattr
(
oss_audio_t
*
self
,
char
*
name
)
{
return
Py_FindMethod
(
oss_methods
,
(
PyObject
*
)
xp
,
name
);
return
Py_FindMethod
(
oss_methods
,
(
PyObject
*
)
self
,
name
);
}
static
PyObject
*
oss_mixer_getattr
(
oss_mixer_t
*
xp
,
char
*
name
)
oss_mixer_getattr
(
oss_mixer_t
*
self
,
char
*
name
)
{
return
Py_FindMethod
(
oss_mixer_methods
,
(
PyObject
*
)
xp
,
name
);
return
Py_FindMethod
(
oss_mixer_methods
,
(
PyObject
*
)
self
,
name
);
}
static
PyTypeObject
OSSAudioType
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment