Permalink
Browse files

Remove unicodeobject.h from the build.

It does almost nothing when Py_USING_UNICODE is not defined.
  • Loading branch information...
Andy Chu
Andy Chu committed Aug 19, 2018
1 parent f1f4903 commit 312b54282c3005be077d9300ed90f4e20aabf1f0
Showing with 9 additions and 0 deletions.
  1. +5 −0 Python-2.7.13/Include/Python.h
  2. +4 −0 Python-2.7.13/Objects/stringobject.c
@@ -82,7 +82,12 @@
#include "pydebug.h"
#ifdef OVM_MAIN
#define PyUnicode_Check(op) 0
#else
#include "unicodeobject.h"
#endif
#include "intobject.h"
#include "boolobject.h"
#include "longobject.h"
@@ -1609,7 +1609,11 @@ string_join(PyStringObject *self, PyObject *orig)
}
if (seqlen == 1) {
item = PySequence_Fast_GET_ITEM(seq, 0);
#ifdef OVM_MAIN
if (PyString_CheckExact(item)) {
#else
if (PyString_CheckExact(item) || PyUnicode_CheckExact(item)) {
#endif
Py_INCREF(item);
Py_DECREF(seq);
return item;

0 comments on commit 312b542

Please sign in to comment.