1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
M. Levinson
a229adb19a A more nuanced approach to Python warnings.
By default some Python warning messages would be written to standard error
by the interpreter. To prevent these warnings from making a mess of the
ELinks screen, all warnings were turned into exceptions so they could be
caught and displayed through the usual report_scripting_error() mechanism.

With Python 3.2, this approach backfires: A new class of ResourceWarnings
that are filtered by default (and hence would *not* have been written to
standard error) are now turned into exceptions, and these exceptions can't
be caught because they're emitted from the interpreter's cleanup code. As
a result, the uncaught exceptions would make a mess of the ELinks screen.

The new solution is to replace Python's standard library function
warnings.showwarning() with one that turns warning messages into exceptions.
This means we'll wait until a warning would have been written to standard
error before turning it into an exception, so other warnings that would
never have reached that point because they're filtered will remain unseen.

(The behavior of warning messages is described in the documentation for
the "warnings" module from Python's standard library.)
2013-07-05 12:29:58 +02:00
M. Levinson
f7be8f7dfc Python: Don't complain if hooks.py does not exist.
Nor if -no-home prevents it from being found.

This patch is from bug 880, comment 5, attachment 305.
http://bugzilla.elinks.cz/show_bug.cgi?id=880#c5
2006-12-17 16:10:55 +02:00
M. Levinson
b6d14e025c Reset PyObject pointers to NULL when deinitializing.
cleanup_python and python_done_keybinding_interface called by it
now reset the PyObject *python_hooks, *keybindings variables back
to NULL when they release the references.  Without this change,
dangling pointers left in those variables could cause problems
if the Python scripting module were deinitialized and reinitialized.
It looks like such reinitialization is not currently possible though,
because enhancement request 73 (plugins support) has not yet been
implemented.
2006-12-13 18:33:54 +02:00
M. Levinson
78bd416dc0 Bug 880: Prevent SIGSEGV in init_python when -no-home is used.
Before this patch, init_python would crash trying to set up elinks.home
at the Python side.  Now it uses None as the value in that case.
Also, init_python no longer adds "(null)" to $PYTHONPATH.
2006-12-08 19:59:41 +02:00
M. Levinson
ebadc9bf9e Additional functionality for Python backend. 2006-10-19 15:21:39 +02:00
Witold Filipczyk
6c8f532692 Fixes to the Python scripting by M. Levinson 2006-07-24 18:52:25 +02:00
8cc828bf7c Compilation fix 2006-01-29 12:28:05 +01:00
669d4af154 Compilation fixes 2006-01-28 20:54:11 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00