diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2021-11-02 16:05:52 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2021-11-02 16:05:52 +0900 |
| commit | 0df7f6fa71cea5de0e041df80854d307930e418d (patch) | |
| tree | 229c696c48e97c14b44eb85b7d4057de8867f2f7 /src/name_table.c | |
| parent | a2aabb706c95bc7189633f6efef8325428d09630 (diff) | |
| download | inpla-0df7f6fa71cea5de0e041df80854d307930e418d.tar.gz inpla-0df7f6fa71cea5de0e041df80854d307930e418d.zip | |
v0.5.1
Diffstat (limited to 'src/name_table.c')
| -rw-r--r-- | src/name_table.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/name_table.c b/src/name_table.c index 3634dd0..3cbaee3 100644 --- a/src/name_table.c +++ b/src/name_table.c @@ -230,7 +230,12 @@ IDTYPE NameTable_get_set_id(char *key) { -// Whether the given 'term' has a name node 'keynode'. + + + + + +// Whether the given 'term' has a node 'keynode'. int term_has_keynode(VALUE keynode, VALUE term) { int i; @@ -266,8 +271,10 @@ int term_has_keynode(VALUE keynode, VALUE term) { int keynode_exists_in_another_term(VALUE keynode, VALUE *connected_from) { - // It returns how many occurs in terms connected from global names. - // Also, the one of the terms is stored in the 'connected_from'. + // It returns how times the keynode occurs in + // terms connected from global names. + // When there are such connected terms, + // one of these will be stored in the 'connected_from' as the result. int i, result=0; NameList *at; @@ -300,7 +307,8 @@ int keynode_exists_in_another_term(VALUE keynode, VALUE *connected_from) { VALUE replace_keynode(VALUE keynode, VALUE term, VALUE heap) { - + // heap[term/keynode] + if ((heap == (VALUE)NULL) || (IS_FIXNUM(heap))) { return heap; } |
