Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
vstinner wants to merge1 commit intopython:mainfromvstinner:limited_csv

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMar 28, 2024
edited by bedevere-appbot
Loading

  • 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
Copy link
MemberAuthor

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

@vstinnervstinner deleted the limited_csv branchApril 3, 2024 18:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp