FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/PC/example_nt/example.c at 3.3 · python/cpython · GitHub
python
cpython
Repository navigation
Code
Issues
5k+
(5k+)
Pull requests
2.3k
(2.3k)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
PC
/
example_nt
/
example.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (28 loc) · 549 Bytes
Breadcrumbs
cpython
/
PC
/
example_nt
/
example.c
Copy path
File metadata and controls
32 lines (28 loc) · 549 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include
"Python.h"
static
PyObject
*
ex_foo
(
PyObject
*
self
,
PyObject
*
args
)
{
printf
(
"Hello, world\n"
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyMethodDef
example_methods
[]
=
{
{
"foo"
,
ex_foo
,
METH_VARARGS
,
"foo() doc string"
},
{
NULL
,
NULL
}
};
static
struct
PyModuleDef
examplemodule
=
{
PyModuleDef_HEAD_INIT
,
"example"
,
"example module doc string"
,
-1
,
example_methods
,
NULL
,
NULL
,
NULL
,
NULL
};
PyMODINIT_FUNC
PyInit_example
(
void
)
{
return
PyModule_Create
(
&
examplemodule
);
}
Back
|
FazBrowse Home
|
New Git URL