@@ -112,7 +112,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
112112 PyErr_SetString (Error , "unsupported locale setting" );
113113 return NULL ;
114114 }
115- result_object = PyUnicode_DecodeLocale (result , 0 );
115+ result_object = PyUnicode_DecodeLocale (result , NULL );
116116 if (!result_object )
117117 return NULL ;
118118 } else {
@@ -122,7 +122,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
122122 PyErr_SetString (Error , "locale query failed" );
123123 return NULL ;
124124 }
125- result_object = PyUnicode_DecodeLocale (result , 0 );
125+ result_object = PyUnicode_DecodeLocale (result , NULL );
126126 }
127127 return result_object ;
128128}
@@ -148,7 +148,7 @@ PyLocale_localeconv(PyObject* self)
148148 involved herein */
149149
150150#define RESULT_STRING (s )\
151- x = PyUnicode_DecodeLocale(l->s, 0 ); \
151+ x = PyUnicode_DecodeLocale(l->s, NULL ); \
152152 if (!x) goto failed;\
153153 PyDict_SetItemString(result, #s, x);\
154154 Py_XDECREF(x)
@@ -439,7 +439,7 @@ PyLocale_nl_langinfo(PyObject* self, PyObject* args)
439439 instead of an empty string for nl_langinfo(ERA). */
440440 const char * result = nl_langinfo (item );
441441 result = result != NULL ? result : "" ;
442- return PyUnicode_DecodeLocale (result , 0 );
442+ return PyUnicode_DecodeLocale (result , NULL );
443443 }
444444 PyErr_SetString (PyExc_ValueError , "unsupported langinfo constant" );
445445 return NULL ;
@@ -458,7 +458,7 @@ PyIntl_gettext(PyObject* self, PyObject *args)
458458 char * in ;
459459 if (!PyArg_ParseTuple (args , "s" , & in ))
460460 return 0 ;
461- return PyUnicode_DecodeLocale (gettext (in ), 0 );
461+ return PyUnicode_DecodeLocale (gettext (in ), NULL );
462462}
463463
464464PyDoc_STRVAR (dgettext__doc__ ,
@@ -471,7 +471,7 @@ PyIntl_dgettext(PyObject* self, PyObject *args)
471471 char * domain , * in ;
472472 if (!PyArg_ParseTuple (args , "zs" , & domain , & in ))
473473 return 0 ;
474- return PyUnicode_DecodeLocale (dgettext (domain , in ), 0 );
474+ return PyUnicode_DecodeLocale (dgettext (domain , in ), NULL );
475475}
476476
477477PyDoc_STRVAR (dcgettext__doc__ ,
@@ -485,7 +485,7 @@ PyIntl_dcgettext(PyObject *self, PyObject *args)
485485 int category ;
486486 if (!PyArg_ParseTuple (args , "zsi" , & domain , & msgid , & category ))
487487 return 0 ;
488- return PyUnicode_DecodeLocale (dcgettext (domain ,msgid ,category ), 0 );
488+ return PyUnicode_DecodeLocale (dcgettext (domain ,msgid ,category ), NULL );
489489}
490490
491491PyDoc_STRVAR (textdomain__doc__ ,
@@ -503,7 +503,7 @@ PyIntl_textdomain(PyObject* self, PyObject* args)
503503 PyErr_SetFromErrno (PyExc_OSError );
504504 return NULL ;
505505 }
506- return PyUnicode_DecodeLocale (domain , 0 );
506+ return PyUnicode_DecodeLocale (domain , NULL );
507507}
508508
509509PyDoc_STRVAR (bindtextdomain__doc__ ,
@@ -535,7 +535,7 @@ PyIntl_bindtextdomain(PyObject* self,PyObject*args)
535535 PyErr_SetFromErrno (PyExc_OSError );
536536 return NULL ;
537537 }
538- result = PyUnicode_DecodeLocale (current_dirname , 0 );
538+ result = PyUnicode_DecodeLocale (current_dirname , NULL );
539539 Py_XDECREF (dirname_bytes );
540540 return result ;
541541}
@@ -553,7 +553,7 @@ PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args)
553553 return NULL ;
554554 codeset = bind_textdomain_codeset (domain , codeset );
555555 if (codeset )
556- return PyUnicode_DecodeLocale (codeset , 0 );
556+ return PyUnicode_DecodeLocale (codeset , NULL );
557557 Py_RETURN_NONE ;
558558}
559559#endif
0 commit comments