Changeset: c05ae187fc53 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c05ae187fc53
Modified Files:
        sql/backends/monet5/UDF/pyapi/type_conversion.c
Branch: python3udf
Log Message:

Fix bug in string -> int conversion for unicode characters.


diffs (12 lines):

diff --git a/sql/backends/monet5/UDF/pyapi/type_conversion.c 
b/sql/backends/monet5/UDF/pyapi/type_conversion.c
--- a/sql/backends/monet5/UDF/pyapi/type_conversion.c
+++ b/sql/backends/monet5/UDF/pyapi/type_conversion.c
@@ -248,7 +248,7 @@ str pyobject_to_##type(PyObject **pyobj,
             maxsize = utf32_strlen(ptr);                \
     if (maxsize > 255)                      \
             maxsize = 255;                      \
-        unicode_to_utf8(0, maxsize / sizeof(Py_UNICODE), utf8, ptr);           
  \
+        unicode_to_utf8(0, maxsize, utf8, ptr);             \
         return str_to_##tpe(utf8, 0, value);                \
     }                                   \
     PY_TO_(tpe, inttpe);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to