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
f4d32df1
Commit
f4d32df1
authored
Aug 05, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove function definition from cStringIO.h.
xxxPyCObject_Import() seems to be a copy of PyCObject_Import().
parent
5f8a23f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
Include/cStringIO.h
Include/cStringIO.h
+4
-23
No files found.
Include/cStringIO.h
View file @
f4d32df1
...
...
@@ -18,6 +18,9 @@ extern "C" {
This would typically be done in your init function.
*/
#define PycString_IMPORT \
PycStringIO = (struct PycStringIO_CAPI*)PyCObject_Import("cStringIO", \
"cStringIO_CAPI")
/* Basic functions to manipulate cStringIO objects from C */
...
...
@@ -46,7 +49,7 @@ static struct PycStringIO_CAPI {
*/
PyTypeObject
*
InputType
,
*
OutputType
;
}
*
PycStringIO
=
NULL
;
}
*
PycStringIO
;
/* These can be used to test if you have one */
#define PycStringIO_InputCheck(O) \
...
...
@@ -54,28 +57,6 @@ static struct PycStringIO_CAPI {
#define PycStringIO_OutputCheck(O) \
((O)->ob_type==PycStringIO->OutputType)
static
void
*
xxxPyCObject_Import
(
char
*
module_name
,
char
*
name
)
{
PyObject
*
m
,
*
c
;
void
*
r
=
NULL
;
if
((
m
=
PyImport_ImportModule
(
module_name
)))
{
if
((
c
=
PyObject_GetAttrString
(
m
,
name
)))
{
r
=
PyCObject_AsVoidPtr
(
c
);
Py_DECREF
(
c
);
}
Py_DECREF
(
m
);
}
return
r
;
}
#define PycString_IMPORT \
PycStringIO=(struct PycStringIO_CAPI*)xxxPyCObject_Import("cStringIO", "cStringIO_CAPI")
#ifdef __cplusplus
}
#endif
...
...
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