mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-15 06:20:41 +00:00
Support converting an rdcarray pointer to rdcarray
* This means if there's no intervening list() it still works, e.g. passing an rdcarray property to a function paramater that expects an rdcarray in python.
This commit is contained in:
@@ -557,6 +557,18 @@ struct TypeConversion<rdcarray<U>, false>
|
||||
// nicer failure error messages out with the index that failed
|
||||
static int ConvertFromPy(PyObject *in, rdcarray<U> &out, int *failIdx)
|
||||
{
|
||||
swig_type_info *own_type = GetTypeInfo();
|
||||
if(own_type)
|
||||
{
|
||||
rdcarray<U> *ptr = NULL;
|
||||
int ret = SWIG_ConvertPtr(in, (void **)&ptr, own_type, 0);
|
||||
if(SWIG_IsOK(ret))
|
||||
{
|
||||
out = *ptr;
|
||||
return SWIG_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if(!PyList_Check(in))
|
||||
return SWIG_TypeError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user