Skip to content

Commit 994bcb4

Browse files
author
Roberto De Ioris
committed
beter python2 support
1 parent 33f43d2 commit 994bcb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/UnrealEnginePython/Private/Blueprint/UEPyEdGraphPin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static PyObject *py_ue_edgraphpin_get_default_value(ue_PyEdGraphPin *self, void
121121

122122
static int py_ue_edgraphpin_set_default_value(ue_PyEdGraphPin *self, PyObject *value, void *closure)
123123
{
124-
if (value && PyUnicode_Check(value))
124+
if (value && PyUnicodeOrString_Check(value))
125125
{
126126
const char *str = UEPyUnicode_AsUTF8(value);
127127
self->pin->DefaultValue = UTF8_TO_TCHAR(str);
@@ -138,7 +138,7 @@ static PyObject *py_ue_edgraphpin_get_default_text_value(ue_PyEdGraphPin *self,
138138

139139
static int py_ue_edgraphpin_set_default_text_value(ue_PyEdGraphPin *self, PyObject *value, void *closure)
140140
{
141-
if (value && PyUnicode_Check(value))
141+
if (value && PyUnicodeOrString_Check(value))
142142
{
143143
const char *str = UEPyUnicode_AsUTF8(value);
144144
self->pin->DefaultTextValue = FText::FromString(UTF8_TO_TCHAR(str));

0 commit comments

Comments
 (0)