C, style changes (mostly white space edits), no functional change.
This commit is contained in:
@@ -49,7 +49,7 @@ typedef void (*RNA_SetIndexFunc)(PointerRNA *, PropertyRNA *, int index, void *)
|
||||
*/
|
||||
|
||||
/*
|
||||
arr[2] = x
|
||||
arr[2]= x
|
||||
|
||||
py_to_array_index(arraydim=0, arrayoffset=0, index=2)
|
||||
validate_array(lvalue_dim=0)
|
||||
@@ -187,16 +187,16 @@ static int validate_array_length(PyObject *rvalue, PointerRNA *ptr, PropertyRNA
|
||||
|
||||
/* arr[3][4][5]
|
||||
|
||||
arr[2] = x
|
||||
arr[2]= x
|
||||
dimsize={4, 5}
|
||||
dimsize[1] = 4
|
||||
dimsize[2] = 5
|
||||
dimsize[1]= 4
|
||||
dimsize[2]= 5
|
||||
lvalue_dim=0, totdim=3
|
||||
|
||||
arr[2][3] = x
|
||||
arr[2][3]= x
|
||||
lvalue_dim=1
|
||||
|
||||
arr[2][3][4] = x
|
||||
arr[2][3][4]= x
|
||||
lvalue_dim=2 */
|
||||
for (i= lvalue_dim; i < totdim; i++)
|
||||
len *= dimsize[i];
|
||||
@@ -234,7 +234,7 @@ static char *copy_value_single(PyObject *item, PointerRNA *ptr, PropertyRNA *pro
|
||||
|
||||
convert_item(item, value);
|
||||
rna_set_index(ptr, prop, *index, value);
|
||||
*index = *index + 1;
|
||||
*index= *index + 1;
|
||||
}
|
||||
else {
|
||||
convert_item(item, data);
|
||||
@@ -320,11 +320,11 @@ static int py_to_array_index(PyObject *py, PointerRNA *ptr, PropertyRNA *prop, i
|
||||
|
||||
/* arr[3][4][5]
|
||||
|
||||
arr[2] = x
|
||||
lvalue_dim=0, index = 0 + 2 * 4 * 5
|
||||
arr[2]= x
|
||||
lvalue_dim=0, index= 0 + 2 * 4 * 5
|
||||
|
||||
arr[2][3] = x
|
||||
lvalue_dim=1, index = 40 + 3 * 5 */
|
||||
arr[2][3]= x
|
||||
lvalue_dim=1, index= 40 + 3 * 5 */
|
||||
|
||||
lvalue_dim++;
|
||||
|
||||
@@ -504,7 +504,7 @@ PyObject *pyrna_py_from_array_index(BPy_PropertyArrayRNA *self, PointerRNA *ptr,
|
||||
BPy_PropertyArrayRNA *ret= NULL;
|
||||
|
||||
arraydim= self ? self->arraydim : 0;
|
||||
arrayoffset = self ? self->arrayoffset : 0;
|
||||
arrayoffset= self ? self->arrayoffset : 0;
|
||||
|
||||
/* just in case check */
|
||||
len= RNA_property_multi_array_length(ptr, prop, arraydim);
|
||||
@@ -524,11 +524,11 @@ PyObject *pyrna_py_from_array_index(BPy_PropertyArrayRNA *self, PointerRNA *ptr,
|
||||
|
||||
/* arr[3][4][5]
|
||||
|
||||
x = arr[2]
|
||||
index = 0 + 2 * 4 * 5
|
||||
x= arr[2]
|
||||
index= 0 + 2 * 4 * 5
|
||||
|
||||
x = arr[2][3]
|
||||
index = offset + 3 * 5 */
|
||||
x= arr[2][3]
|
||||
index= offset + 3 * 5 */
|
||||
|
||||
for (i= arraydim + 1; i < totdim; i++)
|
||||
index *= dimsize[i];
|
||||
@@ -536,7 +536,7 @@ PyObject *pyrna_py_from_array_index(BPy_PropertyArrayRNA *self, PointerRNA *ptr,
|
||||
ret->arrayoffset= arrayoffset + index;
|
||||
}
|
||||
else {
|
||||
index = arrayoffset + index;
|
||||
index= arrayoffset + index;
|
||||
ret= (BPy_PropertyArrayRNA *)pyrna_array_index(ptr, prop, index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user