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
4e36d588
Commit
4e36d588
authored
Dec 23, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shortened / wrapped some long lines.
Removed warning on use of panel_userptr() in PyCursesPanel_userptr().
parent
5caee408
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
Modules/_curses_panel.c
Modules/_curses_panel.c
+11
-8
No files found.
Modules/_curses_panel.c
View file @
4e36d588
...
...
@@ -141,24 +141,24 @@ find_po(PANEL *pan)
PARSESTR - format string for argument parsing */
#define Panel_NoArgNoReturnFunction(X) \
static PyObject *PyCursesPanel_
## X
(PyCursesPanelObject *self, PyObject *args) \
static PyObject *PyCursesPanel_
##X
(PyCursesPanelObject *self, PyObject *args) \
{ if (!PyArg_NoArgs(args)) return NULL; \
return PyCursesCheckERR(X(self->pan), # X); }
#define Panel_NoArgReturnStringFunction(X) \
static PyObject *PyCursesPanel_
## X
(PyCursesPanelObject *self, PyObject *args) \
static PyObject *PyCursesPanel_
##X
(PyCursesPanelObject *self, PyObject *args) \
{ if (!PyArg_NoArgs(args)) return NULL; \
return PyString_FromString(X(self->pan)); }
#define Panel_NoArgTrueFalseFunction(X) \
static PyObject *
PyCursesPanel_ ## X
(PyCursesPanelObject *self, PyObject *args) \
static PyObject *
PyCursesPanel_##X
(PyCursesPanelObject *self, PyObject *args) \
{ \
if (!PyArg_NoArgs(args)) return NULL; \
if (X (self->pan) == FALSE) { Py_INCREF(Py_False); return Py_False; } \
else { Py_INCREF(Py_True); return Py_True; } }
#define Panel_TwoArgNoReturnFunction(X, TYPE, PARSESTR) \
static PyObject *
PyCursesPanel_ ## X
(PyCursesPanelObject *self, PyObject *args) \
static PyObject *
PyCursesPanel_##X
(PyCursesPanelObject *self, PyObject *args) \
{ \
TYPE arg1, arg2; \
if (!PyArg_Parse(args,PARSESTR, &arg1, &arg2)) return NULL; \
...
...
@@ -309,7 +309,8 @@ PyCursesPanel_set_panel_userptr(PyCursesPanelObject *self, PyObject *args)
}
obj
=
PyTuple_GetItem
(
args
,
0
);
Py_INCREF
(
obj
);
return
PyCursesCheckERR
(
set_panel_userptr
(
self
->
pan
,
obj
),
"set_panel_userptr"
);
return
PyCursesCheckERR
(
set_panel_userptr
(
self
->
pan
,
obj
),
"set_panel_userptr"
);
}
static
PyObject
*
PyCursesPanel_userptr
...
...
@@ -317,8 +318,9 @@ static PyObject *PyCursesPanel_userptr
{
PyObject
*
obj
;
PyCursesInitialised
;
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
obj
=
panel_userptr
(
self
->
pan
);
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
obj
=
(
PyObject
*
)
panel_userptr
(
self
->
pan
);
Py_INCREF
(
obj
);
return
obj
;
}
...
...
@@ -408,7 +410,8 @@ PyCurses_new_panel(PyObject *self, PyObject *args)
PyCursesWindowObject
*
win
;
PANEL
*
pan
;
if
(
!
PyArg_ParseTuple
(
args
,
"O!"
,
&
PyCursesWindow_Type
,
&
win
))
return
NULL
;
if
(
!
PyArg_ParseTuple
(
args
,
"O!"
,
&
PyCursesWindow_Type
,
&
win
))
return
NULL
;
pan
=
new_panel
(
win
->
win
);
if
(
pan
==
NULL
)
{
PyErr_SetString
(
PyCursesError
,
catchall_NULL
);
...
...
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