Movatterモバイル変換
[0]ホーム
[Python-Dev] Current CVS version of sysmodule.c fails to compile
Mark Favasm.favas@per.dem.csiro.au
Thu, 11 Jan 2001 17:08:29 +0800
On Tru64 Unix, with Compaq's C/CXX compilers, the current CVS version ofsysmodule.c produces the following errors:cc -O -Olimit 1500 -I./../Include -I.. -DHAVE_CONFIG_H -c -osysmodule.o sysmodule.ccc: Error: sysmodule.c, line 73: Invalid declarator. (declarator) PyObject *o, *stdout;----------------------^cc: Error: sysmodule.c, line 79: In this statement, "o" is not declared.(undeclared) if (!PyArg_ParseTuple(args, "O:displayhook", &o))------------------------------------------------------^cc: Error: sysmodule.c, line 93: In this statement, "(&_iob[1])" is notan lvalue, but occurs in a context that requires one. (needlvalue) stdout = PySys_GetObject("stdout");--------^cc: Warning: sysmodule.c, line 98: In this statement, the referencedtype of the pointer value "(&_iob[1])" is "struct declared without atag", which is not compatible with "struct _object". (ptrmismatch) if (PyFile_WriteObject(o, stdout, 0) != 0)----------------------------------^cc: Warning: sysmodule.c, line 100: In this statement, the referencedtype of the pointer value "(&_iob[1])" is "struct declared without atag", which is not compatible with "struct _object". (ptrmismatch) PyFile_SoftSpace(stdout, 1);-------------------------^The problem is that stdout is a macro #define'd in stdio.h as (&_iob[1])(stdin and stderr also are similarly #define'd).-- Mark Favas -m.favas@per.dem.csiro.auCSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA
[8]ページ先頭