You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since ConversionProviders only work for wrapped classes they won't be picked up for libcpp types in nested constructs.
Instead, it falls back to Cythons autoconversion.
This means, although the usage of the type of libcpp string (utf8 or normal) has not impact on the code, it impacts typing.
You must choose the correct libcpp string "version" in your pxd that reflects Cythons autoconversion.
Currently, this is "libcpp_utf8_string" for input (accepts both unicode and bytes) and "libcpp_string" for output (returns bytes).
Autoconversion settings are reflected in the Cython compilerdirectives:
c_string_type (bytes / str / unicode)
Globally set the type of an implicit coercion from char* or std::string.
c_string_encoding (ascii, default, utf-8, etc.)
Globally set the encoding to use when implicitly coercing char* or std:string to a unicode object. Coercion from a unicode object to C type is only allowed when set to ascii or default, the latter being utf-8 in Python 3 and nearly-always ascii in Python 2.
The text was updated successfully, but these errors were encountered:
Since ConversionProviders only work for wrapped classes they won't be picked up for libcpp types in nested constructs.
Instead, it falls back to Cythons autoconversion.
This means, although the usage of the type of libcpp string (utf8 or normal) has not impact on the code, it impacts typing.
You must choose the correct libcpp string "version" in your pxd that reflects Cythons autoconversion.
Currently, this is "libcpp_utf8_string" for input (accepts both unicode and bytes) and "libcpp_string" for output (returns bytes).
Autoconversion settings are reflected in the Cython compilerdirectives:
The text was updated successfully, but these errors were encountered: