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
81c447f4
Commit
81c447f4
authored
May 06, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
turn this into a macro
parent
608d8bcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
39 deletions
+2
-39
Modules/socketmodule.c
Modules/socketmodule.c
+0
-8
Modules/socketmodule.h
Modules/socketmodule.h
+2
-31
No files found.
Modules/socketmodule.c
View file @
81c447f4
...
...
@@ -4146,14 +4146,6 @@ PySocketModule_APIObject PySocketModuleAPI =
NULL
};
PySocketModule_APIObject
*
PySocketModule_ImportModuleAndAPI
(
void
)
{
void
*
api
;
api
=
PyCapsule_Import
(
PySocket_CAPSULE_NAME
,
1
);;
return
(
PySocketModule_APIObject
*
)
api
;
}
/* Initialize the _socket module.
...
...
Modules/socketmodule.h
View file @
81c447f4
...
...
@@ -190,38 +190,9 @@ typedef struct {
PyObject
*
error
;
}
PySocketModule_APIObject
;
/* XXX The net effect of the following appears to be to define a function
XXX named PySocketModule_APIObject in _ssl.c. It's unclear why it isn't
XXX defined there directly.
#define PySocketModule_ImportModuleAndAPI() PyCapsule_Import(PySocket_CAPSULE_NAME, 1)
>>> It's defined here because other modules might also want to use
>>> the C API.
*/
#ifndef PySocket_BUILDING_SOCKET
/* --- C API ----------------------------------------------------*/
/* Interfacestructure to C API for other modules.
Call PySocketModule_ImportModuleAndAPI() to initialize this
structure. After that usage is simple:
if (!PyArg_ParseTuple(args, "O!|zz:ssl",
&PySocketModule.Sock_Type, (PyObject*)&Sock,
&key_file, &cert_file))
return NULL;
...
*/
/* You *must* call this before using any of the functions in
PySocketModule and check its outcome; otherwise all accesses will
result in a segfault. Returns 0 on success. */
PyAPI_FUNC
(
PySocketModule_APIObject
*
)
PySocketModule_ImportModuleAndAPI
(
void
);
#endif
/* !PySocket_BUILDING_SOCKET */
#ifdef __cplusplus
#ifdef __cpluplus
}
#endif
#endif
/* !Py__SOCKET_H */
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