disable the readonly state while rna property callbacks run.

This commit is contained in:
2011-06-07 16:08:49 +00:00
parent 53939ee4e9
commit e44ae2c2a9
3 changed files with 19 additions and 0 deletions

View File

@@ -323,11 +323,20 @@ int pyrna_write_check(void)
{
return !rna_disallow_writes;
}
void pyrna_write_set(int val)
{
rna_disallow_writes= !val;
}
#else // USE_PEDANTIC_WRITE
int pyrna_write_check(void)
{
return TRUE;
}
void pyrna_write_set(int UNUSED(val))
{
/* nothing */
}
#endif // USE_PEDANTIC_WRITE
static Py_ssize_t pyrna_prop_collection_length(BPy_PropertyRNA *self);