amend bash.h; add example_builtin.c
This commit is contained in:
3
bash.h
3
bash.h
@ -34,7 +34,6 @@ extern char **make_builtin_argv(WORD_LIST*, int*);
|
||||
PyImport_AppendInittab(#modname, PyInit_##modname); \
|
||||
Py_Initialize(); \
|
||||
} \
|
||||
int _##bash_name(int argc, char **argv) { \
|
||||
int ret = 1; \
|
||||
PyObject *mod = NULL, *func = NULL, *result; \
|
||||
\
|
||||
@ -59,7 +58,5 @@ extern char **make_builtin_argv(WORD_LIST*, int*);
|
||||
Py_XDECREF(mod); \
|
||||
return ret; \
|
||||
} \
|
||||
return _##bash_name(argc, argv); \
|
||||
} \
|
||||
WRAP_FUNC_WITH_BUILTIN(bash_name); \
|
||||
DEFINE_BUILTIN(bash_name);
|
||||
|
@ -3,4 +3,4 @@
|
||||
|
||||
PY_FUNC(foo, foo, _foo);
|
||||
PY_FUNC(bar, foo, _bar);
|
||||
PY_FUNC(graph, foo, _complicated_function);
|
||||
PY_FUNC(graph, bar, _complicated_function);
|
||||
|
Reference in New Issue
Block a user