@@ -61,12 +61,12 @@ std::map<UObject *, ue_PyUObject *> ue_python_gc;
6161static PyObject *py_unreal_engine_py_gc (PyObject * self, PyObject * args) {
6262 std::list<UObject *> broken_list;
6363 for (auto it : ue_python_gc) {
64- #if UEPY_MEMORY_DEBUG
64+ #if defined( UEPY_MEMORY_DEBUG)
6565 UE_LOG (LogPython, Warning, TEXT (" Checking for UObject at %p" ), it.first );
6666#endif
6767 UObject *u_obj = it.first ;
6868 if (!u_obj || !u_obj->IsValidLowLevel () || u_obj->IsPendingKillOrUnreachable ()) {
69- #if UEPY_MEMORY_DEBUG
69+ #if defined( UEPY_MEMORY_DEBUG)
7070 UE_LOG (LogPython, Warning, TEXT (" Removing UObject at %p (refcnt: %d)" ), it.first , it.second ->ob_base .ob_refcnt );
7171#endif
7272 broken_list.push_back (u_obj);
@@ -583,7 +583,7 @@ void ue_pydelegates_cleanup(ue_PyUObject *self) {
583583 return ;
584584 for (UPythonDelegate *py_delegate : *(self->python_delegates_gc )) {
585585 if (py_delegate && py_delegate->IsValidLowLevel ()) {
586- #if UEPY_MEMORY_DEBUG
586+ #if defined( UEPY_MEMORY_DEBUG)
587587 UE_LOG (LogPython, Warning, TEXT (" Removing UPythonDelegate %p from ue_PyUObject %p mapped to UObject %p" ), py_delegate, self, self->ue_object );
588588#endif
589589 py_delegate->RemoveFromRoot ();
@@ -598,7 +598,7 @@ void ue_pydelegates_cleanup(ue_PyUObject *self) {
598598
599599// destructor
600600static void ue_pyobject_dealloc (ue_PyUObject *self) {
601- #if UEPY_MEMORY_DEBUG
601+ #if defined( UEPY_MEMORY_DEBUG)
602602 UE_LOG (LogPython, Warning, TEXT (" Destroying ue_PyUObject %p mapped to UObject %p" ), self, self->ue_object );
603603#endif
604604 ue_pydelegates_cleanup (self);
@@ -1189,7 +1189,7 @@ ue_PyUObject *ue_get_python_wrapper(UObject *ue_obj) {
11891189
11901190 ue_python_gc[ue_obj] = ue_py_object;
11911191
1192- #if UEPY_MEMORY_DEBUG
1192+ #if defined( UEPY_MEMORY_DEBUG)
11931193 UE_LOG (LogPython, Warning, TEXT (" CREATED UPyObject at %p for %p %s" ), ue_py_object, ue_obj, *ue_obj->GetName ());
11941194#endif
11951195 // Py_INCREF(ue_py_object);
0 commit comments