Commit 4ca95f80 authored by Stefan Behnel's avatar Stefan Behnel

minor code cleanup

--HG--
extra : transplant_source : M%D5%2C%C2%15%9E%3C%BC%3C%89%25n%95%DF%5C%B8%B5%C5%B8%D9
parent 39e0500c
...@@ -130,12 +130,12 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { ...@@ -130,12 +130,12 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* default_encoding = NULL; PyObject* default_encoding = NULL;
char* default_encoding_c; char* default_encoding_c;
sys = PyImport_ImportModule("sys"); sys = PyImport_ImportModule("sys");
if (sys == NULL) goto bad; if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
if (default_encoding == NULL) goto bad; if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AS_STRING(default_encoding); default_encoding_c = PyBytes_AS_STRING(default_encoding);
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
if (__PYX_DEFAULT_STRING_ENCODING == NULL) goto bad; if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
Py_DECREF(sys); Py_DECREF(sys);
Py_DECREF(default_encoding); Py_DECREF(default_encoding);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment