repo.or.cz
/
python.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updated with fix for #3126.
[python.git]
/
PC
/
example_nt
/
example.c
blob
953fb824e7f70fb4696c32e6ab4f7f5c835de4fc
1
#include
"Python.h"
2
3
static
PyObject
*
4
ex_foo
(
PyObject
*
self
,
PyObject
*
args
)
5
{
6
printf
(
"Hello, world
\n
"
);
7
Py_INCREF
(
Py_None
);
8
return
Py_None
;
9
}
10
11
static
PyMethodDef example_methods
[] = {
12
{
"foo"
,
ex_foo
,
METH_VARARGS
,
"foo() doc string"
},
13
{
NULL
,
NULL
}
14
};
15
16
PyMODINIT_FUNC
17
initexample
(
void
)
18
{
19
Py_InitModule
(
"example"
,
example_methods
);
20
}