FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[WIP] gh-85283: Build _csv extension with limited C API by vstinner · Pull Request #117321 · python/cpython · GitHub

Repository navigation

[WIP] gh-85283: Build _csv extension with limited C API - #117321

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:limited_csv
Closed

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:limited_csv

Conversation

vstinner commented Mar 28, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member
  • Replace PyObject_VectorcallDict() with PyObject_Call() in _call_dialect(). Create a temporary tuple to pass the positional dialect argument.
  • Use PyUnicode_DecodeUTF32() to create an Unicode string from Py_UCS4 characters.
  • Replace PyErr_Format("%.200s", Py_TYPE(src)->tp_name) with PyErr_Format("%T", src).
  • Replace PyUnicode_READ_CHAR() with PyUnicode_ReadChar().
  • Replace PyUnicode_READ() with PyUnicode_ReadChar(). join_append_lineterminator() now takes an object (Unicode string) as argument.
  • Replace PyUnicode_GET_LENGTH() with PyUnicode_GetLength().
  • Replace Py_XSETREF() with assignement and Py_XDECREF().
  • Replace PyDict_Pop() with PyDict_DelItem().
  • Use PyType_GetSlot() to get tp_clear and tp_alloc slots.
  • Add some casts to (PyObject*).
  • Add an explicit #include <string.h>.

* Replace PyObject_VectorcallDict() with PyObject_Call() in
  _call_dialect(). Create a temporary tuple to pass the positional
  dialect argument.
* Use PyUnicode_DecodeUTF32() to create an Unicode string from
  Py_UCS4 characters.
* Replace PyErr_Format("%.200s", Py_TYPE(src)->tp_name) with
  PyErr_Format("%T", src).
* Replace PyUnicode_READ_CHAR() with PyUnicode_ReadChar().
* Replace PyUnicode_READ() with PyUnicode_ReadChar().
  join_append_lineterminator() now takes an object (Unicode string)
  as argument.
* Replace PyUnicode_GET_LENGTH() with PyUnicode_GetLength().
* Replace Py_XSETREF() with assignement and Py_XDECREF().
* Replace PyDict_Pop() with PyDict_DelItem().
* Use PyType_GetSlot() to get tp_clear and tp_alloc slots.
* Add some casts to (PyObject*).
* Add an explicit #include <string.h>.

vstinner commented Apr 3, 2024

Copy link
Copy Markdown
Member Author

I don't think that it's worth it. I prefer to close this PR.

vstinner closed this Apr 3, 2024
vstinner deleted the limited_csv branch April 3, 2024 18:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL