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

Patch 7.3.993

Expand Messages
  • Bram Moolenaar
    Patch 7.3.993 Problem: Python: Later patch does things slightly differently. Solution: Adjusted argument type changes. (ZyX) Files: src/if_py_both.h,
    Message 1 of 1 , May 21, 2013
    • 0 Attachment
      Patch 7.3.993
      Problem: Python: Later patch does things slightly differently.
      Solution: Adjusted argument type changes. (ZyX)
      Files: src/if_py_both.h, src/if_python3.c, src/if_python.c


      *** ../vim-7.3.992/src/if_py_both.h 2013-05-21 18:30:29.000000000 +0200
      --- src/if_py_both.h 2013-05-21 18:42:28.000000000 +0200
      ***************
      *** 220,226 ****
      }

      static PyObject *
      ! OutputFlush(PyObject *self UNUSED)
      {
      /* do nothing */
      Py_INCREF(Py_None);
      --- 220,226 ----
      }

      static PyObject *
      ! OutputFlush(PyObject *self UNUSED, PyObject *args UNUSED)
      {
      /* do nothing */
      Py_INCREF(Py_None);
      ***************
      *** 230,240 ****
      /***************/

      static struct PyMethodDef OutputMethods[] = {
      ! /* name, function, calling, doc */
      ! {"write", (PyCFunction)OutputWrite, METH_VARARGS, ""},
      ! {"writelines", (PyCFunction)OutputWritelines, METH_VARARGS, ""},
      ! {"flush", (PyCFunction)OutputFlush, METH_NOARGS, ""},
      ! { NULL, NULL, 0, NULL}
      };

      static OutputObject Output =
      --- 230,240 ----
      /***************/

      static struct PyMethodDef OutputMethods[] = {
      ! /* name, function, calling, doc */
      ! {"write", (PyCFunction)OutputWrite, 1, ""},
      ! {"writelines", (PyCFunction)OutputWritelines, 1, ""},
      ! {"flush", (PyCFunction)OutputFlush, 1, ""},
      ! { NULL, NULL, 0, NULL}
      };

      static OutputObject Output =
      ***************
      *** 533,544 ****
      */

      static struct PyMethodDef VimMethods[] = {
      ! /* name, function, calling, documentation */
      ! {"command", VimCommand, METH_VARARGS, "Execute a Vim ex-mode command" },
      ! {"eval", VimEval, METH_VARARGS, "Evaluate an expression using Vim evaluator" },
      ! {"bindeval", VimEvalPy, METH_VARARGS, "Like eval(), but returns objects attached to vim ones"},
      ! {"strwidth", VimStrwidth, METH_VARARGS, "Screen string width, counts <Tab> as having width 1"},
      ! { NULL, NULL, 0, NULL }
      };

      /*
      --- 533,544 ----
      */

      static struct PyMethodDef VimMethods[] = {
      ! /* name, function, calling, documentation */
      ! {"command", VimCommand, 1, "Execute a Vim ex-mode command" },
      ! {"eval", VimEval, 1, "Evaluate an expression using Vim evaluator" },
      ! {"bindeval", VimEvalPy, 1, "Like eval(), but returns objects attached to vim ones"},
      ! {"strwidth", VimStrwidth, 1, "Screen string width, counts <Tab> as having width 1"},
      ! { NULL, NULL, 0, NULL }
      };

      /*
      ***************
      *** 868,875 ****
      };

      static struct PyMethodDef DictionaryMethods[] = {
      ! {"keys", (PyCFunction)DictionaryListKeys, METH_NOARGS, ""},
      ! { NULL, NULL, 0, NULL }
      };

      static PyTypeObject ListType;
      --- 868,875 ----
      };

      static struct PyMethodDef DictionaryMethods[] = {
      ! {"keys", (PyCFunction)DictionaryListKeys, METH_NOARGS, ""},
      ! { NULL, NULL, 0, NULL }
      };

      static PyTypeObject ListType;
      ***************
      *** 1248,1255 ****
      }

      static struct PyMethodDef ListMethods[] = {
      ! {"extend", (PyCFunction)ListConcatInPlace, METH_O, ""},
      ! { NULL, NULL, 0, NULL }
      };

      typedef struct
      --- 1248,1255 ----
      }

      static struct PyMethodDef ListMethods[] = {
      ! {"extend", (PyCFunction)ListConcatInPlace, METH_O, ""},
      ! { NULL, NULL, 0, NULL }
      };

      typedef struct
      ***************
      *** 1349,1356 ****
      }

      static struct PyMethodDef FunctionMethods[] = {
      ! {"__call__", (PyCFunction)FunctionCall, METH_VARARGS|METH_KEYWORDS, ""},
      ! { NULL, NULL, 0, NULL}
      };

      /*
      --- 1349,1356 ----
      }

      static struct PyMethodDef FunctionMethods[] = {
      ! {"__call__", (PyCFunction)FunctionCall, METH_VARARGS|METH_KEYWORDS, ""},
      ! { NULL, NULL, 0, NULL }
      };

      /*
      ***************
      *** 2960,2968 ****
      }

      static struct PyMethodDef RangeMethods[] = {
      ! /* name, function, calling, documentation */
      ! {"append", (PyCFunction)RangeAppend, METH_VARARGS, "Append data to the Vim range" },
      ! { NULL, NULL, 0, NULL }
      };

      static PyTypeObject BufferType;
      --- 2960,2968 ----
      }

      static struct PyMethodDef RangeMethods[] = {
      ! /* name, function, calling, documentation */
      ! {"append", (PyCFunction)RangeAppend, 1, "Append data to the Vim range" },
      ! { NULL, NULL, 0, NULL }
      };

      static PyTypeObject BufferType;
      ***************
      *** 3146,3159 ****
      }

      static struct PyMethodDef BufferMethods[] = {
      ! /* name, function, calling, documentation */
      ! {"append", (PyCFunction)BufferAppend, METH_VARARGS, "Append data to Vim buffer" },
      ! {"mark", (PyCFunction)BufferMark, METH_VARARGS, "Return (row,col) representing position of named mark" },
      ! {"range", (PyCFunction)BufferRange, METH_VARARGS, "Return a range object which represents the part of the given buffer between line numbers s and e" },
      #if PY_VERSION_HEX >= 0x03000000
      ! {"__dir__", (PyCFunction)BufferDir, METH_NOARGS, "List buffer attributes" },
      #endif
      ! { NULL, NULL, 0, NULL }
      };

      /*
      --- 3146,3159 ----
      }

      static struct PyMethodDef BufferMethods[] = {
      ! /* name, function, calling, documentation */
      ! {"append", (PyCFunction)BufferAppend, 1, "Append data to Vim buffer" },
      ! {"mark", (PyCFunction)BufferMark, 1, "Return (row,col) representing position of named mark" },
      ! {"range", (PyCFunction)BufferRange, 1, "Return a range object which represents the part of the given buffer between line numbers s and e" },
      #if PY_VERSION_HEX >= 0x03000000
      ! {"__dir__", (PyCFunction)BufferDir, 4, "List its attributes" },
      #endif
      ! { NULL, NULL, 0, NULL }
      };

      /*
      *** ../vim-7.3.992/src/if_python3.c 2013-05-21 18:30:29.000000000 +0200
      --- src/if_python3.c 2013-05-21 18:42:28.000000000 +0200
      ***************
      *** 666,672 ****
      return PyType_GenericAlloc(type,nitems);
      }

      ! static PyObject *BufferDir(PyObject *);
      static PyObject *OutputGetattro(PyObject *, PyObject *);
      static int OutputSetattro(PyObject *, PyObject *, PyObject *);
      static PyObject *BufferGetattro(PyObject *, PyObject *);
      --- 666,672 ----
      return PyType_GenericAlloc(type,nitems);
      }

      ! static PyObject *BufferDir(PyObject *, PyObject *);
      static PyObject *OutputGetattro(PyObject *, PyObject *);
      static int OutputSetattro(PyObject *, PyObject *, PyObject *);
      static PyObject *BufferGetattro(PyObject *, PyObject *);
      ***************
      *** 1091,1097 ****
      }

      static PyObject *
      ! BufferDir(PyObject *self UNUSED)
      {
      return Py_BuildValue("[sssss]", "name", "number",
      "append", "mark", "range");
      --- 1091,1097 ----
      }

      static PyObject *
      ! BufferDir(PyObject *self UNUSED, PyObject *args UNUSED)
      {
      return Py_BuildValue("[sssss]", "name", "number",
      "append", "mark", "range");
      *** ../vim-7.3.992/src/version.c 2013-05-21 18:30:29.000000000 +0200
      --- src/version.c 2013-05-21 18:46:51.000000000 +0200
      ***************
      *** 730,731 ****
      --- 730,733 ----
      { /* Add new patch number below this line */
      + /**/
      + 993,
      /**/

      --
      How come wrong numbers are never busy?

      /// 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.