modules: allow only a single function access point.
commitb466ccc6137f2255220c87f74baf86a67884a3d8
authorGary V. Vaughan <gary@gnu.org>
Fri, 20 Sep 2013 09:01:31 +0000 (20 16:01 +0700)
committerGary V. Vaughan <gary@gnu.org>
Fri, 20 Sep 2013 14:41:58 +0000 (20 21:41 +0700)
tree208fdb52d5f50d07b06ba612920055519599b44f
parentaeb92bcb25e253b55650961f341640f93ec3b54e
modules: allow only a single function access point.

Exporting non-function symbols barely works on Windows, so change
the module loading API to use a single function access point which
is then responsible for calling back to install symbols and macros.
* m4/m4module.h, m4/m4module.c (m4_install_builtins)
(m4_install_macros): New APIs for saving builtins and macros into
the module struct.
* m4/m4module.c (install_macro_table, install_builtin_table):
Adjust accordingly.
(m4__module_open): Simplify accordingly.
* m4/m4private.h (BUILTIN_SYMBOL, MACRO_SYMBOL): Remove.
* modules/gnu.c, modules/import.c, modules/m4.c, modules/modtest.c,
modules/mpeval.c, modules/shadow.c, modules/time.c,
modules/traditional.c (m4_builtin_table, m4_macro_table): Make
static, and remove LTX symbol mangling macros.
(M4INIT_HANDLER): Call m4_install_builtins and/or m4_install_macros.
* tests/options.at: Now that init_func is always called, adjust
expected debug output.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
13 files changed:
m4/m4module.h
m4/m4private.h
m4/module.c
modules/gnu.c
modules/import.c
modules/m4.c
modules/modtest.c
modules/mpeval.c
modules/shadow.c
modules/stdlib.c
modules/time.c
modules/traditional.c
tests/options.at