Recorded merge of revisions 80846 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80846 | victor.stinner | 2010-05-06 02:08:46 +0200 (jeu., 06 mai 2010) | 20 lines Recorded merge of revisions 80844-80845 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80844 | victor.stinner | 2010-05-06 01:33:33 +0200 (jeu., 06 mai 2010) | 5 lines Untabify Modules/posixmodule.c Run Antoine Pitrou "untabify" script + manual editions (OS/2 and some continuation lines). ........ r80845 | victor.stinner | 2010-05-06 02:03:44 +0200 (jeu., 06 mai 2010) | 4 lines Untabify Modules/posixmodule.c (2) Fix some more functions by hand ........ I rewrote the patch for py3k from scratch using untabify + manual editions ................
This commit is contained in:
parent
582768ac1a
commit
97b8988e6e
|
@ -462,6 +462,11 @@ convertenviron(void)
|
||||||
#else
|
#else
|
||||||
char **e;
|
char **e;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(PYOS_OS2)
|
||||||
|
APIRET rc;
|
||||||
|
char buffer[1024]; /* OS/2 Provides a Documented Max of 1024 Chars */
|
||||||
|
#endif
|
||||||
|
|
||||||
d = PyDict_New();
|
d = PyDict_New();
|
||||||
if (d == NULL)
|
if (d == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -532,10 +537,6 @@ convertenviron(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(PYOS_OS2)
|
#if defined(PYOS_OS2)
|
||||||
{
|
|
||||||
APIRET rc;
|
|
||||||
char buffer[1024]; /* OS/2 Provides a Documented Max of 1024 Chars */
|
|
||||||
|
|
||||||
rc = DosQueryExtLIBPATH(buffer, BEGIN_LIBPATH);
|
rc = DosQueryExtLIBPATH(buffer, BEGIN_LIBPATH);
|
||||||
if (rc == NO_ERROR) { /* (not a type, envname is NOT 'BEGIN_LIBPATH') */
|
if (rc == NO_ERROR) { /* (not a type, envname is NOT 'BEGIN_LIBPATH') */
|
||||||
PyObject *v = PyBytes_FromString(buffer);
|
PyObject *v = PyBytes_FromString(buffer);
|
||||||
|
@ -548,7 +549,6 @@ convertenviron(void)
|
||||||
PyDict_SetItemString(d, "ENDLIBPATH", v);
|
PyDict_SetItemString(d, "ENDLIBPATH", v);
|
||||||
Py_DECREF(v);
|
Py_DECREF(v);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
@ -666,7 +666,7 @@ convert_to_unicode(PyObject **param)
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Helper Function to Trim and Format OS/2 Messages
|
* Helper Function to Trim and Format OS/2 Messages
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
static void
|
static void
|
||||||
os2_formatmsg(char *msgbuf, int msglen, char *reason)
|
os2_formatmsg(char *msgbuf, int msglen, char *reason)
|
||||||
{
|
{
|
||||||
msgbuf[msglen] = '\0'; /* OS/2 Doesn't Guarantee a Terminator */
|
msgbuf[msglen] = '\0'; /* OS/2 Doesn't Guarantee a Terminator */
|
||||||
|
@ -696,7 +696,7 @@ os2_formatmsg(char *msgbuf, int msglen, char *reason)
|
||||||
* the file OSO001.MSG in the \OS2 directory hierarchy.
|
* the file OSO001.MSG in the \OS2 directory hierarchy.
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
static char *
|
static char *
|
||||||
os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
|
os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
|
||||||
{
|
{
|
||||||
APIRET rc;
|
APIRET rc;
|
||||||
|
@ -721,7 +721,8 @@ os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
|
||||||
errors are not in a global variable e.g. 'errno' nor are
|
errors are not in a global variable e.g. 'errno' nor are
|
||||||
they congruent with posix error numbers. */
|
they congruent with posix error numbers. */
|
||||||
|
|
||||||
static PyObject * os2_error(int code)
|
static PyObject *
|
||||||
|
os2_error(int code)
|
||||||
{
|
{
|
||||||
char text[1024];
|
char text[1024];
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
|
|
Loading…
Reference in New Issue