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
574b1279
Commit
574b1279
authored
Jan 02, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove traces of Py_InitModule*.
parent
aa672ebe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
Objects/moduleobject.c
Objects/moduleobject.c
+2
-2
PC/example_nt/example.c
PC/example_nt/example.c
+14
-2
No files found.
Objects/moduleobject.c
View file @
574b1279
...
...
@@ -91,9 +91,9 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
This is a bit of a hack: when the shared library is loaded,
the module name is "package.module", but the module calls
Py
_InitModul
e*() with just "module" for the name. The shared
Py
Module_Creat
e*() with just "module" for the name. The shared
library loader squirrels away the true name of the module in
_Py_PackageContext, and Py
_InitModul
e*() will substitute this
_Py_PackageContext, and Py
Module_Creat
e*() will substitute this
(if the name actually matches).
*/
if
(
_Py_PackageContext
!=
NULL
)
{
...
...
PC/example_nt/example.c
View file @
574b1279
...
...
@@ -13,8 +13,20 @@ static PyMethodDef example_methods[] = {
{
NULL
,
NULL
}
};
static
struct
PyModuleDef
examplemodule
=
{
PyModuleDef_HEAD_INIT
,
"example"
,
"example module doc string"
,
-
1
,
example_methods
,
NULL
,
NULL
,
NULL
,
NULL
};
PyMODINIT_FUNC
init
example
(
void
)
PyInit_
example
(
void
)
{
Py_InitModule
(
"example"
,
example_methods
);
return
PyModule_Create
(
&
examplemodule
);
}
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