Cleanup: Move rna_access.c to C++

See #103343

Pull Request #105060
This commit is contained in:
2023-02-22 14:04:57 +01:00
committed by Hans Goudey
parent 140a663f6f
commit 709013dca4
4 changed files with 294 additions and 274 deletions

View File

@@ -11,7 +11,7 @@ if(HAVE_MALLOC_STATS_H)
add_definitions(-DHAVE_MALLOC_STATS_H)
endif()
# files rna_access.c rna_define.c makesrna.c intentionally excluded.
# files rna_access.cc rna_define.c makesrna.c intentionally excluded.
set(DEFSRC
rna_ID.c
rna_action.c
@@ -422,7 +422,7 @@ add_custom_command(
# Build bf_rna
set(SRC
rna_access.c
rna_access.cc
rna_access_compare_override.c
rna_path.cc
${GENSRC}

View File

@@ -426,7 +426,7 @@ static PointerRNA rna_Struct_properties_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = &iter->internal.listbase;
/* we return either PropertyRNA* or IDProperty*, the rna_access.c
/* we return either PropertyRNA* or IDProperty*, the rna_access.cc
* functions can handle both as PropertyRNA* with some tricks */
return rna_pointer_inherit_refine(&iter->parent, &RNA_Property, internal->link);
}
@@ -455,7 +455,7 @@ static PointerRNA rna_Struct_functions_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = &iter->internal.listbase;
/* we return either PropertyRNA* or IDProperty*, the rna_access.c
/* we return either PropertyRNA* or IDProperty*, the rna_access.cc
* functions can handle both as PropertyRNA* with some tricks */
return rna_pointer_inherit_refine(&iter->parent, &RNA_Function, internal->link);
}

View File

@@ -5256,7 +5256,7 @@ static int foreach_parse_args(BPy_PropertyRNA *self,
target_tot = array_tot * (*r_attr_tot);
/* rna_access.c - rna_raw_access(...) uses this same method. */
/* rna_access.cc - rna_raw_access(...) uses this same method. */
if (target_tot != (*r_tot)) {
PyErr_Format(PyExc_TypeError,
"foreach_get(attr, sequence) sequence length mismatch given %d, needed %d",