jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bfbcc47d44348d51510bcfa92163f31e375bc61b

commit bfbcc47d44348d51510bcfa92163f31e375bc61b
Author: Daniel Zaoui <[email protected]>
Date:   Thu Mar 20 10:20:10 2014 +0200

    Eolian/Lexer: fix parsing of parameters direction.
    
    strncmp bytes number was not correct. A problem in the generation was
    occurring when the parameter is @inout, as it is considered as @in and
    the type was "out ...".
---
 src/lib/eolian/eo_lexer.c  | 6 +++---
 src/lib/eolian/eo_lexer.rl | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 6c92ea2..aee2ae4 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -220,17 +220,17 @@ _eo_tokenizer_param_get(Eo_Tokenizer *toknz, char *p)
    s++;
 
    param->way = PARAM_IN;
-   if (strncmp(toknz->saved.tok, "@in ", 3) == 0)
+   if (strncmp(toknz->saved.tok, "@in ", 4) == 0)
      {
         toknz->saved.tok += 3;
         param->way = PARAM_IN;
      }
-   else if (strncmp(toknz->saved.tok, "@out ", 4) == 0)
+   else if (strncmp(toknz->saved.tok, "@out ", 5) == 0)
      {
         toknz->saved.tok += 4;
         param->way = PARAM_OUT;
      }
-   else if (strncmp(toknz->saved.tok, "@inout ", 6) == 0)
+   else if (strncmp(toknz->saved.tok, "@inout ", 7) == 0)
      {
         toknz->saved.tok += 6;
         param->way = PARAM_INOUT;
diff --git a/src/lib/eolian/eo_lexer.rl b/src/lib/eolian/eo_lexer.rl
index 86deafa..7720302 100644
--- a/src/lib/eolian/eo_lexer.rl
+++ b/src/lib/eolian/eo_lexer.rl
@@ -218,17 +218,17 @@ _eo_tokenizer_param_get(Eo_Tokenizer *toknz, char *p)
    s++;
 
    param->way = PARAM_IN;
-   if (strncmp(toknz->saved.tok, "@in ", 3) == 0)
+   if (strncmp(toknz->saved.tok, "@in ", 4) == 0)
      {
         toknz->saved.tok += 3;
         param->way = PARAM_IN;
      }
-   else if (strncmp(toknz->saved.tok, "@out ", 4) == 0)
+   else if (strncmp(toknz->saved.tok, "@out ", 5) == 0)
      {
         toknz->saved.tok += 4;
         param->way = PARAM_OUT;
      }
-   else if (strncmp(toknz->saved.tok, "@inout ", 6) == 0)
+   else if (strncmp(toknz->saved.tok, "@inout ", 7) == 0)
      {
         toknz->saved.tok += 6;
         param->way = PARAM_INOUT;

-- 


Reply via email to