gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, feature/namespaces, updated. gawk-4.1.0-


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, feature/namespaces, updated. gawk-4.1.0-2621-g415a5fb
Date: Fri, 7 Jul 2017 05:10:03 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/namespaces has been updated
       via  415a5fb71a1b5a1f23bff7e5b2506b2a1584e086 (commit)
      from  b078f45cf3f77853c3dd5b8cb24a28e0419486b4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=415a5fb71a1b5a1f23bff7e5b2506b2a1584e086

commit 415a5fb71a1b5a1f23bff7e5b2506b2a1584e086
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Jul 7 12:09:33 2017 +0300

    Add namespace param to sym_lookup and sym_update API functions.

diff --git a/ChangeLog b/ChangeLog
index d3aeadb..da5f1c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,12 @@
        * awkgram.y (yyerror): Produce better diagnostics for source
        files that are not whole syntactic units.
 
+       * gawkapi.c (api_sym_lookup, api_sym_update): Add namespace parameter.
+       Currently unused.
+       * gawkapi.h (api_sym_lookup, api_sym_update): Add namespace parameter.
+       (api_sym_lookup_ns, api_sym_update_ns): New macros.
+       (api_sym_lookup, api_sym_update): Adjust macro bodies.
+
 2017-07-07         Arnold D. Robbins     <address@hidden>
 
        * gawapi.h: Bring descriptive comments up to date, minor edits.
diff --git a/gawkapi.c b/gawkapi.c
index 2a4ea4e..5b1e635 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -675,6 +675,7 @@ node_to_awk_value(NODE *node, awk_value_t *val, 
awk_valtype_t wanted)
 
 static awk_bool_t
 api_sym_lookup(awk_ext_id_t id,
+               const char *namespace,
                const char *name,
                awk_valtype_t wanted,
                awk_value_t *result)
@@ -720,6 +721,7 @@ api_sym_lookup_scalar(awk_ext_id_t id,
 
 static awk_bool_t
 api_sym_update(awk_ext_id_t id,
+               const char *namespace,
                const char *name,
                awk_value_t *value)
 {
diff --git a/gawkapi.h b/gawkapi.h
index b8e8a26..627b721 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -603,6 +603,7 @@ typedef struct gawk_api {
         *      }
         */
        awk_bool_t (*api_sym_lookup)(awk_ext_id_t id,
+                               const char *namespace,
                                const char *name,
                                awk_valtype_t wanted,
                                awk_value_t *result);
@@ -614,6 +615,7 @@ typedef struct gawk_api {
         * Such an attempt returns false.
         */
        awk_bool_t (*api_sym_update)(awk_ext_id_t id,
+                               const char *namespace,
                                const char *name,
                                awk_value_t *value);
 
@@ -834,11 +836,17 @@ typedef struct gawk_api {
 #define awk_atexit(funcp, arg0)        (api->api_awk_atexit(ext_id, funcp, 
arg0))
 
 #define sym_lookup(name, wanted, result) \
-       (api->api_sym_lookup(ext_id, name, wanted, result))
+       sym_lookup_ns("", name, wanted, result)
+#define sym_update(name, value) \
+       sym_update_ns("", name, value)
+
+#define sym_lookup_ns(namespace, name, wanted, result) \
+       (api->api_sym_lookup(ext_id, namespace, name, wanted, result))
+#define sym_update_ns(namespace, name, value) \
+       (api->api_sym_update(ext_id, namespace, name, value))
+
 #define sym_lookup_scalar(scalar_cookie, wanted, result) \
        (api->api_sym_lookup_scalar(ext_id, scalar_cookie, wanted, result))
-#define sym_update(name, value) \
-       (api->api_sym_update(ext_id, name, value))
 #define sym_update_scalar(scalar_cookie, value) \
        (api->api_sym_update_scalar)(ext_id, scalar_cookie, value)
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |  6 ++++++
 gawkapi.c |  2 ++
 gawkapi.h | 14 +++++++++++---
 3 files changed, 19 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]