Blob Blame History Raw
#define PY_INIT_FUNC(x) extern void x(void)
#define PY_INIT_PTR(x)  void (*x)(void)

PY_INIT_FUNC(initthread);
PY_INIT_FUNC(initsignal);
PY_INIT_FUNC(initposix);
PY_INIT_FUNC(initerrno);
PY_INIT_FUNC(initpwd);
PY_INIT_FUNC(init_sre);
PY_INIT_FUNC(init_codecs);
PY_INIT_FUNC(init_weakref);
PY_INIT_FUNC(initzipimport);
PY_INIT_FUNC(init_symtable);
PY_INIT_FUNC(initxxsubtype);

PY_INIT_FUNC(PyMarshal_Init);
PY_INIT_FUNC(initimp);
PY_INIT_FUNC(initgc);
PY_INIT_FUNC(init_ast);
PY_INIT_FUNC(_PyWarnings_Init);

struct _inittab {
	char * name;
	PY_INIT_PTR(initfunc);
};

struct _inittab _PyImport_Inittab[] = {
	{"thread",	initthread},
	{"signal",	initsignal},
	{"posix",	initposix},
	{"errno",	initerrno},
	{"pwd",		initpwd},
	{"_sre",	init_sre},
	{"_codecs",	init_codecs},
	{"_weakref",	init_weakref},
	{"zipimport",	initzipimport},
	{"_symtable",	init_symtable},
	{"xxsubtype",	initxxsubtype},

	{"marshal",	PyMarshal_Init},
	{"imp",		initimp},
	{"_ast",	init_ast},
	{"__main__",	0},
	{"__builtin__",	0},
	{"sys",		0},
	{"exceptions",	0},
	{"gc",		initgc},
	{"_warnings",	_PyWarnings_Init},
	{0, 0}
};