@@ -66,7 +66,7 @@ void UPythonComponent::BeginPlay()
6666 py_uobject = ue_get_python_wrapper (this );
6767
6868 if (py_uobject) {
69- PyObject_SetAttrString (py_component_instance, " uobject" , (PyObject *)py_uobject);
69+ PyObject_SetAttrString (py_component_instance, ( char *) " uobject" , (PyObject *)py_uobject);
7070 }
7171 else {
7272 UE_LOG (LogPython, Error, TEXT (" Unable to set 'uobject' field in component wrapper class" ));
@@ -75,18 +75,18 @@ void UPythonComponent::BeginPlay()
7575 }
7676
7777 // disable ticking if no tick method is exposed
78- if (!PyObject_HasAttrString (py_component_instance, " tick" ) || PythonTickForceDisabled) {
78+ if (!PyObject_HasAttrString (py_component_instance, ( char *) " tick" ) || PythonTickForceDisabled) {
7979 SetComponentTickEnabled (false );
8080 }
8181
8282 if (!PythonDisableAutoBinding)
8383 ue_autobind_events_for_pyclass (py_uobject, py_component_instance);
8484
85- if (!PyObject_HasAttrString (py_component_instance, " begin_play" )) {
85+ if (!PyObject_HasAttrString (py_component_instance, ( char *) " begin_play" )) {
8686 return ;
8787 }
8888
89- PyObject *bp_ret = PyObject_CallMethod (py_component_instance, " begin_play" , NULL );
89+ PyObject *bp_ret = PyObject_CallMethod (py_component_instance, ( char *) " begin_play" , NULL );
9090 if (!bp_ret) {
9191 unreal_engine_py_log_error ();
9292 return ;
@@ -107,7 +107,7 @@ void UPythonComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActo
107107
108108 // no need to check for method availability, we did it in begin_play
109109
110- PyObject *ret = PyObject_CallMethod (py_component_instance, " tick" , " f" , DeltaTime);
110+ PyObject *ret = PyObject_CallMethod (py_component_instance, ( char *) " tick" , ( char *) " f" , DeltaTime);
111111 if (!ret) {
112112 unreal_engine_py_log_error ();
113113 return ;
@@ -128,7 +128,7 @@ void UPythonComponent::CallPythonComponentMethod(FString method_name, FString ar
128128 ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), NULL );
129129 }
130130 else {
131- ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), " s" , TCHAR_TO_UTF8 (*args));
131+ ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), ( char *) " s" , TCHAR_TO_UTF8 (*args));
132132 }
133133
134134 if (!ret) {
@@ -246,7 +246,7 @@ bool UPythonComponent::CallPythonComponentMethodBool(FString method_name, FStrin
246246 ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), NULL );
247247 }
248248 else {
249- ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), " s" , TCHAR_TO_UTF8 (*args));
249+ ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), ( char *) " s" , TCHAR_TO_UTF8 (*args));
250250 }
251251
252252
@@ -276,7 +276,7 @@ float UPythonComponent::CallPythonComponentMethodFloat(FString method_name, FStr
276276 ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), NULL );
277277 }
278278 else {
279- ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), " s" , TCHAR_TO_UTF8 (*args));
279+ ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), ( char *) " s" , TCHAR_TO_UTF8 (*args));
280280 }
281281
282282
@@ -309,7 +309,7 @@ FString UPythonComponent::CallPythonComponentMethodString(FString method_name, F
309309 ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), NULL );
310310 }
311311 else {
312- ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), " s" , TCHAR_TO_UTF8 (*args));
312+ ret = PyObject_CallMethod (py_component_instance, TCHAR_TO_UTF8 (*method_name), ( char *) " s" , TCHAR_TO_UTF8 (*args));
313313 }
314314
315315 if (!ret) {
@@ -345,4 +345,4 @@ UPythonComponent::~UPythonComponent()
345345#if UEPY_MEMORY_DEBUG
346346 UE_LOG (LogPython, Warning, TEXT (" Python UActorComponent (mapped to %p) wrapper XDECREF'ed" ), py_uobject ? py_uobject->ue_object : nullptr );
347347#endif
348- }
348+ }
0 commit comments