[Python-bugs-list] [ python-Bugs-666880 ] readonly is now a compiler keyword

SourceForge.net noreply@sourceforge.net
Sun, 12 Jan 2003 19:53:43 -0800


Bugs item #666880, was opened at 2003-01-12 18:52
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=666880&group_id=5470

Category: Build
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: John Malmberg (wb8tyw)
Assigned to: Nobody/Anonymous (nobody)
Summary: readonly is now a compiler keyword

Initial Comment:
In module bufferobject.c, a variable is named readonly.

This conflicts with the new C keyword readonly.

Please change the name of this variable so that it does
not conflict.

Python: 2.3a1 pre-release
Operating System: OpenVMS Alpha 7.3-1


$ CC/PREFIX=ALL
/WARN=ENABLE=(LEVEL4,QUESTCODE)/include=(PRJ_SRC:,PRJ_INCLUDE:,P
RJ_PARSER:,PRJ_PYTHON:,PRJ_MODULES:,FRONTPORT__DIR:)/define=(MOD_'f$element(0,"-
",f$parse("LCL_OBJECTS:BUFFEROBJECT",,,"NAME"))',
HAVE_CONFIG_H)/NESTED_INCLUDE_DIR=NONE/-
object=LCL_OBJECTS:BUFFEROBJECT.OBJ
PRJ_OBJECTS:BUFFEROBJECT.C

_PyBuffer_FromMemory(PyObject *base, void *ptr, int
size, int readonly)
..............................................................^
%CC-I-READONLYEXT, readonly is a language extension.
at line number 18 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

        b->b_readonly = readonly;
........................^
%CC-E-BADEXPR, Invalid expression.
at line number 36 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

        return _PyBuffer_FromMemory(base, (char *)p +
offset, size, readonly);
....................................................................^
%CC-E-BADEXPR, Invalid expression.
at line number 79 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

_PyBuffer_FromMemory(PyObject *base, void *ptr, int
size, int readonly)
..............................................................^
%CC-I-STORMODDCL, In this declaration, a storage class
modifier without a declarator is meaningless.
at line number 18 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

_PyBuffer_FromMemory(PyObject *base, void *ptr, int
size, int readonly)
..............................................................^
%CC-E-PARMSTORMOD, In this declaration, a parameter
cannot have a storage class modifier.
at line number 18 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

                     getreadbufferproc proc, int readonly)
.................................................^
%CC-I-STORMODDCL, In this declaration, a storage class
modifier without a declarator is meaningless.
at line number 44 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

                     getreadbufferproc proc, int readonly)
.................................................^
%CC-E-PARMSTORMOD, In this declaration, a parameter
cannot have a storage class
modifier.


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2003-01-12 22:53

Message:
Logged In: YES 
user_id=31435

readonly isn't a keyword in the C89 or C99 ANSI/ISO C 
standards, so the source of the problem remains unclear.  
Is this a vendor extension specific to the C compiler you're 
using -- and which C compiler is that?  A better solution 
may be to disable a non-standard compiler extension.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=666880&group_id=5470