[Python-Dev] info/advices about python readline implementation

Guido van Rossum guido at python.org
Sun Aug 28 17:23:23 CEST 2005


On 8/28/05, Gregory Lielens <gregory.lielens at fft.be> wrote:
>    -is it ok to initialize a static pointer to a non-null value (the
> address of a predefined function) at compile time?

Yes. All of Python's standard types and modules use this idiom.

> We wonder if this can cause problem on some platforms not correctly
> implementing C standard(s) but that python have to support nonetheless,

If a platform doesn't have a working C89 compiler, we generally wait
for the compiler to be fixed (or for GCC to be ported). We might
compromise when a platform doesn't support full POSIX, but this seems
purely a language issue and there can be no excuses -- C89 is older
than Python!

> Then something about the VMS platform support:
>   -readline seems to make uses of the extern function
> vms__StdioReadline() on VMS...Where can we find the source or doc about
> this function? In particular, we would like to know if this function
> call (or can call) PyOS_StdioReadline, which would cause infinite
> recursion in some version of our patch....without havind access to VMS
> for testing or info about vms__StdioReadline, this is impossible to
> know...

I have no idea; Googling for it only showed up discussions of
readline.c. You might write the authors of the patch that introduced
it (the same Google query will find the info); if they don't respond,
I'm not sure that it's worth worrying about.

My personal guess is that it's probably a VMS internal function, which
would reduce the probability of it calling back to PyOS_StdioReadline
to zero. It can't be a Python specific thing, because it doesn't have
a 'Py' prefix.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list