node.pos, cfunc_name, self.PyObject_Size_func_type,
args = [arg],
is_temp = node.is_temp)
+ elif arg.type is PyrexTypes.c_py_unicode_type:
+ return ExprNodes.IntNode(node.pos, value='1', constant_result=1,
+ type=node.type)
else:
return node
if node.type not in (PyrexTypes.c_size_t_type, PyrexTypes.c_py_ssize_t_type):
uchar.upper(),
uchar.title(),
]
+
+@cython.test_assert_path_exists('//IntNode')
+@cython.test_fail_if_path_exists('//SimpleCallNode',
+ '//PythonCapiCallNode')
+def len_uchar(Py_UNICODE uchar):
+ """
+ >>> len_uchar(ord('A'))
+ 1
+ """
+ return len(uchar)