Loading ...
Sorry, an error occurred while loading the content.

Patch 7.3.841

Expand Messages
  • Bram Moolenaar
    Patch 7.3.841 Problem: When a cond ? one : two expression has a subscript it is not parsed correctly. (Andy Wokula) Solution: Handle a subscript also
    Message 1 of 5 , Feb 26, 2013
    • 0 Attachment
      Patch 7.3.841
      Problem: When a "cond ? one : two" expression has a subscript it is not
      parsed correctly. (Andy Wokula)
      Solution: Handle a subscript also when the type is unknown. (Christian
      Brabandt)
      Files: src/eval.c, src/test49.vim, src/test49.ok


      *** ../vim-7.3.840/src/eval.c 2013-02-20 21:11:14.000000000 +0100
      --- src/eval.c 2013-02-26 19:27:59.000000000 +0100
      ***************
      *** 5164,5169 ****
      --- 5164,5179 ----
      ret = get_func_tv(s, len, rettv, arg,
      curwin->w_cursor.lnum, curwin->w_cursor.lnum,
      &len, evaluate, NULL);
      +
      + /* If evaluate is FALSE rettv->v_type was not set in
      + * get_func_tv, but it's needed in handle_subscript() to parse
      + * what follows. So set it here. */
      + if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
      + {
      + rettv->vval.v_string = vim_strsave("");
      + rettv->v_type = VAR_FUNC;
      + }
      +
      /* Stop the expression evaluation when immediately
      * aborting on error, or when an interrupt occurred or
      * an exception was thrown but not caught. */
      *** ../vim-7.3.840/src/version.c 2013-02-26 18:45:49.000000000 +0100
      --- src/version.c 2013-02-26 19:35:36.000000000 +0100
      ***************
      *** 730,731 ****
      --- 730,733 ----
      { /* Add new patch number below this line */
      + /**/
      + 841,
      /**/

      --
      If someone questions your market projections, simply point out that your
      target market is "People who are nuts" and "People who will buy any damn
      thing". Nobody is going to tell you there aren't enough of those people
      to go around.
      (Scott Adams - The Dilbert principle)

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Christian Brabandt
      Hi Bram! ... I just got a warning from this line. I think, this should be diff --git a/src/eval.c b/src/eval.c ... +++ b/src/eval.c @@ -5170,7 +5170,7 @@ *
      Message 2 of 5 , Feb 26, 2013
      • 0 Attachment
        Hi Bram!

        On Di, 26 Feb 2013, Bram Moolenaar wrote:

        > + rettv->vval.v_string = vim_strsave("");

        I just got a warning from this line. I think, this should be

        diff --git a/src/eval.c b/src/eval.c
        --- a/src/eval.c
        +++ b/src/eval.c
        @@ -5170,7 +5170,7 @@
        * what follows. So set it here. */
        if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
        {
        - rettv->vval.v_string = vim_strsave("");
        + rettv->vval.v_string = vim_strsave((char_u *)"");
        rettv->v_type = VAR_FUNC;
        }


        Mit freundlichen Grüßen
        Christian
        --
        Ich habe zuweilen gefunden, daß das einzige Gute, was noch in großen
        adeligen Familien nachwuchs - z.B. bei Gieg - bloß dem bürgerlichen
        Hofmeister zu danken war.
        -- Jean Paul

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Tony Mechelynck
        ... src/version.c is also changed (by adding the patch number) but src/test49.* aren t changed by the patch. :-? hg -incoming correctly mentioned only
        Message 3 of 5 , Feb 26, 2013
        • 0 Attachment
          On 26/02/13 19:36, Bram Moolenaar wrote:
          >
          > Patch 7.3.841
          > Problem: When a "cond ? one : two" expression has a subscript it is not
          > parsed correctly. (Andy Wokula)
          > Solution: Handle a subscript also when the type is unknown. (Christian
          > Brabandt)
          > Files: src/eval.c, src/test49.vim, src/test49.ok
          --------------------------------^
          src/version.c is also changed (by adding the patch number) but
          src/test49.* aren't changed by the patch. :-?

          "hg -incoming" correctly mentioned only src/eval.c src/version.c

          [...]

          I get the following in the compile for "Huge" vim but no message for
          "Tiny" vim (which is not compiled with +eval):

          eval.c: In function ‘eval7’:
          eval.c:5173:7: warning: pointer targets in passing argument 1 of
          ‘vim_strsave’ differ in signedness [-Wpointer-sign]


          The message refers to the first nonblank in the following (new) line:
          rettv->vval.v_string = vim_strsave("");

          However, I suppose that a string of zero characters followed by one null
          byte is the same regardless of the assumed sign of the characters, so
          this message should be innocuous.


          Best regards,
          Tony.
          --
          Every word is like an unnecessary stain on silence and nothingness.
          -- Beckett

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Bram Moolenaar
          ... Ah, missed the warning. Thanks. -- A consultant is a person who takes your money and annoys your employees while tirelessly searching for the best way to
          Message 4 of 5 , Feb 26, 2013
          • 0 Attachment
            Christian Brabandt wrote:

            > On Di, 26 Feb 2013, Bram Moolenaar wrote:
            >
            > > + rettv->vval.v_string = vim_strsave("");
            >
            > I just got a warning from this line. I think, this should be
            >
            > diff --git a/src/eval.c b/src/eval.c
            > --- a/src/eval.c
            > +++ b/src/eval.c
            > @@ -5170,7 +5170,7 @@
            > * what follows. So set it here. */
            > if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
            > {
            > - rettv->vval.v_string = vim_strsave("");
            > + rettv->vval.v_string = vim_strsave((char_u *)"");
            > rettv->v_type = VAR_FUNC;
            > }
            >

            Ah, missed the warning. Thanks.

            --
            A consultant is a person who takes your money and annoys your employees while
            tirelessly searching for the best way to extend the consulting contract.
            (Scott Adams - The Dilbert principle)

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Bram Moolenaar
            ... Missing /testdir . Didn t notice diff omitted those two files. Will make another patch then. ... Fixed in 7.3.842. -- The average life of an organization
            Message 5 of 5 , Feb 26, 2013
            • 0 Attachment
              Tony Mechelynck wrote:

              > On 26/02/13 19:36, Bram Moolenaar wrote:
              > >
              > > Patch 7.3.841
              > > Problem: When a "cond ? one : two" expression has a subscript it is not
              > > parsed correctly. (Andy Wokula)
              > > Solution: Handle a subscript also when the type is unknown. (Christian
              > > Brabandt)
              > > Files: src/eval.c, src/test49.vim, src/test49.ok
              > --------------------------------^
              > src/version.c is also changed (by adding the patch number) but
              > src/test49.* aren't changed by the patch. :-?

              Missing "/testdir". Didn't notice diff omitted those two files.
              Will make another patch then.

              > "hg -incoming" correctly mentioned only src/eval.c src/version.c
              >
              > [...]
              >
              > I get the following in the compile for "Huge" vim but no message for
              > "Tiny" vim (which is not compiled with +eval):
              >
              > eval.c: In function ‘eval7’:
              > eval.c:5173:7: warning: pointer targets in passing argument 1 of
              > ‘vim_strsave’ differ in signedness [-Wpointer-sign]
              >
              >
              > The message refers to the first nonblank in the following (new) line:
              > rettv->vval.v_string = vim_strsave("");
              >
              > However, I suppose that a string of zero characters followed by one null
              > byte is the same regardless of the assumed sign of the characters, so
              > this message should be innocuous.

              Fixed in 7.3.842.

              --
              The average life of an organization chart is six months. You can safely
              ignore any order from your boss that would take six months to complete.
              (Scott Adams - The Dilbert principle)

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ an exciting new programming language -- http://www.Zimbu.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            Your message has been successfully submitted and would be delivered to recipients shortly.