[pypy-svn] r69381 - pypy/trunk/pypy/module/oracle

afa at codespeak.net afa at codespeak.net
Wed Nov 18 16:18:20 CET 2009


Author: afa
Date: Wed Nov 18 16:18:19 2009
New Revision: 69381

Modified:
   pypy/trunk/pypy/module/oracle/interp_variable.py
Log:
Fix the Decimal case, when locale settings use a comma for the decimal separator.


Modified: pypy/trunk/pypy/module/oracle/interp_variable.py
==============================================================================
--- pypy/trunk/pypy/module/oracle/interp_variable.py	(original)
+++ pypy/trunk/pypy/module/oracle/interp_variable.py	Wed Nov 18 16:18:19 2009
@@ -572,11 +572,13 @@
             text_buf.fill(space, w_text)
             format_buf = config.StringBuffer()
             format_buf.fill(space, w_format)
+            nls_params = "NLS_NUMERIC_CHARACTERS='.,'"
             status = roci.OCINumberFromText(
                 self.environment.errorHandle,
                 text_buf.ptr, text_buf.size,
                 format_buf.ptr, format_buf.size,
-                None, 0, dataptr)
+                nls_params, len(nls_params),
+                dataptr)
             self.environment.checkForError(
                 status, "NumberVar_SetValue(): from decimal")
             return



More information about the Pypy-commit mailing list