Files
UnrealEngineUWP/Engine/Plugins/Experimental/PythonScriptPlugin/Source/PythonScriptPlugin/Private/PyConversionMethod.h
Ben Marsh 13d012685f Merging copyright update from 4.19 branch.
#rb none
#rnx
#jira

[CL 3818977 by Ben Marsh in Staging-4.19 branch]
2018-01-02 15:30:26 -05:00

26 lines
624 B
C

// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "IncludePython.h"
#include "CoreMinimal.h"
#if WITH_PYTHON
enum class EPyConversionMethod : uint8
{
/** Copy the value */
Copy,
/** Steal the value (or fallback to Copy) */
Steal,
/** Reference the value from the given owner (or fallback to Copy) */
Reference,
};
FORCEINLINE void AssertValidPyConversionOwner(PyObject* InPyOwner, const EPyConversionMethod InMethod)
{
checkf(InPyOwner || InMethod != EPyConversionMethod::Reference, TEXT("EPyConversionMethod::Reference requires a valid owner object"));
}
#endif // WITH_PYTHON