Previously pragma save_local_names was only used to store information of
variables of coroutines to be inspected by Python code. Extend this to
all local variables.
Python can register global struct definitions via ldmud.register_struct().
Also added corresponding namespace ldmud.registered_structs that contains
all registered struct types.
ldmud.registered_efuns contains all registered Python efuns and
ldmud.registered_types provides all registered Python types.
Those are read-only, for manipulation there is (un)register_efun/type().
Fully support the LPC type system in Python, providing representations
for basic types (int, float, string, bytes), named (lightweight) object
types, concrete struct types and union types.
Add a new type and data structure to LPC. Lightweight objects combine
properties from structs (small memory footprint, automatic lifetime
management) and objects (capsulation, functions).
(Implements #688)
Struct member access is now done via the .members attribute of
structs and lvalues. For Struct objects this will return a member
object with .name, .type and .value attributes. For Lvalue objects
this will return an Lvalue for the given member.
In Python the representation of an LPC object offers an attribute
variables, that contains all variables of that object with some
information about it and an attribute to change its value.
In Python the representation of an LPC object offers an attribute
functions, that contains all visible functions of that object
with some information about that function and the call operator.
Don't ignore the SIGCHLD signal anymore, but add a hook for Python routines
to get notified if such a signal arrives. This means we must now wait for
our own ERQ processes, so that they won't become zombies.
If Python efuns have type annotations they are evaluated
at compile and runtime. Even without annotations the number
of arguments are checked at compile time.
This is a first step towards a python interface for LDMud.
Right now efuns can be defined from a python script, that
can have int, float and string as arguments or return values.