New implementation of re module

Hrvoje Niksic hniksic at xemacs.org
Thu Jul 30 14:32:10 EDT 2009


MRAB <python at mrabarnett.plus.com> writes:

> So it complains about:
>
>     ++(RE_CHAR*)context->text_ptr
>
> but not about:
>
>     ++info->repeat.count
>
> Does this mean that the gcc compiler thinks that the cast makes it an
> rvalue?

The cast operator does return an rvalue, treating it otherwise used to
be an extension to popular compilers, including ironically gcc.  The
standard-compliant way of writing the above would be:

++ *(RE_CHAR **) &context->text_ptr



More information about the Python-list mailing list