Bug #794140: cygwin builds do not embed
The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim).
This commit is contained in:
parent
3076559ea5
commit
6bc06eca70
|
@ -428,7 +428,12 @@ extern double hypot(double, double);
|
||||||
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
|
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
|
||||||
# define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE
|
# define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE
|
||||||
/* module init functions inside the core need no external linkage */
|
/* module init functions inside the core need no external linkage */
|
||||||
# define PyMODINIT_FUNC void
|
/* except for Cygwin to handle embedding (FIXME: BeOS too?) */
|
||||||
|
# if defined(__CYGWIN__)
|
||||||
|
# define PyMODINIT_FUNC __declspec(dllexport) void
|
||||||
|
# else /* __CYGWIN__ */
|
||||||
|
# define PyMODINIT_FUNC void
|
||||||
|
# endif /* __CYGWIN__ */
|
||||||
# else /* Py_BUILD_CORE */
|
# else /* Py_BUILD_CORE */
|
||||||
/* Building an extension module, or an embedded situation */
|
/* Building an extension module, or an embedded situation */
|
||||||
/* public Python functions and data are imported */
|
/* public Python functions and data are imported */
|
||||||
|
|
|
@ -951,7 +951,7 @@ static PyMethodDef GcMethods[] = {
|
||||||
{NULL, NULL} /* Sentinel */
|
{NULL, NULL} /* Sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
PyMODINIT_FUNC
|
||||||
initgc(void)
|
initgc(void)
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
|
|
@ -2841,7 +2841,7 @@ setint(PyObject *d, char *name, int value)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
PyMODINIT_FUNC
|
||||||
initimp(void)
|
initimp(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
|
@ -875,7 +875,7 @@ static PyMethodDef marshal_methods[] = {
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
PyMODINIT_FUNC
|
||||||
PyMarshal_Init(void)
|
PyMarshal_Init(void)
|
||||||
{
|
{
|
||||||
(void) Py_InitModule("marshal", marshal_methods);
|
(void) Py_InitModule("marshal", marshal_methods);
|
||||||
|
|
Loading…
Reference in New Issue