| 5 | |
| 6 | UCLASS() |
| 7 | class UPythonClass : public UClass |
| 8 | { |
| 9 | GENERATED_BODY() |
| 10 | |
| 11 | public: |
| 12 | |
| 13 | void SetPyConstructor(PyObject *callable) { |
| 14 | py_constructor = callable; |
| 15 | Py_INCREF(py_constructor); |
| 16 | } |
| 17 | |
| 18 | void CallPyConstructor(ue_PyUObject *self) { |
| 19 | if (!py_constructor) |
| 20 | return; |
| 21 | PyObject *ret = PyObject_CallObject(py_constructor, Py_BuildValue("(O)", self)); |
| 22 | if (!ret) { |
| 23 | unreal_engine_py_log_error(); |
| 24 | return; |
| 25 | } |
| 26 | Py_DECREF(ret); |
| 27 | } |
| 28 | |
| 29 | // __dict__ is stored here |
| 30 | ue_PyUObject *py_uobject; |
| 31 | |
| 32 | private: |
| 33 | |
| 34 | PyObject *py_constructor; |
| 35 | }; |
| 36 |
nothing calls this directly
no outgoing calls
no test coverage detected