Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Clean up these declarations:
Browse files Browse the repository at this point in the history
* Just have them return 'object' since specifying 'unicode' or 'bytes'
  can confuse Cython.
* Please don't use built-ins as argument names where it can be avoided;
  makes syntax highlighting confusing.
  • Loading branch information
embray committed Dec 21, 2017
1 parent b32f000 commit ccf7bcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/cpython/string.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ from cpython.unicode cimport PyUnicode_Decode, PyUnicode_AsEncodedString
IF PY_MAJOR_VERSION >= 3:
cdef extern from "Python.h":
# Missing from cpython.unicode in Cython 0.27.3
char* PyUnicode_AsUTF8(object unicode)
unicode PyUnicode_DecodeLocale(const char* str, const char* errors)
bytes PyUnicode_EncodeLocale(object unicode, const char* errors)
char* PyUnicode_AsUTF8(object s)
object PyUnicode_DecodeLocale(const char* s, const char* errors)
object PyUnicode_EncodeLocale(object s, const char* errors)


cdef inline str char_to_str(const char* c, encoding=None, errors=None):
Expand Down

0 comments on commit ccf7bcd

Please sign in to comment.