Skip to content

Commit 0d32847

Browse files
committed
Handle rl_readline_state being a long int from readline 7.0.
https://cgit.git.savannah.gnu.org/cgit/readline.git/commit/readline.h?id=d49a9082c0e15bba8cd3d8cc0a994409cf823cac I've opted to handle this in the same way that Term::ReadLine::Gnu handle it since both libraries were tracking values as arrays of ints. https://github.com/hirooih/perl-trg/blob/9c89044bca3437a4f5520357cee1d5971db9877b/Gnu.xs#L545-L553 Closes #45
1 parent 6c6a3ec commit 0d32847

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/native/org_gnu_readline_Readline.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ extern char* gl_buf;
9595
static int* globalIntegerInternals[] = {
9696
&rl_readline_version,
9797
&rl_gnu_readline_p,
98+
#if (RL_READLINE_VERSION >= 0x0700)
99+
/* in readline 7.0, this field was changed to a long int. It's still holds a 32bit value so we'll cast. */
100+
(int *) &rl_readline_state,
101+
#else
98102
&rl_readline_state,
103+
#endif
99104
&rl_editing_mode,
100105
&rl_insert_mode,
101106
&rl_point,

0 commit comments

Comments
 (0)