[Python-bugs-list] [ python-Bugs-415612 ] readline ext fails w/ new v4.2

noreply@sourceforge.net noreply@sourceforge.net
Fri, 13 Apr 2001 18:17:37 -0700


Bugs item #415612, was updated on 2001-04-11 23:32
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=415612&group_id=5470

Category: Extension Modules
Group: Platform-specific
Status: Open
Priority: 2
Submitted By: Gordon Sadler (gbsadler)
Assigned to: Nobody/Anonymous (nobody)
Summary: readline ext fails w/ new v4.2

Initial Comment:
Top of my test.log from make test:


PYTHONPATH= ./python ./setup.py build
/home/gbsadler/cvs/python/dist/src/Modules/readline.c:34: 
conflicting types for `rl_read_init_file'
/usr/include/readline/readline.h:304: previous declaration of 
`rl_read_init_file'
/home/gbsadler/cvs/python/dist/src/Modules/readline.c:35: 
conflicting types for `rl_insert_text'
/usr/include/readline/readline.h:364: previous declaration of 
`rl_insert_text'
/home/gbsadler/cvs/python/dist/src/Modules/readline.c: In 
function `set_completer_delims':
/home/gbsadler/cvs/python/dist/src/Modules/readline.c:231: 
warning: passing arg 1 of `free' discards qualifiers from poi
nter target type
/home/gbsadler/cvs/python/dist/src/Modules/readline.c: In 
function `flex_complete':
/home/gbsadler/cvs/python/dist/src/Modules/readline.c:403: 
warning: implicit declaration of function `completion_matches
'
/home/gbsadler/cvs/python/dist/src/Modules/readline.c:403: 
warning: return makes pointer from integer without a cast


rl_read_init_file and rl_insert_text both now expect (const 
char*) as parameters.

These are your choices for completion_matches:

readline.h:extern char **rl_completion_matches __P((const char 
*, rl_compentry_func_t *));
readline.h:extern char **completion_matches __P((char *, 
rl_compentry_func_t *));

Here's the compile line from test.log:

building 'readline' extension
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -I. 
-I/home/gbsadler/cvs/python/dist/src/./Include 
-I/usr/local/include -IInc
lude/ -c 
/home/gbsadler/cvs/python/dist/src/Modules/readline.c -o 
build/temp.linux-i686-2.1/readline.o -g -O2 -Wall -Wst
rict-prototypes -I. -I./Include -DHAVE_CONFIG_H
WARNING: building of extension "readline" failed: command 'gcc' 
failed with exit status 1






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

>Comment By: Gordon Sadler (gbsadler)
Date: 2001-04-13 18:17

Message:
Logged In: YES 
user_id=150968

Have a feeling the file attachment didn't take. In case here it is.
#include <readline/readline.h>
#include <stdio.h>
 
int main ()
{
        printf ("version is %s \n",rl_library_version);
        return 0;
}

Real simple, but not sure what <4.2 will return/print.


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

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-04-13 13:57

Message:
Logged In: YES 
user_id=6380

I've changed the readline module so that it always just
includes the readline.h and history.h header files; this
takes care of the errors with readline 4.2.

There are still a few warnings left; I can't get rid of
those without breaking the build for readline 3.x.

Leaving this issue open for now in case someone comes with a
bright idea on how to detect readline versions at compile
time.

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

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