File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ std::string handle_pyerror()
235235 bp::object formatted_list, formatted;
236236
237237 PyErr_Fetch (&exc, &val, &tb);
238+ PyErr_NormalizeException (&exc, &val, &tb);
239+
238240 bp::handle<> hexc (exc), hval (bp::allow_null (val)), htb (bp::allow_null (tb));
239241 bp::object traceback (bp::import (" traceback" ));
240242 if (!tb) {
Original file line number Diff line number Diff line change 4343InterpBase *pinterp;
4444#define interp_new (*pinterp)
4545const char *prompt = " READ => " ;
46- const char *history = " ~/.rs274" ;
46+ const char *histfile = " ~/.rs274" ;
4747#define RS274_HISTORY " RS274_HISTORY"
4848
4949#define active_settings interp_new.active_settings
@@ -137,15 +137,15 @@ void initialize_readline ()
137137 rl_readline_name = " rs274" ;
138138
139139 if ((s = getenv (RS274_HISTORY)))
140- history = s;
140+ histfile = s;
141141 // tilde-expand
142- if (wordexp (history , &p, WRDE_SHOWERR|WRDE_UNDEF )) {
142+ if (wordexp (histfile , &p, WRDE_SHOWERR|WRDE_UNDEF )) {
143143 perror (" wordexp" );
144144 } else {
145- history = strdup (p.we_wordv [0 ]);
145+ histfile = strdup (p.we_wordv [0 ]);
146146 }
147- if (history )
148- read_history (history );
147+ if (histfile )
148+ read_history (histfile );
149149}
150150
151151/* **********************************************************************/
@@ -186,8 +186,8 @@ int interpret_from_keyboard( /* ARGUMENTS */
186186 {
187187 line = readline ( prompt);
188188 if (!line || strcmp (line, " quit" ) == 0 ) {
189- if (history )
190- write_history (history );
189+ if (histfile )
190+ write_history (histfile );
191191 return 0 ;
192192 }
193193 if (*line)
You can’t perform that action at this time.
0 commit comments