Skip to content

Commit c481f08

Browse files
committed
osx fixes
1 parent f54fabc commit c481f08

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

Source/UnrealEnginePython/Private/UEPyEngine.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ PyObject *py_unreal_engine_add_on_screen_debug_message(PyObject * self, PyObject
6868
return NULL;
6969
}
7070

71-
if (!GEngine)
72-
goto end;
71+
if (!GEngine) {
72+
Py_INCREF(Py_None);
73+
return Py_None;
74+
}
7375

7476
PyObject *stringified = PyObject_Str(py_message);
7577
if (!stringified)
@@ -80,9 +82,8 @@ PyObject *py_unreal_engine_add_on_screen_debug_message(PyObject * self, PyObject
8082

8183
Py_DECREF(stringified);
8284

83-
end:
8485
Py_INCREF(Py_None);
85-
return Py_None;
86+
return Py_None;
8687
}
8788

8889
PyObject *py_unreal_engine_print_string(PyObject * self, PyObject * args) {
@@ -92,8 +93,10 @@ PyObject *py_unreal_engine_print_string(PyObject * self, PyObject * args) {
9293
return NULL;
9394
}
9495

95-
if (!GEngine)
96-
goto end;
96+
if (!GEngine) {
97+
Py_INCREF(Py_None);
98+
return Py_None;
99+
}
97100

98101
PyObject *stringified = PyObject_Str(py_message);
99102
if (!stringified)
@@ -104,7 +107,6 @@ PyObject *py_unreal_engine_print_string(PyObject * self, PyObject * args) {
104107

105108
Py_DECREF(stringified);
106109

107-
end:
108110
Py_INCREF(Py_None);
109111
return Py_None;
110112
}

Source/UnrealEnginePython/Private/UEPyFHitResult.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ static PyObject *py_ue_fhitresult_get_actor(ue_PyFHitResult *self, void *closure
5555

5656

5757
static PyGetSetDef ue_PyFHitResult_getseters[] = {
58-
{ "location", (getter)py_ue_fhitresult_get_location, NULL, "", NULL },
59-
{ "normal", (getter)py_ue_fhitresult_get_normal, NULL, "", NULL },
60-
{ "actor", (getter)py_ue_fhitresult_get_actor, NULL, "", NULL },
61-
{ "distance", (getter)py_ue_fhitresult_get_distance, NULL, "", NULL },
62-
{ "impact_point", (getter)py_ue_fhitresult_get_impact_point, NULL, "", NULL },
63-
{ "impact_normal", (getter)py_ue_fhitresult_get_impact_normal, NULL, "", NULL },
64-
{ "time", (getter)py_ue_fhitresult_get_time, NULL, "", NULL },
65-
{ "bone_name", (getter)py_ue_fhitresult_get_bone_name, NULL, "", NULL },
58+
{(char *)"location", (getter)py_ue_fhitresult_get_location, NULL, (char *)"", NULL },
59+
{(char *)"normal", (getter)py_ue_fhitresult_get_normal, NULL, (char *)"", NULL },
60+
{(char *)"actor", (getter)py_ue_fhitresult_get_actor, NULL, (char *)"", NULL },
61+
{(char *)"distance", (getter)py_ue_fhitresult_get_distance, NULL, (char *)"", NULL },
62+
{(char *)"impact_point", (getter)py_ue_fhitresult_get_impact_point, NULL, (char *)"", NULL },
63+
{(char *)"impact_normal", (getter)py_ue_fhitresult_get_impact_normal, NULL, (char *)"", NULL },
64+
{(char *)"time", (getter)py_ue_fhitresult_get_time, NULL, (char *)"", NULL },
65+
{(char *)"bone_name", (getter)py_ue_fhitresult_get_bone_name, NULL, (char *)"", NULL },
6666
{ NULL } /* Sentinel */
6767
};
6868

Source/UnrealEnginePython/Private/UEPyFRotator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ static int py_ue_frotator_set_roll(ue_PyFRotator *self, PyObject *value, void *c
7676

7777

7878
static PyGetSetDef ue_PyFRotator_getseters[] = {
79-
{ "pitch", (getter)py_ue_frotator_get_pitch, (setter)py_ue_frotator_set_pitch, "", NULL },
80-
{ "yaw", (getter)py_ue_frotator_get_yaw, (setter)py_ue_frotator_set_yaw, "", NULL },
81-
{ "roll", (getter)py_ue_frotator_get_roll, (setter)py_ue_frotator_set_roll, "", NULL },
79+
{ (char*)"pitch", (getter)py_ue_frotator_get_pitch, (setter)py_ue_frotator_set_pitch, (char *)"", NULL },
80+
{ (char *)"yaw", (getter)py_ue_frotator_get_yaw, (setter)py_ue_frotator_set_yaw, (char *)"", NULL },
81+
{ (char *)"roll", (getter)py_ue_frotator_get_roll, (setter)py_ue_frotator_set_roll, (char *)"", NULL },
8282
{ NULL } /* Sentinel */
8383
};
8484

Source/UnrealEnginePython/Private/UEPyFTransform.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ static PyObject *py_ue_ftransform_get_rotation(ue_PyFTransform *self, void *clos
2121

2222

2323
static PyGetSetDef ue_PyFTransform_getseters[] = {
24-
{ "translation", (getter)py_ue_ftransform_get_translation, NULL, "", NULL },
25-
{ "scale", (getter)py_ue_ftransform_get_scale, NULL, "", NULL },
26-
{ "rotation", (getter)py_ue_ftransform_get_rotation, NULL, "", NULL },
24+
{(char *) "translation", (getter)py_ue_ftransform_get_translation, NULL, (char *)"", NULL },
25+
{(char *) "scale", (getter)py_ue_ftransform_get_scale, NULL, (char *)"", NULL },
26+
{(char *) "rotation", (getter)py_ue_ftransform_get_rotation, NULL, (char *)"", NULL },
2727
{ NULL } /* Sentinel */
2828
};
2929

Source/UnrealEnginePython/Private/UEPyFVector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ static int py_ue_fvector_set_z(ue_PyFVector *self, PyObject *value, void *closur
8888

8989

9090
static PyGetSetDef ue_PyFVector_getseters[] = {
91-
{ "x", (getter)py_ue_fvector_get_x, (setter)py_ue_fvector_set_x, "", NULL },
92-
{ "y", (getter)py_ue_fvector_get_y, (setter)py_ue_fvector_set_y, "", NULL },
93-
{ "z", (getter)py_ue_fvector_get_z, (setter)py_ue_fvector_set_z, "", NULL },
91+
{(char *) "x", (getter)py_ue_fvector_get_x, (setter)py_ue_fvector_set_x, (char *)"", NULL },
92+
{(char *) "y", (getter)py_ue_fvector_get_y, (setter)py_ue_fvector_set_y, (char *)"", NULL },
93+
{(char *) "z", (getter)py_ue_fvector_get_z, (setter)py_ue_fvector_set_z, (char *)"", NULL },
9494
{ NULL } /* Sentinel */
9595
};
9696

0 commit comments

Comments
 (0)