From 09b07d0d999f3cdded9041bc879e0b7163687764 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Tue, 30 Jun 2020 18:16:10 -0700 Subject: [PATCH 01/36] Mangle name of Fortran helper copy_string If multiple Shroud wrapped modules are used in a file, they will each contain an interface for SHROUD_copy_string_and_free. Ideally the interface would be PRIVATE. However, gfortran does not allow PRIVATE and BIND(C) to be mixed since it sees them as contradictory. Instead, mangle the helper name with C_prefix to make them unique. --- .../reference/arrayclass/arrayclass.json | 12 +++++++++++ regression/reference/cdesc/cdesc.json | 2 ++ regression/reference/classes/classes.json | 2 ++ regression/reference/classes/wrapfclasses.f | 8 ++++---- regression/reference/debugfalse/tutorial.json | 1 + .../reference/debugfalse/wrapftutorial.f | 6 +++--- regression/reference/example/example.json | 4 ++++ .../example/wrapfUserLibrary_example_nested.f | 12 +++++------ regression/reference/memdoc/memdoc.json | 1 + regression/reference/memdoc/wrapfmemdoc.f | 6 +++--- regression/reference/namespace/namespace.json | 1 + regression/reference/namespace/wrapfns.f | 6 +++--- regression/reference/none/helpers.f | 4 ++-- regression/reference/ownership/ownership.json | 10 ++++++++++ regression/reference/pointers-c/pointers.json | 11 ++++++++++ .../reference/pointers-cxx/pointers.json | 11 ++++++++++ regression/reference/strings/strings.json | 8 ++++++++ regression/reference/strings/wrapfstrings.f | 20 +++++++++---------- regression/reference/tutorial/tutorial.json | 1 + regression/reference/tutorial/wrapftutorial.f | 6 +++--- regression/reference/vectors/vectors.json | 8 ++++++++ shroud/typemap.py | 6 ++---- shroud/whelpers.py | 20 +++++++++++++++++-- shroud/wrapf.py | 18 +++++++++++------ 24 files changed, 138 insertions(+), 46 deletions(-) diff --git a/regression/reference/arrayclass/arrayclass.json b/regression/reference/arrayclass/arrayclass.json index 7a4662656..0709edeaa 100644 --- a/regression/reference/arrayclass/arrayclass.json +++ b/regression/reference/arrayclass/arrayclass.json @@ -481,6 +481,7 @@ "f_assumed_shape": "(:)", "f_type": "real(C_DOUBLE)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_*_result_pointer", @@ -630,6 +631,7 @@ "cxx_rv_decl": "double * SHC_rv", "function_name": "getArray", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "get_array" }, "options": { @@ -666,6 +668,7 @@ "f_assumed_shape": "(:)", "f_type": "real(C_DOUBLE)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_*_result_pointer", @@ -817,6 +820,7 @@ "cxx_rv_decl": "double * SHC_rv", "function_name": "getArrayConst", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "get_array_const" }, "options": { @@ -853,6 +857,7 @@ "f_assumed_shape": "(:)", "f_type": "real(C_DOUBLE)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_*_result_pointer", @@ -1004,6 +1009,7 @@ "cxx_rv_decl": "const double * SHC_rv", "function_name": "getArrayC", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "get_array_c" }, "options": { @@ -1040,6 +1046,7 @@ "f_assumed_shape": "(:)", "f_type": "real(C_DOUBLE)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_*_result_pointer", @@ -1193,6 +1200,7 @@ "cxx_rv_decl": "const double * SHC_rv", "function_name": "getArrayConstC", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "get_array_const_c" }, "options": { @@ -1409,6 +1417,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "array", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_**_out_pointer", @@ -1743,6 +1752,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "array", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_*&_out_pointer", @@ -2078,6 +2088,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "array", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_**_out_pointer", @@ -2414,6 +2425,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "array", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "stmt0": "f_native_*&_out_pointer", diff --git a/regression/reference/cdesc/cdesc.json b/regression/reference/cdesc/cdesc.json index 81b46cbff..4f9e4de75 100644 --- a/regression/reference/cdesc/cdesc.json +++ b/regression/reference/cdesc/cdesc.json @@ -41,6 +41,7 @@ "f_intent": "IN", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "ShroudTypeDefines", "rank": "2", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -603,6 +604,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "value", + "hnamefunc0": "ShroudTypeDefines", "rank": "0", "sh_type": "SH_TYPE_DOUBLE", "size": "1", diff --git a/regression/reference/classes/classes.json b/regression/reference/classes/classes.json index 07cd89979..f9c82ec0d 100644 --- a/regression/reference/classes/classes.json +++ b/regression/reference/classes/classes.json @@ -1202,6 +1202,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "CLA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -1893,6 +1894,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "CLA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/classes/wrapfclasses.f b/regression/reference/classes/wrapfclasses.f index 3e41aaecf..49d057c8d 100644 --- a/regression/reference/classes/wrapfclasses.f +++ b/regression/reference/classes/wrapfclasses.f @@ -713,14 +713,14 @@ end subroutine c_last_function_called_bufferify interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine CLA_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="CLA_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine CLA_SHROUD_copy_string_and_free end interface contains @@ -948,7 +948,7 @@ function class1_get_name(obj) & ! splicer begin class.Class1.method.get_name call c_class1_get_name_bufferify(obj%cxxmem, DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call CLA_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end class.Class1.method.get_name end function class1_get_name ! end class1_get_name @@ -1093,7 +1093,7 @@ function class2_get_name(obj) & ! splicer begin class.Class2.method.get_name call c_class2_get_name_bufferify(obj%cxxmem, DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call CLA_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end class.Class2.method.get_name end function class2_get_name diff --git a/regression/reference/debugfalse/tutorial.json b/regression/reference/debugfalse/tutorial.json index 5cbe40e0e..6c1eef4d1 100644 --- a/regression/reference/debugfalse/tutorial.json +++ b/regression/reference/debugfalse/tutorial.json @@ -553,6 +553,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "TUT_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/debugfalse/wrapftutorial.f b/regression/reference/debugfalse/wrapftutorial.f index 87a5a6af9..94c000aaa 100644 --- a/regression/reference/debugfalse/wrapftutorial.f +++ b/regression/reference/debugfalse/wrapftutorial.f @@ -434,14 +434,14 @@ end subroutine all_test1 interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine TUT_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="TUT_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine TUT_SHROUD_copy_string_and_free end interface contains @@ -462,7 +462,7 @@ function concatenate_strings(arg1, arg2) & len_trim(arg1, kind=C_INT), arg2, & len_trim(arg2, kind=C_INT), DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call TUT_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.concatenate_strings end function concatenate_strings diff --git a/regression/reference/example/example.json b/regression/reference/example/example.json index c2d6ec14a..d1d44f0b1 100644 --- a/regression/reference/example/example.json +++ b/regression/reference/example/example.json @@ -783,6 +783,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -2379,6 +2380,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -2586,6 +2588,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -2792,6 +2795,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/example/wrapfUserLibrary_example_nested.f b/regression/reference/example/wrapfUserLibrary_example_nested.f index d93d440d6..e94ab80ea 100644 --- a/regression/reference/example/wrapfUserLibrary_example_nested.f +++ b/regression/reference/example/wrapfUserLibrary_example_nested.f @@ -1230,14 +1230,14 @@ end subroutine c_cos_doubles interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine AA_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="AA_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine AA_SHROUD_copy_string_and_free end interface contains @@ -1355,7 +1355,7 @@ function exclass1_get_name_error_check(obj) & call c_exclass1_get_name_error_check_bufferify(obj%cxxmem, & DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call AA_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end namespace.example::nested.class.ExClass1.method.get_name_error_check end function exclass1_get_name_error_check @@ -1582,7 +1582,7 @@ function exclass2_get_name2(obj) & ! splicer begin namespace.example::nested.class.ExClass2.method.get_name2 call c_exclass2_get_name2_bufferify(obj%cxxmem, DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call AA_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end namespace.example::nested.class.ExClass2.method.get_name2 end function exclass2_get_name2 @@ -1608,7 +1608,7 @@ function exclass2_get_name3(obj) & ! splicer begin namespace.example::nested.class.ExClass2.method.get_name3 call c_exclass2_get_name3_bufferify(obj%cxxmem, DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call AA_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end namespace.example::nested.class.ExClass2.method.get_name3 end function exclass2_get_name3 @@ -1634,7 +1634,7 @@ function exclass2_get_name4(obj) & ! splicer begin namespace.example::nested.class.ExClass2.method.get_name4 call c_exclass2_get_name4_bufferify(obj%cxxmem, DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call AA_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end namespace.example::nested.class.ExClass2.method.get_name4 end function exclass2_get_name4 diff --git a/regression/reference/memdoc/memdoc.json b/regression/reference/memdoc/memdoc.json index 79b88037d..892a7600a 100644 --- a/regression/reference/memdoc/memdoc.json +++ b/regression/reference/memdoc/memdoc.json @@ -107,6 +107,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/memdoc/wrapfmemdoc.f b/regression/reference/memdoc/wrapfmemdoc.f index 4900e09e2..8c032dd6b 100644 --- a/regression/reference/memdoc/wrapfmemdoc.f +++ b/regression/reference/memdoc/wrapfmemdoc.f @@ -89,14 +89,14 @@ end subroutine c_get_const_string_ptr_alloc_bufferify interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine STR_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="STR_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine STR_SHROUD_copy_string_and_free end interface contains @@ -123,7 +123,7 @@ function get_const_string_ptr_alloc() & ! splicer begin function.get_const_string_ptr_alloc call c_get_const_string_ptr_alloc_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_ptr_alloc end function get_const_string_ptr_alloc ! end get_const_string_ptr_alloc diff --git a/regression/reference/namespace/namespace.json b/regression/reference/namespace/namespace.json index f4bf069aa..6d5d4b3d8 100644 --- a/regression/reference/namespace/namespace.json +++ b/regression/reference/namespace/namespace.json @@ -128,6 +128,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "NS_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/namespace/wrapfns.f b/regression/reference/namespace/wrapfns.f index 170fcbad2..0c9dd05ed 100644 --- a/regression/reference/namespace/wrapfns.f +++ b/regression/reference/namespace/wrapfns.f @@ -121,14 +121,14 @@ end subroutine one interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine NS_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="NS_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine NS_SHROUD_copy_string_and_free end interface contains @@ -154,7 +154,7 @@ function last_function_called() & ! splicer begin function.last_function_called call c_last_function_called_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call NS_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.last_function_called end function last_function_called diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index 5d5ddf678..3c17d6ffb 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -414,13 +414,13 @@ end subroutine SHROUD_copy_array_unsigned_short interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="LIB_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine LIB_SHROUD_copy_string_and_free end interface ##### end copy_string interface diff --git a/regression/reference/ownership/ownership.json b/regression/reference/ownership/ownership.json index 15a0bd724..e44d99da8 100644 --- a/regression/reference/ownership/ownership.json +++ b/regression/reference/ownership/ownership.json @@ -582,6 +582,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer", @@ -796,6 +797,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "ReturnIntPtrDimPointer", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_dim_pointer" }, "options": { @@ -872,6 +874,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_allocatable", @@ -1086,6 +1089,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "ReturnIntPtrDimAlloc", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_dim_alloc" }, "options": { @@ -1162,6 +1166,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer", @@ -1376,6 +1381,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "ReturnIntPtrDimDefault", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_dim_default" }, "options": { @@ -1559,6 +1565,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "capsule_helper", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer_caller", @@ -1778,6 +1785,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "ReturnIntPtrDimPointerNew", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_dim_pointer_new" }, "options": { @@ -2002,6 +2010,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "capsule_helper", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer_caller", @@ -2221,6 +2230,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "ReturnIntPtrDimDefaultNew", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_dim_default_new" }, "options": { diff --git a/regression/reference/pointers-c/pointers.json b/regression/reference/pointers-c/pointers.json index a84c4ade2..0129c3e1b 100644 --- a/regression/reference/pointers-c/pointers.json +++ b/regression/reference/pointers-c/pointers.json @@ -2633,6 +2633,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "nitems", + "hnamefunc0": "array_context", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", "stmt1": "f_native_**_out", @@ -2822,6 +2823,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3059,6 +3061,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3310,6 +3313,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3496,6 +3500,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "nitems", + "hnamefunc0": "array_context", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", "stmt1": "f_native_**_out", @@ -3684,6 +3689,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3917,6 +3923,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -5485,6 +5492,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer", @@ -5600,6 +5608,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "returnIntPtrToFixedArray", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_to_fixed_array" }, "options": { @@ -5703,6 +5712,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer", @@ -5820,6 +5830,7 @@ "cxx_rv_decl": "const int * SHC_rv", "function_name": "returnIntPtrToFixedConstArray", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_to_fixed_const_array" }, "options": { diff --git a/regression/reference/pointers-cxx/pointers.json b/regression/reference/pointers-cxx/pointers.json index 6b85bcca3..c4709e794 100644 --- a/regression/reference/pointers-cxx/pointers.json +++ b/regression/reference/pointers-cxx/pointers.json @@ -2633,6 +2633,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "nitems", + "hnamefunc0": "array_context", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", "stmt1": "f_native_**_out", @@ -2822,6 +2823,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3059,6 +3061,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3310,6 +3313,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3496,6 +3500,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "nitems", + "hnamefunc0": "array_context", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", "stmt1": "f_native_**_out", @@ -3684,6 +3689,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -3917,6 +3923,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "count", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_**_out_pointer", @@ -5485,6 +5492,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer", @@ -5600,6 +5608,7 @@ "cxx_rv_decl": "int * SHC_rv", "function_name": "returnIntPtrToFixedArray", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_to_fixed_array" }, "options": { @@ -5703,6 +5712,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "array_context", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_pointer", @@ -5820,6 +5830,7 @@ "cxx_rv_decl": "const int * SHC_rv", "function_name": "returnIntPtrToFixedConstArray", "function_suffix": "_bufferify", + "hnamefunc0": "array_context", "underscore_name": "return_int_ptr_to_fixed_const_array" }, "options": { diff --git a/regression/reference/strings/strings.json b/regression/reference/strings/strings.json index c46a456c7..3f838e83c 100644 --- a/regression/reference/strings/strings.json +++ b/regression/reference/strings/strings.json @@ -1008,6 +1008,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_char_*_result_allocatable", "stmt1": "f_char_*_result_allocatable", @@ -1705,6 +1706,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -2275,6 +2277,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -2471,6 +2474,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -3325,6 +3329,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -3735,6 +3740,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -3931,6 +3937,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", @@ -4131,6 +4138,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/strings/wrapfstrings.f b/regression/reference/strings/wrapfstrings.f index a5a645db0..24a44855e 100644 --- a/regression/reference/strings/wrapfstrings.f +++ b/regression/reference/strings/wrapfstrings.f @@ -1171,14 +1171,14 @@ end subroutine c_post_declare_bufferify interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine STR_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="STR_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine STR_SHROUD_copy_string_and_free end interface contains @@ -1316,7 +1316,7 @@ function get_char_ptr1() & ! splicer begin function.get_char_ptr1 call c_get_char_ptr1_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_char_ptr1 end function get_char_ptr1 ! end get_char_ptr1 @@ -1401,7 +1401,7 @@ function get_const_string_result() & ! splicer begin function.get_const_string_result call c_get_const_string_result_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_result end function get_const_string_result @@ -1481,7 +1481,7 @@ function get_const_string_alloc() & ! splicer begin function.get_const_string_alloc call c_get_const_string_alloc_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_alloc end function get_const_string_alloc @@ -1511,7 +1511,7 @@ function get_const_string_ref_pure() & ! splicer begin function.get_const_string_ref_pure call c_get_const_string_ref_pure_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_ref_pure end function get_const_string_ref_pure ! end get_const_string_ref_pure @@ -1625,7 +1625,7 @@ function get_const_string_ref_alloc() & ! splicer begin function.get_const_string_ref_alloc call c_get_const_string_ref_alloc_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_ref_alloc end function get_const_string_ref_alloc @@ -1682,7 +1682,7 @@ function get_const_string_ptr_alloc() & ! splicer begin function.get_const_string_ptr_alloc call c_get_const_string_ptr_alloc_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_ptr_alloc end function get_const_string_ptr_alloc @@ -1714,7 +1714,7 @@ function get_const_string_ptr_owns_alloc() & ! splicer begin function.get_const_string_ptr_owns_alloc call c_get_const_string_ptr_owns_alloc_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_ptr_owns_alloc end function get_const_string_ptr_owns_alloc @@ -1742,7 +1742,7 @@ function get_const_string_ptr_owns_alloc_pattern() & ! splicer begin function.get_const_string_ptr_owns_alloc_pattern call c_get_const_string_ptr_owns_alloc_pattern_bufferify(DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call STR_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.get_const_string_ptr_owns_alloc_pattern end function get_const_string_ptr_owns_alloc_pattern diff --git a/regression/reference/tutorial/tutorial.json b/regression/reference/tutorial/tutorial.json index 5cbe40e0e..6c1eef4d1 100644 --- a/regression/reference/tutorial/tutorial.json +++ b/regression/reference/tutorial/tutorial.json @@ -553,6 +553,7 @@ "f_intent": "OUT", "f_type": "character(*)", "f_var": "SHT_rv", + "hnamefunc0": "TUT_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", "stmt1": "f_string_result_allocatable", diff --git a/regression/reference/tutorial/wrapftutorial.f b/regression/reference/tutorial/wrapftutorial.f index 758993b52..24a123eeb 100644 --- a/regression/reference/tutorial/wrapftutorial.f +++ b/regression/reference/tutorial/wrapftutorial.f @@ -710,14 +710,14 @@ end subroutine all_test1 interface ! helper copy_string ! Copy the char* or std::string in context into c_var. - subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & + subroutine TUT_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="TUT_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_string_and_free + end subroutine TUT_SHROUD_copy_string_and_free end interface contains @@ -766,7 +766,7 @@ function concatenate_strings(arg1, arg2) & len_trim(arg1, kind=C_INT), arg2, & len_trim(arg2, kind=C_INT), DSHF_rv) allocate(character(len=DSHF_rv%elem_len):: SHT_rv) - call SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) + call TUT_SHROUD_copy_string_and_free(DSHF_rv, SHT_rv, DSHF_rv%elem_len) ! splicer end function.concatenate_strings end function concatenate_strings diff --git a/regression/reference/vectors/vectors.json b/regression/reference/vectors/vectors.json index f2673dcfc..f447ac35e 100644 --- a/regression/reference/vectors/vectors.json +++ b/regression/reference/vectors/vectors.json @@ -300,6 +300,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -497,6 +498,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -711,6 +713,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -901,6 +904,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -1077,6 +1081,7 @@ "f_intent": "INOUT", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -1249,6 +1254,7 @@ "f_intent": "INOUT", "f_type": "integer(C_INT)", "f_var": "arg", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -1416,6 +1422,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "arg", + "hnamefunc0": "copy_array_double", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "size": "size(arg)", @@ -1909,6 +1916,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "SHT_rv", + "hnamefunc0": "copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(SHT_rv)", diff --git a/shroud/typemap.py b/shroud/typemap.py index 13e7724ff..32ffd3236 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -1887,8 +1887,7 @@ def __init__(self, ], post_call=[ "allocate(character(len={c_var_context}%elem_len):: {f_var})", - "call SHROUD_copy_string_and_free" - "({c_var_context}, {f_var}, {c_var_context}%elem_len)", + "call {hnamefunc0}({c_var_context}, {f_var}, {c_var_context}%elem_len)", ], ), dict( @@ -2052,8 +2051,7 @@ def __init__(self, ], post_call=[ "allocate(character(len={c_var_context}%elem_len):: {f_var})", - "call SHROUD_copy_string_and_free(" - "{c_var_context}, {f_var}, {c_var_context}%elem_len)", + "call {hnamefunc0}({c_var_context}, {f_var}, {c_var_context}%elem_len)", ], ), diff --git a/shroud/whelpers.py b/shroud/whelpers.py index f36a316bb..9c9fd0c18 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -60,6 +60,20 @@ """ +# Note about PRIVATE Fortran helpers +# If a single subroutine uses multiple modules created by Shroud +# some compilers will rightly complain that they each define this function. +# "Procedure shroud_copy_string_and_free has more than one interface accessible +# by use association. The interfaces are assumed to be the same." +# It should be marked PRIVATE to prevent users from calling it directly. +# However, gfortran does not like that. +# "Symbol 'shroud_copy_string_and_free' at (1) is marked PRIVATE but has been given +# the binding label 'ShroudCopyStringAndFree'" +# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49111 +# Instead, mangle the name with C_prefix. +# See FHelpers copy_string + + from . import typemap from . import util @@ -195,21 +209,23 @@ def add_external_helpers(): # Fortran interface for above function. # Deal with allocatable character + fmt.hnamefunc = wformat("{C_prefix}SHROUD_copy_string_and_free", fmt) FHelpers[name] = dict( dependent_helpers=["array_context"], + name=fmt.hnamefunc, interface=wformat( """ interface+ ! helper {hname} ! Copy the char* or std::string in context into c_var. -subroutine SHROUD_copy_string_and_free(context, c_var, c_var_size) & +subroutine {hnamefunc}(context, c_var, c_var_size) & bind(c,name="{C_prefix}ShroudCopyStringAndFree")+ use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T import {F_array_type} type({F_array_type}), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size --end subroutine SHROUD_copy_string_and_free +-end subroutine {hnamefunc} -end interface""", fmt, ), diff --git a/shroud/wrapf.py b/shroud/wrapf.py index eca0c2915..caf73cd62 100644 --- a/shroud/wrapf.py +++ b/shroud/wrapf.py @@ -1349,6 +1349,11 @@ def add_code_from_statements( """ self.update_f_module(modules, imports, intent_blk.f_module) + if intent_blk.c_helper: + fileinfo.add_c_helper(intent_blk.c_helper, fmt) + if intent_blk.f_helper: + fileinfo.add_f_helper(intent_blk.f_helper, fmt) + if declare is not None and intent_blk.declare: need_wrapper = True for line in intent_blk.declare: @@ -1364,10 +1369,6 @@ def add_code_from_statements( for line in intent_blk.post_call: append_format(post_call, line, fmt) - if intent_blk.c_helper: - fileinfo.add_c_helper(intent_blk.c_helper, fmt) - if intent_blk.f_helper: - fileinfo.add_f_helper(intent_blk.f_helper, fmt) return need_wrapper def set_fmt_fields(self, cls, fcn, f_ast, c_ast, fmt, modules, fileinfo, @@ -2322,8 +2323,13 @@ def add_c_helper(self, helpers, fmt): self.c_helper[helper] = True def add_f_helper(self, helpers, fmt): - """Add a list of Fortran helpers.""" + """Add a list of Fortran helpers. + Add fmt.hnamefuncX for use by pre_call and post_call. + """ f_helper = wformat(helpers, fmt) - for helper in f_helper.split(): + for i, helper in enumerate(f_helper.split()): self.f_helper[helper] = True + setattr(fmt, "hnamefunc" + str(i), + whelpers.FHelpers[helper].get("name", helper)) + From 5582db443bacc2cfaf24b1ca60d5d4b7e6876877 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Tue, 30 Jun 2020 21:59:16 -0700 Subject: [PATCH 02/36] Mangle name of Fortran helper copy_array If multiple Shroud wrapped modules are used in a file, they will each contain an interface for the Fortran helper. Ideally the interface would be PRIVATE. However, gfortran does not allow PRIVATE and BIND(C) to be mixed since it sees them as contradictory. Instead, mangle the helper name with C_prefix to make them unique. --- regression/reference/none/helpers.f | 76 +++++++++---------- regression/reference/ownership/ownership.json | 2 +- .../reference/ownership/wrapfownership.f | 6 +- regression/reference/vectors/vectors.json | 16 ++-- regression/reference/vectors/wrapfvectors.f | 32 +++++--- shroud/typemap.py | 21 ++--- shroud/whelpers.py | 13 ++-- 7 files changed, 85 insertions(+), 81 deletions(-) diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index 3c17d6ffb..29e0f14e6 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -110,14 +110,14 @@ end subroutine SHROUD_capsule_delete interface ! helper copy_array_double ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_double(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_double(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_DOUBLE, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context real(C_DOUBLE), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_double + end subroutine LIB_SHROUD_copy_array_double end interface ##### end copy_array_double interface @@ -126,14 +126,14 @@ end subroutine SHROUD_copy_array_double interface ! helper copy_array_float ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_float(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_float(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_FLOAT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context real(C_FLOAT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_float + end subroutine LIB_SHROUD_copy_array_float end interface ##### end copy_array_float interface @@ -142,14 +142,14 @@ end subroutine SHROUD_copy_array_float interface ! helper copy_array_int ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_int(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int + end subroutine LIB_SHROUD_copy_array_int end interface ##### end copy_array_int interface @@ -158,14 +158,14 @@ end subroutine SHROUD_copy_array_int interface ! helper copy_array_int16_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int16_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_int16_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT16_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT16_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int16_t + end subroutine LIB_SHROUD_copy_array_int16_t end interface ##### end copy_array_int16_t interface @@ -174,14 +174,14 @@ end subroutine SHROUD_copy_array_int16_t interface ! helper copy_array_int32_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int32_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_int32_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT32_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT32_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int32_t + end subroutine LIB_SHROUD_copy_array_int32_t end interface ##### end copy_array_int32_t interface @@ -190,14 +190,14 @@ end subroutine SHROUD_copy_array_int32_t interface ! helper copy_array_int64_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int64_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_int64_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT64_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT64_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int64_t + end subroutine LIB_SHROUD_copy_array_int64_t end interface ##### end copy_array_int64_t interface @@ -206,14 +206,14 @@ end subroutine SHROUD_copy_array_int64_t interface ! helper copy_array_int8_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int8_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_int8_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT8_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT8_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int8_t + end subroutine LIB_SHROUD_copy_array_int8_t end interface ##### end copy_array_int8_t interface @@ -222,14 +222,14 @@ end subroutine SHROUD_copy_array_int8_t interface ! helper copy_array_long ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_long(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_long + end subroutine LIB_SHROUD_copy_array_long end interface ##### end copy_array_long interface @@ -238,14 +238,14 @@ end subroutine SHROUD_copy_array_long interface ! helper copy_array_long_long ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_long_long(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_long_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG_LONG, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_LONG_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_long_long + end subroutine LIB_SHROUD_copy_array_long_long end interface ##### end copy_array_long_long interface @@ -254,14 +254,14 @@ end subroutine SHROUD_copy_array_long_long interface ! helper copy_array_short ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_short(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_short(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_SHORT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_SHORT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_short + end subroutine LIB_SHROUD_copy_array_short end interface ##### end copy_array_short interface @@ -270,14 +270,14 @@ end subroutine SHROUD_copy_array_short interface ! helper copy_array_size_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_size_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_size_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_SIZE_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_SIZE_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_size_t + end subroutine LIB_SHROUD_copy_array_size_t end interface ##### end copy_array_size_t interface @@ -286,14 +286,14 @@ end subroutine SHROUD_copy_array_size_t interface ! helper copy_array_uint16_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_uint16_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_uint16_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT16_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT16_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_uint16_t + end subroutine LIB_SHROUD_copy_array_uint16_t end interface ##### end copy_array_uint16_t interface @@ -302,14 +302,14 @@ end subroutine SHROUD_copy_array_uint16_t interface ! helper copy_array_uint32_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_uint32_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_uint32_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT32_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT32_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_uint32_t + end subroutine LIB_SHROUD_copy_array_uint32_t end interface ##### end copy_array_uint32_t interface @@ -318,14 +318,14 @@ end subroutine SHROUD_copy_array_uint32_t interface ! helper copy_array_uint64_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_uint64_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_uint64_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT64_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT64_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_uint64_t + end subroutine LIB_SHROUD_copy_array_uint64_t end interface ##### end copy_array_uint64_t interface @@ -334,14 +334,14 @@ end subroutine SHROUD_copy_array_uint64_t interface ! helper copy_array_uint8_t ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_uint8_t(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_uint8_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT8_T, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT8_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_uint8_t + end subroutine LIB_SHROUD_copy_array_uint8_t end interface ##### end copy_array_uint8_t interface @@ -350,14 +350,14 @@ end subroutine SHROUD_copy_array_uint8_t interface ! helper copy_array_unsigned_int ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_unsigned_int(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_unsigned_int(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_unsigned_int + end subroutine LIB_SHROUD_copy_array_unsigned_int end interface ##### end copy_array_unsigned_int interface @@ -366,14 +366,14 @@ end subroutine SHROUD_copy_array_unsigned_int interface ! helper copy_array_unsigned_long ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_unsigned_long(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_unsigned_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_unsigned_long + end subroutine LIB_SHROUD_copy_array_unsigned_long end interface ##### end copy_array_unsigned_long interface @@ -382,14 +382,14 @@ end subroutine SHROUD_copy_array_unsigned_long interface ! helper copy_array_unsigned_long_long ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_unsigned_long_long(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_unsigned_long_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG_LONG, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_LONG_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_unsigned_long_long + end subroutine LIB_SHROUD_copy_array_unsigned_long_long end interface ##### end copy_array_unsigned_long_long interface @@ -398,14 +398,14 @@ end subroutine SHROUD_copy_array_unsigned_long_long interface ! helper copy_array_unsigned_short ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_unsigned_short(context, c_var, c_var_size) & + subroutine LIB_SHROUD_copy_array_unsigned_short(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_SHORT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_SHORT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_unsigned_short + end subroutine LIB_SHROUD_copy_array_unsigned_short end interface ##### end copy_array_unsigned_short interface diff --git a/regression/reference/ownership/ownership.json b/regression/reference/ownership/ownership.json index e44d99da8..eda7a222c 100644 --- a/regression/reference/ownership/ownership.json +++ b/regression/reference/ownership/ownership.json @@ -874,7 +874,7 @@ "f_assumed_shape": "(:)", "f_type": "integer(C_INT)", "f_var": "SHT_rv", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "OWN_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "stmt0": "f_native_*_result_allocatable", diff --git a/regression/reference/ownership/wrapfownership.f b/regression/reference/ownership/wrapfownership.f index 5a281b602..daf25e2f0 100644 --- a/regression/reference/ownership/wrapfownership.f +++ b/regression/reference/ownership/wrapfownership.f @@ -440,14 +440,14 @@ end subroutine SHROUD_capsule_dtor interface ! helper copy_array_int ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int(context, c_var, c_var_size) & + subroutine OWN_SHROUD_copy_array_int(context, c_var, c_var_size) & bind(C, name="OWN_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int + end subroutine OWN_SHROUD_copy_array_int end interface contains @@ -574,7 +574,7 @@ function return_int_ptr_dim_alloc() & type(C_PTR) :: SHT_ptr SHT_ptr = c_return_int_ptr_dim_alloc_bufferify(DSHC_rv, len) allocate(SHT_rv(len)) - call SHROUD_copy_array_int(DSHC_rv, SHT_rv, size(SHT_rv, kind=C_SIZE_T)) + call OWN_SHROUD_copy_array_int(DSHC_rv, SHT_rv, size(SHT_rv, kind=C_SIZE_T)) ! splicer end function.return_int_ptr_dim_alloc end function return_int_ptr_dim_alloc diff --git a/regression/reference/vectors/vectors.json b/regression/reference/vectors/vectors.json index f447ac35e..4b42ee95b 100644 --- a/regression/reference/vectors/vectors.json +++ b/regression/reference/vectors/vectors.json @@ -300,7 +300,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -498,7 +498,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -713,7 +713,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -904,7 +904,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "arg", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -1081,7 +1081,7 @@ "f_intent": "INOUT", "f_type": "integer(C_INT)", "f_var": "arg", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -1254,7 +1254,7 @@ "f_intent": "INOUT", "f_type": "integer(C_INT)", "f_var": "arg", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(arg)", @@ -1422,7 +1422,7 @@ "f_intent": "OUT", "f_type": "real(C_DOUBLE)", "f_var": "arg", - "hnamefunc0": "copy_array_double", + "hnamefunc0": "VEC_SHROUD_copy_array_double", "rank": "1", "sh_type": "SH_TYPE_DOUBLE", "size": "size(arg)", @@ -1916,7 +1916,7 @@ "f_intent": "OUT", "f_type": "integer(C_INT)", "f_var": "SHT_rv", - "hnamefunc0": "copy_array_int", + "hnamefunc0": "VEC_SHROUD_copy_array_int", "rank": "1", "sh_type": "SH_TYPE_INT", "size": "size(SHT_rv)", diff --git a/regression/reference/vectors/wrapfvectors.f b/regression/reference/vectors/wrapfvectors.f index b000271a2..6d894f447 100644 --- a/regression/reference/vectors/wrapfvectors.f +++ b/regression/reference/vectors/wrapfvectors.f @@ -258,27 +258,27 @@ end subroutine c_return_vector_alloc_bufferify interface ! helper copy_array_double ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_double(context, c_var, c_var_size) & + subroutine VEC_SHROUD_copy_array_double(context, c_var, c_var_size) & bind(C, name="VEC_ShroudCopyArray") use iso_c_binding, only : C_DOUBLE, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context real(C_DOUBLE), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_double + end subroutine VEC_SHROUD_copy_array_double end interface interface ! helper copy_array_int ! Copy contents of context into c_var. - subroutine SHROUD_copy_array_int(context, c_var, c_var_size) & + subroutine VEC_SHROUD_copy_array_int(context, c_var, c_var_size) & bind(C, name="VEC_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T import SHROUD_array type(SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size - end subroutine SHROUD_copy_array_int + end subroutine VEC_SHROUD_copy_array_int end interface contains @@ -336,7 +336,8 @@ subroutine vector_iota_out(arg) type(SHROUD_array) :: Darg ! splicer begin function.vector_iota_out call c_vector_iota_out_bufferify(Darg) - call SHROUD_copy_array_int(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(Darg, arg, & + size(arg,kind=C_SIZE_T)) ! splicer end function.vector_iota_out end subroutine vector_iota_out ! end vector_iota_out @@ -372,7 +373,8 @@ function vector_iota_out_with_num(arg) & ! splicer begin function.vector_iota_out_with_num integer(C_LONG) :: num num = c_vector_iota_out_with_num_bufferify(Darg) - call SHROUD_copy_array_int(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(Darg, arg, & + size(arg,kind=C_SIZE_T)) ! splicer end function.vector_iota_out_with_num end function vector_iota_out_with_num ! end vector_iota_out_with_num @@ -408,7 +410,8 @@ function vector_iota_out_with_num2(arg) & ! splicer begin function.vector_iota_out_with_num2 integer(C_LONG) :: num call c_vector_iota_out_with_num2_bufferify(Darg) - call SHROUD_copy_array_int(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(Darg, arg, & + size(arg,kind=C_SIZE_T)) num = Darg%size ! splicer end function.vector_iota_out_with_num2 end function vector_iota_out_with_num2 @@ -441,7 +444,8 @@ subroutine vector_iota_out_alloc(arg) ! splicer begin function.vector_iota_out_alloc call c_vector_iota_out_alloc_bufferify(Darg) allocate(arg(Darg%size)) - call SHROUD_copy_array_int(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(Darg, arg, & + size(arg,kind=C_SIZE_T)) ! splicer end function.vector_iota_out_alloc end subroutine vector_iota_out_alloc ! end vector_iota_out_alloc @@ -475,7 +479,8 @@ subroutine vector_iota_inout_alloc(arg) size(arg, kind=C_LONG), Darg) if (allocated(arg)) deallocate(arg) allocate(arg(Darg%size)) - call SHROUD_copy_array_int(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(Darg, arg, & + size(arg,kind=C_SIZE_T)) ! splicer end function.vector_iota_inout_alloc end subroutine vector_iota_inout_alloc ! end vector_iota_inout_alloc @@ -502,7 +507,8 @@ subroutine vector_increment(arg) ! splicer begin function.vector_increment call c_vector_increment_bufferify(arg, size(arg, kind=C_LONG), & Darg) - call SHROUD_copy_array_int(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(Darg, arg, & + size(arg,kind=C_SIZE_T)) ! splicer end function.vector_increment end subroutine vector_increment @@ -531,7 +537,8 @@ subroutine vector_iota_out_d(arg) type(SHROUD_array) :: Darg ! splicer begin function.vector_iota_out_d call c_vector_iota_out_d_bufferify(Darg) - call SHROUD_copy_array_double(Darg, arg, size(arg,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_double(Darg, arg, & + size(arg,kind=C_SIZE_T)) ! splicer end function.vector_iota_out_d end subroutine vector_iota_out_d @@ -600,7 +607,8 @@ function return_vector_alloc(n) & ! splicer begin function.return_vector_alloc call c_return_vector_alloc_bufferify(n, DSHF_rv) allocate(SHT_rv(DSHF_rv%size)) - call SHROUD_copy_array_int(DSHF_rv, SHT_rv, size(SHT_rv,kind=C_SIZE_T)) + call VEC_SHROUD_copy_array_int(DSHF_rv, SHT_rv, & + size(SHT_rv,kind=C_SIZE_T)) ! splicer end function.return_vector_alloc end function return_vector_alloc diff --git a/shroud/typemap.py b/shroud/typemap.py index 32ffd3236..7c3719400 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -1659,8 +1659,7 @@ def __init__(self, post_call=[ # XXX - allocate scalar "allocate({f_var}({c_var_dimension}))", - "call SHROUD_copy_array_{cxx_type}" - "({c_var_context}, {f_var}, size({f_var}, kind=C_SIZE_T))", + "call {hnamefunc0}({c_var_context}, {f_var}, size({f_var}, kind=C_SIZE_T))", ], ), @@ -2267,8 +2266,7 @@ def __init__(self, f_helper="copy_array_{cxx_T}", f_module=dict(iso_c_binding=["C_SIZE_T"]), post_call=[ - "call SHROUD_copy_array_{cxx_T}({c_var_context}, " - "{f_var}, size({f_var},kind=C_SIZE_T))" + "call {hnamefunc0}(\t{c_var_context},\t {f_var},\t size({f_var},kind=C_SIZE_T))", ], ), dict( @@ -2277,8 +2275,7 @@ def __init__(self, f_helper="copy_array_{cxx_T}", f_module=dict(iso_c_binding=["C_SIZE_T"]), post_call=[ - "call SHROUD_copy_array_{cxx_T}({c_var_context}, " - "{f_var}, size({f_var},kind=C_SIZE_T))" + "call {hnamefunc0}(\t{c_var_context},\t {f_var},\t size({f_var},kind=C_SIZE_T))", ], ), dict( @@ -2287,8 +2284,7 @@ def __init__(self, f_helper="copy_array_{cxx_T}", f_module=dict(iso_c_binding=["C_SIZE_T"]), post_call=[ - "call SHROUD_copy_array_{cxx_T}({c_var_context}, " - "{f_var}, size({f_var},kind=C_SIZE_T))" + "call {hnamefunc0}(\t{c_var_context},\t {f_var},\t size({f_var},kind=C_SIZE_T))" ], ), # copy into allocated array @@ -2299,8 +2295,7 @@ def __init__(self, f_module=dict(iso_c_binding=["C_SIZE_T"]), post_call=[ "allocate({f_var}({c_var_context}%size))", - "call SHROUD_copy_array_{cxx_T}({c_var_context}, " - "{f_var}, size({f_var},kind=C_SIZE_T))", + "call {hnamefunc0}(\t{c_var_context},\t {f_var},\t size({f_var},kind=C_SIZE_T))", ], ), dict( @@ -2311,8 +2306,7 @@ def __init__(self, post_call=[ "if (allocated({f_var})) deallocate({f_var})", "allocate({f_var}({c_var_context}%size))", - "call SHROUD_copy_array_{cxx_T}({c_var_context}, " - "{f_var}, size({f_var},kind=C_SIZE_T))", + "call {hnamefunc0}(\t{c_var_context},\t {f_var},\t size({f_var},kind=C_SIZE_T))", ], ), # Similar to f_vector_out_allocatable but must declare result variable. @@ -2324,8 +2318,7 @@ def __init__(self, f_module=dict(iso_c_binding=["C_SIZE_T"]), post_call=[ "allocate({f_var}({c_var_context}%size))", - "call SHROUD_copy_array_{cxx_T}({c_var_context}, " - "{f_var}, size({f_var},kind=C_SIZE_T))", + "call {hnamefunc0}(\t{c_var_context},\t {f_var},\t size({f_var},kind=C_SIZE_T))", ], ), diff --git a/shroud/whelpers.py b/shroud/whelpers.py index 9c9fd0c18..999fa130a 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -129,18 +129,20 @@ def add_external_helpers(): ######################################## name = "capsule_dtor" fmt.hname = name + fmt.hnamefunc = wformat("SHROUD_capsule_dtor", fmt) FHelpers[name] = dict( dependent_helpers=["capsule_data_helper"], + name=fmt.hnamefunc, interface=wformat( """ interface+ ! helper {hname} ! Delete memory in a capsule. -subroutine SHROUD_capsule_dtor(ptr)\tbind(C, name="{C_memory_dtor_function}")+ +subroutine {hnamefunc}(ptr)\tbind(C, name="{C_memory_dtor_function}")+ import {F_capsule_data_type} implicit none type({F_capsule_data_type}), intent(INOUT) :: ptr --end subroutine SHROUD_capsule_dtor +-end subroutine {hnamefunc} -end interface""", fmt, ), @@ -672,23 +674,24 @@ def add_copy_array_helper(fmt, ntypemap): name = wformat("copy_array_{flat_name}", fmt) fmt.hname = name - fmt.hnamefunc = name + fmt.hnamefunc = wformat("{C_prefix}SHROUD_{hname}", fmt) helper = dict( # XXX when f_kind == C_SIZE_T dependent_helpers=["array_context"], + name=fmt.hnamefunc, interface=wformat( """ interface+ ! helper {hname} ! Copy contents of context into c_var. -subroutine SHROUD_{hnamefunc}(context, c_var, c_var_size) &+ +subroutine {hnamefunc}(context, c_var, c_var_size) &+ bind(C, name="{C_prefix}ShroudCopyArray") use iso_c_binding, only : {f_kind}, C_SIZE_T import {F_array_type} type({F_array_type}), intent(IN) :: context {f_type}, intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size --end subroutine SHROUD_{hnamefunc} +-end subroutine {hnamefunc} -end interface""", fmt, ), From d904a9420f60047e978e031435cbdd33743b9c62 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Tue, 30 Jun 2020 22:13:14 -0700 Subject: [PATCH 03/36] Mangle name of Fortran helper capsule_dtor If multiple Shroud wrapped modules are used in a file, they will each contain an interface for the Fortran helper. Ideally the interface would be PRIVATE. However, gfortran does not allow PRIVATE and BIND(C) to be mixed since it sees them as contradictory. Instead, mangle the helper name with C_prefix to make them unique. --- regression/reference/none/helpers.f | 8 ++++---- regression/reference/ownership/wrapfownership.f | 8 ++++---- shroud/whelpers.py | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index 29e0f14e6..ab92439e8 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -69,12 +69,12 @@ interface ! helper capsule_dtor ! Delete memory in a capsule. - subroutine SHROUD_capsule_dtor(ptr)& + subroutine LIB_SHROUD_capsule_dtor(ptr)& bind(C, name="LIB_SHROUD_memory_destructor") import SHROUD_capsule_data implicit none type(SHROUD_capsule_data), intent(INOUT) :: ptr - end subroutine SHROUD_capsule_dtor + end subroutine LIB_SHROUD_capsule_dtor end interface ##### end capsule_dtor interface @@ -96,12 +96,12 @@ end subroutine SHROUD_capsule_dtor ! finalize a static SHROUD_capsule_data subroutine SHROUD_capsule_final(cap) type(SHROUD_capsule), intent(INOUT) :: cap - call SHROUD_capsule_dtor(cap%mem) + call LIB_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_final subroutine SHROUD_capsule_delete(cap) class(SHROUD_capsule) :: cap - call SHROUD_capsule_dtor(cap%mem) + call LIB_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_delete ##### end capsule_helper source diff --git a/regression/reference/ownership/wrapfownership.f b/regression/reference/ownership/wrapfownership.f index daf25e2f0..8b6e00d92 100644 --- a/regression/reference/ownership/wrapfownership.f +++ b/regression/reference/ownership/wrapfownership.f @@ -429,12 +429,12 @@ end function c_get_class_new interface ! helper capsule_dtor ! Delete memory in a capsule. - subroutine SHROUD_capsule_dtor(ptr) & + subroutine OWN_SHROUD_capsule_dtor(ptr) & bind(C, name="OWN_SHROUD_memory_destructor") import SHROUD_capsule_data implicit none type(SHROUD_capsule_data), intent(INOUT) :: ptr - end subroutine SHROUD_capsule_dtor + end subroutine OWN_SHROUD_capsule_dtor end interface interface @@ -736,12 +736,12 @@ end function class1_ne ! finalize a static SHROUD_capsule_data subroutine SHROUD_capsule_final(cap) type(SHROUD_capsule), intent(INOUT) :: cap - call SHROUD_capsule_dtor(cap%mem) + call OWN_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_final subroutine SHROUD_capsule_delete(cap) class(SHROUD_capsule) :: cap - call SHROUD_capsule_dtor(cap%mem) + call OWN_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_delete end module ownership_mod diff --git a/shroud/whelpers.py b/shroud/whelpers.py index 999fa130a..1b1021522 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -129,7 +129,7 @@ def add_external_helpers(): ######################################## name = "capsule_dtor" fmt.hname = name - fmt.hnamefunc = wformat("SHROUD_capsule_dtor", fmt) + fmt.hnamefunc = wformat("{C_prefix}SHROUD_capsule_dtor", fmt) FHelpers[name] = dict( dependent_helpers=["capsule_data_helper"], name=fmt.hnamefunc, @@ -553,6 +553,7 @@ def add_capsule_helper(): ######################################## name = "capsule_helper" fmt.hname = name + fmt.__helper = FHelpers["capsule_dtor"]["name"] # XXX split helper into to parts, one for each derived type helper = dict( dependent_helpers=["capsule_data_helper", "capsule_dtor"], @@ -575,12 +576,12 @@ def add_capsule_helper(): ! finalize a static {F_capsule_data_type} subroutine {F_capsule_final_function}(cap)+ type({F_capsule_type}), intent(INOUT) :: cap -call SHROUD_capsule_dtor(cap%mem) +call {__helper}(cap%mem) -end subroutine {F_capsule_final_function} subroutine {F_capsule_delete_function}(cap)+ class({F_capsule_type}) :: cap -call SHROUD_capsule_dtor(cap%mem) +call {__helper}(cap%mem) -end subroutine {F_capsule_delete_function}""", fmt, ), From 0e4980138c5f5388eb0f63a7199e42291afbbeae Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Wed, 1 Jul 2020 15:19:25 -0700 Subject: [PATCH 04/36] Add C_prefix to derived type names If multiple Shroud wrapped modules are used in a file, they will conflict. Ideally some of the types would be PRIVATE. However, gfortran does not allow PRIVATE and BIND(C) to be mixed since it sees them as contradictory. Error: Derived type 'shroud_capsule_data' at (1) cannot be declared with both PRIVATE and BIND(C) attributes Instead, mangle the type name with C_prefix to make them unique. --- .../reference/arrayclass/arrayclass.json | 2 +- .../arrayclass/arrayclass_types.yaml | 2 +- .../reference/arrayclass/wrapfarrayclass.f | 142 +++++++------- regression/reference/cdesc/wrapfcdesc.f | 22 +-- regression/reference/classes/classes.json | 6 +- .../reference/classes/classes_types.yaml | 6 +- regression/reference/classes/wrapfclasses.f | 146 +++++++------- regression/reference/clibrary/clibrary.json | 2 +- .../reference/cxxlibrary/cxxlibrary.json | 4 +- .../reference/debugfalse/wrapftutorial.f | 14 +- regression/reference/example/example.json | 4 +- .../reference/example/userlibrary_types.yaml | 4 +- .../example/wrapfUserLibrary_example_nested.f | 184 +++++++++--------- regression/reference/forward/forward.json | 4 +- .../reference/forward/forward_types.yaml | 4 +- regression/reference/forward/wrapfforward.f | 30 +-- regression/reference/include/include.json | 8 +- .../reference/include/library_types.yaml | 8 +- regression/reference/include/wrapflibrary.f | 16 +- .../reference/include/wrapflibrary_outer1.f | 10 +- .../reference/include/wrapflibrary_outer2.f | 10 +- .../reference/include/wrapflibrary_three.f | 10 +- regression/reference/memdoc/wrapfmemdoc.f | 14 +- regression/reference/names/foo.f | 18 +- regression/reference/names/names.json | 20 +- .../reference/names/testnames_types.yaml | 20 +- regression/reference/names/top.f | 18 +- .../reference/names/wrapftestnames_CAPI.F | 10 +- .../reference/names/wrapftestnames_std.F | 24 +-- regression/reference/namespace/namespace.json | 4 +- regression/reference/namespace/ns_types.yaml | 2 +- regression/reference/namespace/wrapfns.f | 20 +- regression/reference/none/helpers.f | 92 ++++----- regression/reference/none/none.json | 8 +- regression/reference/ownership/ownership.json | 2 +- .../reference/ownership/ownership_types.yaml | 2 +- .../reference/ownership/wrapfownership.f | 72 +++---- .../reference/pointers-c/wrapfpointers.f | 82 ++++---- .../reference/pointers-cxx/wrapfpointers.f | 82 ++++---- .../reference/preprocess/preprocess.json | 4 +- .../preprocess/preprocess_types.yaml | 4 +- .../reference/preprocess/wrapfpreprocess.f | 36 ++-- regression/reference/scope/scope.json | 4 +- regression/reference/scope/scope_types.yaml | 4 +- regression/reference/scope/wrapfscope.f | 12 +- regression/reference/strings/wrapfstrings.f | 56 +++--- regression/reference/struct-c/struct.json | 10 +- .../reference/struct-class-c/struct.json | 10 +- .../reference/struct-class-cxx/struct.json | 10 +- regression/reference/struct-cxx/struct.json | 10 +- .../reference/struct-list-cxx/struct.json | 10 +- .../reference/struct-numpy-c/struct.json | 10 +- .../reference/struct-numpy-cxx/struct.json | 10 +- .../reference/struct-py-c/struct-py.json | 4 +- .../reference/struct-py-cxx/struct-py.json | 4 +- .../reference/structlist/structlist.json | 2 +- regression/reference/templates/templates.json | 12 +- .../reference/templates/templates_types.yaml | 12 +- .../reference/templates/wrapftemplates.f | 16 +- .../reference/templates/wrapftemplates_std.f | 44 ++--- regression/reference/tutorial/wrapftutorial.f | 14 +- regression/reference/vectors/wrapfvectors.f | 60 +++--- regression/run/ownership/main.f | 2 +- shroud/ast.py | 9 +- shroud/whelpers.py | 4 +- 65 files changed, 754 insertions(+), 747 deletions(-) diff --git a/regression/reference/arrayclass/arrayclass.json b/regression/reference/arrayclass/arrayclass.json index 0709edeaa..abcd70e68 100644 --- a/regression/reference/arrayclass/arrayclass.json +++ b/regression/reference/arrayclass/arrayclass.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapArrayWrapper.cpp", "C_name_scope": "ArrayWrapper_", "C_type_name": "ARR_ArrayWrapper", - "F_capsule_data_type": "SHROUD_arraywrapper_capsule", + "F_capsule_data_type": "ARR_SHROUD_arraywrapper_capsule", "F_derived_name": "arraywrapper", "F_name_scope": "arraywrapper_", "PY_PyObject": "PY_ArrayWrapper", diff --git a/regression/reference/arrayclass/arrayclass_types.yaml b/regression/reference/arrayclass/arrayclass_types.yaml index b0a844a7b..f091e8a44 100644 --- a/regression/reference/arrayclass/arrayclass_types.yaml +++ b/regression/reference/arrayclass/arrayclass_types.yaml @@ -16,5 +16,5 @@ typemap: c_type: ARR_ArrayWrapper f_module_name: arrayclass_mod f_derived_type: arraywrapper - f_capsule_data_type: SHROUD_arraywrapper_capsule + f_capsule_data_type: ARR_SHROUD_arraywrapper_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/arrayclass/wrapfarrayclass.f b/regression/reference/arrayclass/wrapfarrayclass.f index 93a57d019..724037504 100644 --- a/regression/reference/arrayclass/wrapfarrayclass.f +++ b/regression/reference/arrayclass/wrapfarrayclass.f @@ -28,7 +28,7 @@ module arrayclass_mod end type SHROUD_capsule_data ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: ARR_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -42,15 +42,15 @@ module arrayclass_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type ARR_SHROUD_array - type, bind(C) :: SHROUD_arraywrapper_capsule + type, bind(C) :: ARR_SHROUD_arraywrapper_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_arraywrapper_capsule + end type ARR_SHROUD_arraywrapper_capsule type arraywrapper - type(SHROUD_arraywrapper_capsule) :: cxxmem + type(ARR_SHROUD_arraywrapper_capsule) :: cxxmem ! splicer begin class.ArrayWrapper.component_part ! splicer end class.ArrayWrapper.component_part contains @@ -94,9 +94,9 @@ function c_arraywrapper_ctor(SHT_crv) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_ctor") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(OUT) :: SHT_crv + type(ARR_SHROUD_arraywrapper_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_arraywrapper_ctor @@ -111,9 +111,9 @@ end function c_arraywrapper_ctor subroutine c_arraywrapper_set_size(self, size) & bind(C, name="ARR_ArrayWrapper_set_size") use iso_c_binding, only : C_INT - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: size end subroutine c_arraywrapper_set_size @@ -125,9 +125,9 @@ pure function c_arraywrapper_get_size(self) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_size") use iso_c_binding, only : C_INT - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_arraywrapper_get_size @@ -142,9 +142,9 @@ end function c_arraywrapper_get_size subroutine c_arraywrapper_fill_size(self, size) & bind(C, name="ARR_ArrayWrapper_fill_size") use iso_c_binding, only : C_INT - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self integer(C_INT), intent(OUT) :: size end subroutine c_arraywrapper_fill_size @@ -154,9 +154,9 @@ end subroutine c_arraywrapper_fill_size ! Match: c_default subroutine c_arraywrapper_allocate(self) & bind(C, name="ARR_ArrayWrapper_allocate") - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self end subroutine c_arraywrapper_allocate ! ---------------------------------------- @@ -167,9 +167,9 @@ function c_arraywrapper_get_array(self) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_arraywrapper_get_array @@ -180,10 +180,10 @@ function c_arraywrapper_get_array_bufferify(self, DSHC_rv) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_arraywrapper_get_array_bufferify @@ -195,9 +195,9 @@ pure function c_arraywrapper_get_array_const(self) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_const") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_arraywrapper_get_array_const @@ -208,10 +208,10 @@ function c_arraywrapper_get_array_const_bufferify(self, DSHC_rv) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_const_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_arraywrapper_get_array_const_bufferify @@ -223,9 +223,9 @@ function c_arraywrapper_get_array_c(self) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_c") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_arraywrapper_get_array_c @@ -236,10 +236,10 @@ function c_arraywrapper_get_array_c_bufferify(self, DSHC_rv) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_c_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_arraywrapper_get_array_c_bufferify @@ -251,9 +251,9 @@ pure function c_arraywrapper_get_array_const_c(self) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_const_c") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_arraywrapper_get_array_const_c @@ -265,10 +265,10 @@ function c_arraywrapper_get_array_const_c_bufferify(self, & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_get_array_const_c_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_arraywrapper_get_array_const_c_bufferify @@ -287,9 +287,9 @@ end function c_arraywrapper_get_array_const_c_bufferify subroutine c_arraywrapper_fetch_array_ptr(self, array, isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ptr") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), intent(OUT) :: array integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ptr @@ -310,10 +310,10 @@ subroutine c_arraywrapper_fetch_array_ptr_bufferify(self, & Darray, isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ptr_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: Darray + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: Darray integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ptr_bufferify @@ -332,9 +332,9 @@ end subroutine c_arraywrapper_fetch_array_ptr_bufferify subroutine c_arraywrapper_fetch_array_ref(self, array, isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ref") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), intent(OUT) :: array integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ref @@ -355,10 +355,10 @@ subroutine c_arraywrapper_fetch_array_ref_bufferify(self, & Darray, isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ref_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: Darray + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: Darray integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ref_bufferify @@ -378,9 +378,9 @@ subroutine c_arraywrapper_fetch_array_ptr_const(self, array, & isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ptr_const") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), intent(OUT) :: array integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ptr_const @@ -401,10 +401,10 @@ subroutine c_arraywrapper_fetch_array_ptr_const_bufferify(self, & Darray, isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ptr_const_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: Darray + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: Darray integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ptr_const_bufferify @@ -424,9 +424,9 @@ subroutine c_arraywrapper_fetch_array_ref_const(self, array, & isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ref_const") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), intent(OUT) :: array integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ref_const @@ -447,10 +447,10 @@ subroutine c_arraywrapper_fetch_array_ref_const_bufferify(self, & Darray, isize) & bind(C, name="ARR_ArrayWrapper_fetch_array_ref_const_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array, SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_array, ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self - type(SHROUD_array), intent(INOUT) :: Darray + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_array), intent(INOUT) :: Darray integer(C_INT), intent(INOUT) :: isize end subroutine c_arraywrapper_fetch_array_ref_const_bufferify @@ -465,9 +465,9 @@ end subroutine c_arraywrapper_fetch_array_ref_const_bufferify subroutine c_arraywrapper_fetch_void_ptr(self, array) & bind(C, name="ARR_ArrayWrapper_fetch_void_ptr") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), intent(OUT) :: array end subroutine c_arraywrapper_fetch_void_ptr @@ -482,9 +482,9 @@ end subroutine c_arraywrapper_fetch_void_ptr subroutine c_arraywrapper_fetch_void_ref(self, array) & bind(C, name="ARR_ArrayWrapper_fetch_void_ref") use iso_c_binding, only : C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), intent(OUT) :: array end subroutine c_arraywrapper_fetch_void_ref @@ -500,9 +500,9 @@ function c_arraywrapper_check_ptr(self, array) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_check_ptr") use iso_c_binding, only : C_BOOL, C_PTR - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self type(C_PTR), value, intent(IN) :: array logical(C_BOOL) :: SHT_rv end function c_arraywrapper_check_ptr @@ -515,9 +515,9 @@ function c_arraywrapper_sum_array(self) & result(SHT_rv) & bind(C, name="ARR_ArrayWrapper_sum_array") use iso_c_binding, only : C_DOUBLE - import :: SHROUD_arraywrapper_capsule + import :: ARR_SHROUD_arraywrapper_capsule implicit none - type(SHROUD_arraywrapper_capsule), intent(IN) :: self + type(ARR_SHROUD_arraywrapper_capsule), intent(IN) :: self real(C_DOUBLE) :: SHT_rv end function c_arraywrapper_sum_array @@ -635,7 +635,7 @@ function arraywrapper_get_array(obj) & result(SHT_rv) use iso_c_binding, only : C_DOUBLE, C_PTR, c_f_pointer class(arraywrapper) :: obj - type(SHROUD_array) :: DSHC_rv + type(ARR_SHROUD_array) :: DSHC_rv real(C_DOUBLE), pointer :: SHT_rv(:) ! splicer begin class.ArrayWrapper.method.get_array type(C_PTR) :: SHT_ptr @@ -656,7 +656,7 @@ function arraywrapper_get_array_const(obj) & result(SHT_rv) use iso_c_binding, only : C_DOUBLE, C_PTR, c_f_pointer class(arraywrapper) :: obj - type(SHROUD_array) :: DSHC_rv + type(ARR_SHROUD_array) :: DSHC_rv real(C_DOUBLE), pointer :: SHT_rv(:) ! splicer begin class.ArrayWrapper.method.get_array_const type(C_PTR) :: SHT_ptr @@ -677,7 +677,7 @@ function arraywrapper_get_array_c(obj) & result(SHT_rv) use iso_c_binding, only : C_DOUBLE, C_PTR, c_f_pointer class(arraywrapper) :: obj - type(SHROUD_array) :: DSHC_rv + type(ARR_SHROUD_array) :: DSHC_rv real(C_DOUBLE), pointer :: SHT_rv(:) ! splicer begin class.ArrayWrapper.method.get_array_c type(C_PTR) :: SHT_ptr @@ -698,7 +698,7 @@ function arraywrapper_get_array_const_c(obj) & result(SHT_rv) use iso_c_binding, only : C_DOUBLE, C_PTR, c_f_pointer class(arraywrapper) :: obj - type(SHROUD_array) :: DSHC_rv + type(ARR_SHROUD_array) :: DSHC_rv real(C_DOUBLE), pointer :: SHT_rv(:) ! splicer begin class.ArrayWrapper.method.get_array_const_c type(C_PTR) :: SHT_ptr @@ -732,7 +732,7 @@ subroutine arraywrapper_fetch_array_ptr(obj, array) use iso_c_binding, only : C_DOUBLE, C_INT, c_f_pointer class(arraywrapper) :: obj real(C_DOUBLE), intent(OUT), pointer :: array(:) - type(SHROUD_array) :: Darray + type(ARR_SHROUD_array) :: Darray integer(C_INT) :: isize ! splicer begin class.ArrayWrapper.method.fetch_array_ptr call c_arraywrapper_fetch_array_ptr_bufferify(obj%cxxmem, & @@ -765,7 +765,7 @@ subroutine arraywrapper_fetch_array_ref(obj, array) use iso_c_binding, only : C_DOUBLE, C_INT, c_f_pointer class(arraywrapper) :: obj real(C_DOUBLE), intent(OUT), pointer :: array(:) - type(SHROUD_array) :: Darray + type(ARR_SHROUD_array) :: Darray integer(C_INT) :: isize ! splicer begin class.ArrayWrapper.method.fetch_array_ref call c_arraywrapper_fetch_array_ref_bufferify(obj%cxxmem, & @@ -798,7 +798,7 @@ subroutine arraywrapper_fetch_array_ptr_const(obj, array) use iso_c_binding, only : C_DOUBLE, C_INT, c_f_pointer class(arraywrapper) :: obj real(C_DOUBLE), intent(OUT), pointer :: array(:) - type(SHROUD_array) :: Darray + type(ARR_SHROUD_array) :: Darray integer(C_INT) :: isize ! splicer begin class.ArrayWrapper.method.fetch_array_ptr_const call c_arraywrapper_fetch_array_ptr_const_bufferify(obj%cxxmem, & @@ -831,7 +831,7 @@ subroutine arraywrapper_fetch_array_ref_const(obj, array) use iso_c_binding, only : C_DOUBLE, C_INT, c_f_pointer class(arraywrapper) :: obj real(C_DOUBLE), intent(OUT), pointer :: array(:) - type(SHROUD_array) :: Darray + type(ARR_SHROUD_array) :: Darray integer(C_INT) :: isize ! splicer begin class.ArrayWrapper.method.fetch_array_ref_const call c_arraywrapper_fetch_array_ref_const_bufferify(obj%cxxmem, & diff --git a/regression/reference/cdesc/wrapfcdesc.f b/regression/reference/cdesc/wrapfcdesc.f index fff1e1f8b..e4aae6ff8 100644 --- a/regression/reference/cdesc/wrapfcdesc.f +++ b/regression/reference/cdesc/wrapfcdesc.f @@ -61,7 +61,7 @@ module cdesc_mod end type SHROUD_capsule_data ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: CDE_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -75,7 +75,7 @@ module cdesc_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type CDE_SHROUD_array interface @@ -89,9 +89,9 @@ module cdesc_mod ! Match: c_native_*_cdesc subroutine c_rank2_in(Darg) & bind(C, name="CDE_rank2_in") - import :: SHROUD_array + import :: CDE_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Darg + type(CDE_SHROUD_array), intent(INOUT) :: Darg end subroutine c_rank2_in ! ---------------------------------------- @@ -109,10 +109,10 @@ end subroutine c_rank2_in subroutine c_get_scalar1(name, Dvalue) & bind(C, name="CDE_get_scalar1") use iso_c_binding, only : C_CHAR - import :: SHROUD_array + import :: CDE_SHROUD_array implicit none character(kind=C_CHAR), intent(IN) :: name(*) - type(SHROUD_array), intent(INOUT) :: Dvalue + type(CDE_SHROUD_array), intent(INOUT) :: Dvalue end subroutine c_get_scalar1 ! ---------------------------------------- @@ -130,11 +130,11 @@ end subroutine c_get_scalar1 subroutine c_get_scalar1_bufferify(name, Lname, Dvalue) & bind(C, name="CDE_get_scalar1_bufferify") use iso_c_binding, only : C_CHAR, C_INT - import :: SHROUD_array + import :: CDE_SHROUD_array implicit none character(kind=C_CHAR), intent(IN) :: name(*) integer(C_INT), value, intent(IN) :: Lname - type(SHROUD_array), intent(INOUT) :: Dvalue + type(CDE_SHROUD_array), intent(INOUT) :: Dvalue end subroutine c_get_scalar1_bufferify ! ---------------------------------------- @@ -192,7 +192,7 @@ end function c_get_data_double subroutine rank2_in(arg) use iso_c_binding, only : C_INT, C_LOC integer(C_INT), intent(IN), target :: arg(:,:) - type(SHROUD_array) :: Darg + type(CDE_SHROUD_array) :: Darg ! splicer begin function.rank2_in Darg%base_addr = C_LOC(arg) Darg%type = SH_TYPE_INT @@ -238,7 +238,7 @@ subroutine get_scalar1_0(name, value) use iso_c_binding, only : C_INT, C_LOC character(len=*), intent(IN) :: name integer(C_INT), intent(OUT), target :: value - type(SHROUD_array) :: Dvalue + type(CDE_SHROUD_array) :: Dvalue ! splicer begin function.get_scalar1_0 Dvalue%base_addr = C_LOC(value) Dvalue%type = SH_TYPE_INT @@ -285,7 +285,7 @@ subroutine get_scalar1_1(name, value) use iso_c_binding, only : C_DOUBLE, C_INT, C_LOC character(len=*), intent(IN) :: name real(C_DOUBLE), intent(OUT), target :: value - type(SHROUD_array) :: Dvalue + type(CDE_SHROUD_array) :: Dvalue ! splicer begin function.get_scalar1_1 Dvalue%base_addr = C_LOC(value) Dvalue%type = SH_TYPE_DOUBLE diff --git a/regression/reference/classes/classes.json b/regression/reference/classes/classes.json index f9c82ec0d..2d25db706 100644 --- a/regression/reference/classes/classes.json +++ b/regression/reference/classes/classes.json @@ -84,7 +84,7 @@ "C_impl_filename": "wrapClass1.cpp", "C_name_scope": "Class1_", "C_type_name": "CLA_Class1", - "F_capsule_data_type": "SHROUD_class1_capsule", + "F_capsule_data_type": "CLA_SHROUD_class1_capsule", "F_derived_name": "class1", "F_name_scope": "class1_", "PY_PyObject": "PY_Class1", @@ -1755,7 +1755,7 @@ "C_impl_filename": "wrapClass2.cpp", "C_name_scope": "Class2_", "C_type_name": "CLA_Class2", - "F_capsule_data_type": "SHROUD_class2_capsule", + "F_capsule_data_type": "CLA_SHROUD_class2_capsule", "F_derived_name": "class2", "F_name_scope": "class2_", "PY_PyObject": "PY_Class2", @@ -1992,7 +1992,7 @@ "C_impl_filename": "wrapSingleton.cpp", "C_name_scope": "Singleton_", "C_type_name": "CLA_Singleton", - "F_capsule_data_type": "SHROUD_singleton_capsule", + "F_capsule_data_type": "CLA_SHROUD_singleton_capsule", "F_derived_name": "singleton", "F_name_scope": "singleton_", "PY_PyObject": "PY_Singleton", diff --git a/regression/reference/classes/classes_types.yaml b/regression/reference/classes/classes_types.yaml index 664e5b3dd..cd9a7432a 100644 --- a/regression/reference/classes/classes_types.yaml +++ b/regression/reference/classes/classes_types.yaml @@ -18,7 +18,7 @@ typemap: c_type: CLA_Class1 f_module_name: classes_mod f_derived_type: class1 - f_capsule_data_type: SHROUD_class1_capsule + f_capsule_data_type: CLA_SHROUD_class1_capsule f_to_c: "{f_var}%cxxmem" - type: Class2 fields: @@ -28,7 +28,7 @@ typemap: c_type: CLA_Class2 f_module_name: classes_mod f_derived_type: class2 - f_capsule_data_type: SHROUD_class2_capsule + f_capsule_data_type: CLA_SHROUD_class2_capsule f_to_c: "{f_var}%cxxmem" - type: Singleton fields: @@ -38,5 +38,5 @@ typemap: c_type: CLA_Singleton f_module_name: classes_mod f_derived_type: singleton - f_capsule_data_type: SHROUD_singleton_capsule + f_capsule_data_type: CLA_SHROUD_singleton_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/classes/wrapfclasses.f b/regression/reference/classes/wrapfclasses.f index 49d057c8d..46a8311b1 100644 --- a/regression/reference/classes/wrapfclasses.f +++ b/regression/reference/classes/wrapfclasses.f @@ -29,7 +29,7 @@ module classes_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: CLA_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module classes_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type CLA_SHROUD_array ! end array_context ! enum classes::Class1::DIRECTION @@ -52,15 +52,15 @@ module classes_mod integer(C_INT), parameter :: class1_left = 100 integer(C_INT), parameter :: class1_right = 101 - ! start derived-type SHROUD_class1_capsule - type, bind(C) :: SHROUD_class1_capsule + ! start derived-type CLA_SHROUD_class1_capsule + type, bind(C) :: CLA_SHROUD_class1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class1_capsule - ! end derived-type SHROUD_class1_capsule + end type CLA_SHROUD_class1_capsule + ! end derived-type CLA_SHROUD_class1_capsule type class1 - type(SHROUD_class1_capsule) :: cxxmem + type(CLA_SHROUD_class1_capsule) :: cxxmem ! splicer begin class.Class1.component_part ! splicer end class.Class1.component_part contains @@ -82,13 +82,13 @@ module classes_mod ! splicer end class.Class1.type_bound_procedure_part end type class1 - type, bind(C) :: SHROUD_class2_capsule + type, bind(C) :: CLA_SHROUD_class2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class2_capsule + end type CLA_SHROUD_class2_capsule type class2 - type(SHROUD_class2_capsule) :: cxxmem + type(CLA_SHROUD_class2_capsule) :: cxxmem ! splicer begin class.Class2.component_part ! splicer end class.Class2.component_part contains @@ -100,13 +100,13 @@ module classes_mod ! splicer end class.Class2.type_bound_procedure_part end type class2 - type, bind(C) :: SHROUD_singleton_capsule + type, bind(C) :: CLA_SHROUD_singleton_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_singleton_capsule + end type CLA_SHROUD_singleton_capsule type singleton - type(SHROUD_singleton_capsule) :: cxxmem + type(CLA_SHROUD_singleton_capsule) :: cxxmem ! splicer begin class.Singleton.component_part ! splicer end class.Singleton.component_part contains @@ -139,9 +139,9 @@ function c_class1_ctor_default(SHT_crv) & result(SHT_rv) & bind(C, name="CLA_Class1_ctor_default") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_class1_ctor_default end interface @@ -160,10 +160,10 @@ function c_class1_ctor_flag(flag, SHT_crv) & result(SHT_rv) & bind(C, name="CLA_Class1_ctor_flag") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none integer(C_INT), value, intent(IN) :: flag - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_class1_ctor_flag end interface @@ -177,9 +177,9 @@ end function c_class1_ctor_flag interface subroutine c_class1_delete(self) & bind(C, name="CLA_Class1_delete") - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self end subroutine c_class1_delete end interface ! end c_class1_delete @@ -194,9 +194,9 @@ function c_class1_method1(self) & result(SHT_rv) & bind(C, name="CLA_Class1_method1") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_class1_method1 end interface @@ -216,10 +216,10 @@ pure function c_class1_equivalent(self, obj2) & result(SHT_rv) & bind(C, name="CLA_Class1_equivalent") use iso_c_binding, only : C_BOOL - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self - type(SHROUD_class1_capsule), intent(IN) :: obj2 + type(CLA_SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: obj2 logical(C_BOOL) :: SHT_rv end function c_class1_equivalent end interface @@ -233,9 +233,9 @@ end function c_class1_equivalent interface subroutine c_class1_return_this(self) & bind(C, name="CLA_Class1_return_this") - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self end subroutine c_class1_return_this end interface ! end c_class1_return_this @@ -258,12 +258,12 @@ function c_class1_return_this_buffer(self, name, flag, SHT_crv) & result(SHT_rv) & bind(C, name="CLA_Class1_return_this_buffer") use iso_c_binding, only : C_BOOL, C_CHAR, C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self character(kind=C_CHAR), intent(IN) :: name(*) logical(C_BOOL), value, intent(IN) :: flag - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_class1_return_this_buffer end interface @@ -288,13 +288,13 @@ function c_class1_return_this_buffer_bufferify(self, name, & result(SHT_rv) & bind(C, name="CLA_Class1_return_this_buffer_bufferify") use iso_c_binding, only : C_BOOL, C_CHAR, C_INT, C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self character(kind=C_CHAR), intent(IN) :: name(*) integer(C_INT), value, intent(IN) :: Lname logical(C_BOOL), value, intent(IN) :: flag - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_class1_return_this_buffer_bufferify end interface @@ -310,10 +310,10 @@ function c_class1_getclass3(self, SHT_crv) & result(SHT_rv) & bind(C, name="CLA_Class1_getclass3") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_class1_getclass3 end interface @@ -329,9 +329,9 @@ function c_class1_get_name(self) & result(SHT_rv) & bind(C, name="CLA_Class1_get_name") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_class1_get_name end interface @@ -349,10 +349,10 @@ end function c_class1_get_name interface subroutine c_class1_get_name_bufferify(self, DSHF_rv) & bind(C, name="CLA_Class1_get_name_bufferify") - import :: SHROUD_array, SHROUD_class1_capsule + import :: CLA_SHROUD_array, CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(CLA_SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_class1_get_name_bufferify end interface ! end c_class1_get_name_bufferify @@ -371,9 +371,9 @@ function c_class1_direction_func(self, arg) & result(SHT_rv) & bind(C, name="CLA_Class1_direction_func") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: arg integer(C_INT) :: SHT_rv end function c_class1_direction_func @@ -390,9 +390,9 @@ function c_class1_get_m_flag(self) & result(SHT_rv) & bind(C, name="CLA_Class1_get_m_flag") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_class1_get_m_flag end interface @@ -408,9 +408,9 @@ function c_class1_get_test(self) & result(SHT_rv) & bind(C, name="CLA_Class1_get_test") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_class1_get_test end interface @@ -429,9 +429,9 @@ end function c_class1_get_test subroutine c_class1_set_test(self, val) & bind(C, name="CLA_Class1_set_test") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(CLA_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: val end subroutine c_class1_set_test end interface @@ -449,9 +449,9 @@ function c_class2_get_name(self) & result(SHT_rv) & bind(C, name="CLA_Class2_get_name") use iso_c_binding, only : C_PTR - import :: SHROUD_class2_capsule + import :: CLA_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self + type(CLA_SHROUD_class2_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_class2_get_name end interface @@ -467,10 +467,10 @@ end function c_class2_get_name interface subroutine c_class2_get_name_bufferify(self, DSHF_rv) & bind(C, name="CLA_Class2_get_name_bufferify") - import :: SHROUD_array, SHROUD_class2_capsule + import :: CLA_SHROUD_array, CLA_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(CLA_SHROUD_class2_capsule), intent(IN) :: self + type(CLA_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_class2_get_name_bufferify end interface @@ -486,9 +486,9 @@ function c_singleton_get_reference(SHT_crv) & result(SHT_rv) & bind(C, name="CLA_Singleton_get_reference") use iso_c_binding, only : C_PTR - import :: SHROUD_singleton_capsule + import :: CLA_SHROUD_singleton_capsule implicit none - type(SHROUD_singleton_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_singleton_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_singleton_get_reference end interface @@ -525,9 +525,9 @@ end function direction_func interface subroutine c_pass_class_by_value(arg) & bind(C, name="CLA_pass_class_by_value") - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN), value :: arg + type(CLA_SHROUD_class1_capsule), intent(IN), value :: arg end subroutine c_pass_class_by_value end interface @@ -544,9 +544,9 @@ function c_useclass(arg) & result(SHT_rv) & bind(C, name="CLA_useclass") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: arg + type(CLA_SHROUD_class1_capsule), intent(IN) :: arg integer(C_INT) :: SHT_rv end function c_useclass end interface @@ -560,9 +560,9 @@ function c_getclass2(SHT_crv) & result(SHT_rv) & bind(C, name="CLA_getclass2") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_getclass2 end interface @@ -576,9 +576,9 @@ function c_getclass3(SHT_crv) & result(SHT_rv) & bind(C, name="CLA_getclass3") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_getclass3 end interface @@ -592,9 +592,9 @@ function c_get_const_class_reference(SHT_crv) & result(SHT_rv) & bind(C, name="CLA_get_const_class_reference") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_get_const_class_reference end interface @@ -608,9 +608,9 @@ function c_get_class_reference(SHT_crv) & result(SHT_rv) & bind(C, name="CLA_get_class_reference") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_get_class_reference end interface @@ -627,10 +627,10 @@ function c_get_class_copy(flag, SHT_crv) & result(SHT_rv) & bind(C, name="CLA_get_class_copy") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_class1_capsule + import :: CLA_SHROUD_class1_capsule implicit none integer(C_INT), value, intent(IN) :: flag - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(CLA_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_get_class_copy end interface @@ -716,8 +716,8 @@ end subroutine c_last_function_called_bufferify subroutine CLA_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="CLA_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import CLA_SHROUD_array + type(CLA_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine CLA_SHROUD_copy_string_and_free @@ -943,7 +943,7 @@ end function class1_getclass3 function class1_get_name(obj) & result(SHT_rv) class(class1) :: obj - type(SHROUD_array) :: DSHF_rv + type(CLA_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin class.Class1.method.get_name call c_class1_get_name_bufferify(obj%cxxmem, DSHF_rv) @@ -1088,7 +1088,7 @@ end function class1_associated function class2_get_name(obj) & result(SHT_rv) class(class2) :: obj - type(SHROUD_array) :: DSHF_rv + type(CLA_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin class.Class2.method.get_name call c_class2_get_name_bufferify(obj%cxxmem, DSHF_rv) diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index b73d80503..08cfd9493 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -10,7 +10,7 @@ "C_impl_filename": "wraparray_info.c", "C_name_scope": "array_info_", "C_type_name": "array_info", - "F_capsule_data_type": "SHROUD_array_info_capsule", + "F_capsule_data_type": "CLI_SHROUD_array_info_capsule", "F_derived_name": "array_info", "F_name_scope": "array_info_", "PY_struct_array_descr_create": "PY_array_info_create_array_descr", diff --git a/regression/reference/cxxlibrary/cxxlibrary.json b/regression/reference/cxxlibrary/cxxlibrary.json index 5a1e282f6..814370240 100644 --- a/regression/reference/cxxlibrary/cxxlibrary.json +++ b/regression/reference/cxxlibrary/cxxlibrary.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.cpp", "C_name_scope": "Cstruct1_", "C_type_name": "CXX_cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "CXX_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -87,7 +87,7 @@ "C_impl_filename": "wrapCstruct1_cls.cpp", "C_name_scope": "Cstruct1_cls_", "C_type_name": "CXX_cstruct1_cls", - "F_capsule_data_type": "SHROUD_cstruct1_cls_capsule", + "F_capsule_data_type": "CXX_SHROUD_cstruct1_cls_capsule", "F_derived_name": "cstruct1_cls", "F_name_scope": "cstruct1_cls_", "PY_PyObject": "PY_Cstruct1_cls", diff --git a/regression/reference/debugfalse/wrapftutorial.f b/regression/reference/debugfalse/wrapftutorial.f index 94c000aaa..fe22c509f 100644 --- a/regression/reference/debugfalse/wrapftutorial.f +++ b/regression/reference/debugfalse/wrapftutorial.f @@ -29,7 +29,7 @@ module tutorial_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: TUT_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module tutorial_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type TUT_SHROUD_array ! end array_context ! enum tutorial::Color @@ -88,13 +88,13 @@ subroutine c_concatenate_strings_bufferify(arg1, Larg1, arg2, & Larg2, DSHF_rv) & bind(C, name="TUT_concatenate_strings_bufferify") use iso_c_binding, only : C_CHAR, C_INT - import :: SHROUD_array + import :: TUT_SHROUD_array implicit none character(kind=C_CHAR), intent(IN) :: arg1(*) integer(C_INT), value, intent(IN) :: Larg1 character(kind=C_CHAR), intent(IN) :: arg2(*) integer(C_INT), value, intent(IN) :: Larg2 - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(TUT_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_concatenate_strings_bufferify end interface @@ -437,8 +437,8 @@ end subroutine all_test1 subroutine TUT_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="TUT_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import TUT_SHROUD_array + type(TUT_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine TUT_SHROUD_copy_string_and_free @@ -455,7 +455,7 @@ function concatenate_strings(arg1, arg2) & use iso_c_binding, only : C_INT character(len=*), intent(IN) :: arg1 character(len=*), intent(IN) :: arg2 - type(SHROUD_array) :: DSHF_rv + type(TUT_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.concatenate_strings call c_concatenate_strings_bufferify(arg1, & diff --git a/regression/reference/example/example.json b/regression/reference/example/example.json index d1d44f0b1..d1a2d6a16 100644 --- a/regression/reference/example/example.json +++ b/regression/reference/example/example.json @@ -43,7 +43,7 @@ "C_impl_filename": "wrapexample_nested_ExClass1.cpp", "C_name_scope": "example_nested_ExClass1_", "C_type_name": "AA_example_nested_ExClass1", - "F_capsule_data_type": "SHROUD_exclass1_capsule", + "F_capsule_data_type": "AA_SHROUD_exclass1_capsule", "F_derived_name": "exclass1", "F_name_scope": "exclass1_", "LUA_class_reg": "l_ExClass1_Reg", @@ -1692,7 +1692,7 @@ "C_impl_filename": "wrapexample_nested_ExClass2.cpp", "C_name_scope": "example_nested_ExClass2_", "C_type_name": "AA_example_nested_ExClass2", - "F_capsule_data_type": "SHROUD_exclass2_capsule", + "F_capsule_data_type": "AA_SHROUD_exclass2_capsule", "F_derived_name": "exclass2", "F_name_scope": "exclass2_", "LUA_class_reg": "l_ExClass2_Reg", diff --git a/regression/reference/example/userlibrary_types.yaml b/regression/reference/example/userlibrary_types.yaml index ada5f9cca..d0533b3f4 100644 --- a/regression/reference/example/userlibrary_types.yaml +++ b/regression/reference/example/userlibrary_types.yaml @@ -20,7 +20,7 @@ typemap: c_type: AA_example_nested_ExClass1 f_module_name: userlibrary_example_nested_mod f_derived_type: exclass1 - f_capsule_data_type: SHROUD_exclass1_capsule + f_capsule_data_type: AA_SHROUD_exclass1_capsule f_to_c: "{f_var}%cxxmem" - type: ExClass2 fields: @@ -30,5 +30,5 @@ typemap: c_type: AA_example_nested_ExClass2 f_module_name: userlibrary_example_nested_mod f_derived_type: exclass2 - f_capsule_data_type: SHROUD_exclass2_capsule + f_capsule_data_type: AA_SHROUD_exclass2_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/example/wrapfUserLibrary_example_nested.f b/regression/reference/example/wrapfUserLibrary_example_nested.f index e94ab80ea..02b9c3973 100644 --- a/regression/reference/example/wrapfUserLibrary_example_nested.f +++ b/regression/reference/example/wrapfUserLibrary_example_nested.f @@ -29,7 +29,7 @@ module userlibrary_example_nested_mod end type SHROUD_capsule_data ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: AA_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,15 +43,15 @@ module userlibrary_example_nested_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type AA_SHROUD_array - type, bind(C) :: SHROUD_exclass1_capsule + type, bind(C) :: AA_SHROUD_exclass1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_exclass1_capsule + end type AA_SHROUD_exclass1_capsule type exclass1 - type(SHROUD_exclass1_capsule) :: cxxmem + type(AA_SHROUD_exclass1_capsule) :: cxxmem ! splicer begin namespace.example::nested.class.ExClass1.component_part component part 1a component part 1b @@ -73,13 +73,13 @@ module userlibrary_example_nested_mod ! splicer end namespace.example::nested.class.ExClass1.type_bound_procedure_part end type exclass1 - type, bind(C) :: SHROUD_exclass2_capsule + type, bind(C) :: AA_SHROUD_exclass2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_exclass2_capsule + end type AA_SHROUD_exclass2_capsule type exclass2 - type(SHROUD_exclass2_capsule) :: cxxmem + type(AA_SHROUD_exclass2_capsule) :: cxxmem ! splicer begin namespace.example::nested.class.ExClass2.component_part ! splicer end namespace.example::nested.class.ExClass2.component_part contains @@ -178,9 +178,9 @@ function c_exclass1_ctor_0(SHT_crv) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_ctor_0") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv + type(AA_SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_exclass1_ctor_0 @@ -195,10 +195,10 @@ function c_exclass1_ctor_1(name, SHT_crv) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_ctor_1") use iso_c_binding, only : C_CHAR, C_PTR - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none character(kind=C_CHAR), intent(IN) :: name(*) - type(SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv + type(AA_SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_exclass1_ctor_1 @@ -214,11 +214,11 @@ function c_exclass1_ctor_1_bufferify(name, Lname, SHT_crv) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_ctor_1_bufferify") use iso_c_binding, only : C_CHAR, C_INT, C_PTR - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none character(kind=C_CHAR), intent(IN) :: name(*) integer(C_INT), value, intent(IN) :: Lname - type(SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv + type(AA_SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_exclass1_ctor_1_bufferify @@ -228,9 +228,9 @@ end function c_exclass1_ctor_1_bufferify ! Match: c_default subroutine c_exclass1_dtor(self) & bind(C, name="AA_example_nested_ExClass1_dtor") - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self end subroutine c_exclass1_dtor ! ---------------------------------------- @@ -245,9 +245,9 @@ function c_exclass1_increment_count(self, incr) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_increment_count") use iso_c_binding, only : C_INT - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: incr integer(C_INT) :: SHT_rv end function c_exclass1_increment_count @@ -260,9 +260,9 @@ pure function c_exclass1_get_name_error_check(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_get_name_error_check") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_exclass1_get_name_error_check @@ -277,10 +277,10 @@ end function c_exclass1_get_name_error_check subroutine c_exclass1_get_name_error_check_bufferify(self, & DSHF_rv) & bind(C, name="AA_example_nested_ExClass1_get_name_error_check_bufferify") - import :: SHROUD_array, SHROUD_exclass1_capsule + import :: AA_SHROUD_array, AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_exclass1_get_name_error_check_bufferify ! ---------------------------------------- @@ -291,9 +291,9 @@ pure function c_exclass1_get_name_arg(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_get_name_arg") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_exclass1_get_name_arg @@ -308,9 +308,9 @@ end function c_exclass1_get_name_arg subroutine c_exclass1_get_name_arg_bufferify(self, name, Nname) & bind(C, name="AA_example_nested_ExClass1_get_name_arg_bufferify") use iso_c_binding, only : C_CHAR, C_INT - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self character(kind=C_CHAR), intent(OUT) :: name(*) integer(C_INT), value, intent(IN) :: Nname end subroutine c_exclass1_get_name_arg_bufferify @@ -327,9 +327,9 @@ function c_exclass1_get_value_from_int(self, value) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_get_value_from_int") use iso_c_binding, only : C_INT - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: value integer(C_INT) :: SHT_rv end function c_exclass1_get_value_from_int @@ -346,9 +346,9 @@ function c_exclass1_get_value_1(self, value) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_get_value_1") use iso_c_binding, only : C_LONG - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self integer(C_LONG), value, intent(IN) :: value integer(C_LONG) :: SHT_rv end function c_exclass1_get_value_1 @@ -365,9 +365,9 @@ function c_exclass1_has_addr(self, in) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass1_has_addr") use iso_c_binding, only : C_BOOL - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self logical(C_BOOL), value, intent(IN) :: in logical(C_BOOL) :: SHT_rv end function c_exclass1_has_addr @@ -378,9 +378,9 @@ end function c_exclass1_has_addr ! Match: c_default subroutine c_exclass1_splicer_special(self) & bind(C, name="AA_example_nested_ExClass1_splicer_special") - import :: SHROUD_exclass1_capsule + import :: AA_SHROUD_exclass1_capsule implicit none - type(SHROUD_exclass1_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: self end subroutine c_exclass1_splicer_special ! splicer begin namespace.example::nested.class.ExClass1.additional_interfaces @@ -397,10 +397,10 @@ function c_exclass2_ctor(name, SHT_crv) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_ctor") use iso_c_binding, only : C_CHAR, C_PTR - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none character(kind=C_CHAR), intent(IN) :: name(*) - type(SHROUD_exclass2_capsule), intent(OUT) :: SHT_crv + type(AA_SHROUD_exclass2_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_exclass2_ctor @@ -416,11 +416,11 @@ function c_exclass2_ctor_bufferify(name, trim_name, SHT_crv) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_ctor_bufferify") use iso_c_binding, only : C_CHAR, C_INT, C_PTR - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none character(kind=C_CHAR), intent(IN) :: name(*) integer(C_INT), value, intent(IN) :: trim_name - type(SHROUD_exclass2_capsule), intent(OUT) :: SHT_crv + type(AA_SHROUD_exclass2_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_exclass2_ctor_bufferify @@ -430,9 +430,9 @@ end function c_exclass2_ctor_bufferify ! Match: c_default subroutine c_exclass2_dtor(self) & bind(C, name="AA_example_nested_ExClass2_dtor") - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self end subroutine c_exclass2_dtor ! ---------------------------------------- @@ -443,9 +443,9 @@ pure function c_exclass2_get_name(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_name") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_exclass2_get_name @@ -460,9 +460,9 @@ end function c_exclass2_get_name subroutine c_exclass2_get_name_bufferify(self, SHF_rv, NSHF_rv) & bind(C, name="AA_example_nested_ExClass2_get_name_bufferify") use iso_c_binding, only : C_CHAR, C_INT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self character(kind=C_CHAR), intent(OUT) :: SHF_rv(*) integer(C_INT), value, intent(IN) :: NSHF_rv end subroutine c_exclass2_get_name_bufferify @@ -475,9 +475,9 @@ function c_exclass2_get_name2(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_name2") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_exclass2_get_name2 @@ -491,10 +491,10 @@ end function c_exclass2_get_name2 ! Match: c_string_result_buf_allocatable subroutine c_exclass2_get_name2_bufferify(self, DSHF_rv) & bind(C, name="AA_example_nested_ExClass2_get_name2_bufferify") - import :: SHROUD_array, SHROUD_exclass2_capsule + import :: AA_SHROUD_array, AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_exclass2_get_name2_bufferify ! ---------------------------------------- @@ -505,9 +505,9 @@ pure function c_exclass2_get_name3(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_name3") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_exclass2_get_name3 @@ -521,10 +521,10 @@ end function c_exclass2_get_name3 ! Match: c_string_result_buf_allocatable subroutine c_exclass2_get_name3_bufferify(self, DSHF_rv) & bind(C, name="AA_example_nested_ExClass2_get_name3_bufferify") - import :: SHROUD_array, SHROUD_exclass2_capsule + import :: AA_SHROUD_array, AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_exclass2_get_name3_bufferify ! ---------------------------------------- @@ -535,9 +535,9 @@ function c_exclass2_get_name4(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_name4") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self type(C_PTR) SHT_rv end function c_exclass2_get_name4 @@ -551,10 +551,10 @@ end function c_exclass2_get_name4 ! Match: c_string_result_buf_allocatable subroutine c_exclass2_get_name4_bufferify(self, DSHF_rv) & bind(C, name="AA_example_nested_ExClass2_get_name4_bufferify") - import :: SHROUD_array, SHROUD_exclass2_capsule + import :: AA_SHROUD_array, AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_exclass2_get_name4_bufferify ! ---------------------------------------- @@ -565,9 +565,9 @@ pure function c_exclass2_get_name_length(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_name_length") use iso_c_binding, only : C_INT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_exclass2_get_name_length @@ -583,11 +583,11 @@ function c_exclass2_get_class1(self, in, SHT_crv) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_class1") use iso_c_binding, only : C_PTR - import :: SHROUD_exclass1_capsule, SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass1_capsule, AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self - type(SHROUD_exclass1_capsule), intent(IN) :: in - type(SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass1_capsule), intent(IN) :: in + type(AA_SHROUD_exclass1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_exclass2_get_class1 @@ -602,9 +602,9 @@ end function c_exclass2_get_class1 subroutine c_exclass2_declare_0(self, type) & bind(C, name="AA_example_nested_ExClass2_declare_0") use iso_c_binding, only : C_INT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: type end subroutine c_exclass2_declare_0 @@ -623,9 +623,9 @@ end subroutine c_exclass2_declare_0 subroutine c_exclass2_declare_1(self, type, len) & bind(C, name="AA_example_nested_ExClass2_declare_1") use iso_c_binding, only : C_INT, C_LONG - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: type integer(C_LONG), value, intent(IN) :: len end subroutine c_exclass2_declare_1 @@ -636,9 +636,9 @@ end subroutine c_exclass2_declare_1 ! Match: c_default subroutine c_exclass2_destroyall(self) & bind(C, name="AA_example_nested_ExClass2_destroyall") - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self end subroutine c_exclass2_destroyall ! ---------------------------------------- @@ -649,9 +649,9 @@ pure function c_exclass2_get_type_id(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_type_id") use iso_c_binding, only : C_INT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_exclass2_get_type_id @@ -666,9 +666,9 @@ end function c_exclass2_get_type_id subroutine c_exclass2_set_value_int(self, value) & bind(C, name="AA_example_nested_ExClass2_set_value_int") use iso_c_binding, only : C_INT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: value end subroutine c_exclass2_set_value_int @@ -683,9 +683,9 @@ end subroutine c_exclass2_set_value_int subroutine c_exclass2_set_value_long(self, value) & bind(C, name="AA_example_nested_ExClass2_set_value_long") use iso_c_binding, only : C_LONG - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_LONG), value, intent(IN) :: value end subroutine c_exclass2_set_value_long @@ -700,9 +700,9 @@ end subroutine c_exclass2_set_value_long subroutine c_exclass2_set_value_float(self, value) & bind(C, name="AA_example_nested_ExClass2_set_value_float") use iso_c_binding, only : C_FLOAT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self real(C_FLOAT), value, intent(IN) :: value end subroutine c_exclass2_set_value_float @@ -717,9 +717,9 @@ end subroutine c_exclass2_set_value_float subroutine c_exclass2_set_value_double(self, value) & bind(C, name="AA_example_nested_ExClass2_set_value_double") use iso_c_binding, only : C_DOUBLE - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self real(C_DOUBLE), value, intent(IN) :: value end subroutine c_exclass2_set_value_double @@ -731,9 +731,9 @@ function c_exclass2_get_value_int(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_value_int") use iso_c_binding, only : C_INT - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_exclass2_get_value_int @@ -745,9 +745,9 @@ function c_exclass2_get_value_double(self) & result(SHT_rv) & bind(C, name="AA_example_nested_ExClass2_get_value_double") use iso_c_binding, only : C_DOUBLE - import :: SHROUD_exclass2_capsule + import :: AA_SHROUD_exclass2_capsule implicit none - type(SHROUD_exclass2_capsule), intent(IN) :: self + type(AA_SHROUD_exclass2_capsule), intent(IN) :: self real(C_DOUBLE) :: SHT_rv end function c_exclass2_get_value_double @@ -1233,8 +1233,8 @@ end subroutine c_cos_doubles subroutine AA_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="AA_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import AA_SHROUD_array + type(AA_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine AA_SHROUD_copy_string_and_free @@ -1349,7 +1349,7 @@ end function exclass1_increment_count function exclass1_get_name_error_check(obj) & result(SHT_rv) class(exclass1) :: obj - type(SHROUD_array) :: DSHF_rv + type(AA_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin namespace.example::nested.class.ExClass1.method.get_name_error_check call c_exclass1_get_name_error_check_bufferify(obj%cxxmem, & @@ -1577,7 +1577,7 @@ end function exclass2_get_name function exclass2_get_name2(obj) & result(SHT_rv) class(exclass2) :: obj - type(SHROUD_array) :: DSHF_rv + type(AA_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin namespace.example::nested.class.ExClass2.method.get_name2 call c_exclass2_get_name2_bufferify(obj%cxxmem, DSHF_rv) @@ -1603,7 +1603,7 @@ end function exclass2_get_name2 function exclass2_get_name3(obj) & result(SHT_rv) class(exclass2) :: obj - type(SHROUD_array) :: DSHF_rv + type(AA_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin namespace.example::nested.class.ExClass2.method.get_name3 call c_exclass2_get_name3_bufferify(obj%cxxmem, DSHF_rv) @@ -1629,7 +1629,7 @@ end function exclass2_get_name3 function exclass2_get_name4(obj) & result(SHT_rv) class(exclass2) :: obj - type(SHROUD_array) :: DSHF_rv + type(AA_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin namespace.example::nested.class.ExClass2.method.get_name4 call c_exclass2_get_name4_bufferify(obj%cxxmem, DSHF_rv) diff --git a/regression/reference/forward/forward.json b/regression/reference/forward/forward.json index c44ac91ad..a4d08b512 100644 --- a/regression/reference/forward/forward.json +++ b/regression/reference/forward/forward.json @@ -14,7 +14,7 @@ "C_impl_filename": "wrapClass3.cpp", "C_name_scope": "Class3_", "C_type_name": "FOR_Class3", - "F_capsule_data_type": "SHROUD_class3_capsule", + "F_capsule_data_type": "FOR_SHROUD_class3_capsule", "F_derived_name": "class3", "F_name_scope": "class3_", "LUA_class_reg": "l_Class3_Reg", @@ -50,7 +50,7 @@ "C_impl_filename": "wrapClass2.cpp", "C_name_scope": "Class2_", "C_type_name": "FOR_Class2", - "F_capsule_data_type": "SHROUD_class2_capsule", + "F_capsule_data_type": "FOR_SHROUD_class2_capsule", "F_derived_name": "class2", "F_name_scope": "class2_", "LUA_class_reg": "l_Class2_Reg", diff --git a/regression/reference/forward/forward_types.yaml b/regression/reference/forward/forward_types.yaml index 07e630820..92e8b355e 100644 --- a/regression/reference/forward/forward_types.yaml +++ b/regression/reference/forward/forward_types.yaml @@ -18,7 +18,7 @@ typemap: c_type: FOR_Class2 f_module_name: forward_mod f_derived_type: class2 - f_capsule_data_type: SHROUD_class2_capsule + f_capsule_data_type: FOR_SHROUD_class2_capsule f_to_c: "{f_var}%cxxmem" - type: Class3 fields: @@ -28,5 +28,5 @@ typemap: c_type: FOR_Class3 f_module_name: forward_mod f_derived_type: class3 - f_capsule_data_type: SHROUD_class3_capsule + f_capsule_data_type: FOR_SHROUD_class3_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/forward/wrapfforward.f b/regression/reference/forward/wrapfforward.f index bdecc7a3e..f116780dc 100644 --- a/regression/reference/forward/wrapfforward.f +++ b/regression/reference/forward/wrapfforward.f @@ -21,13 +21,13 @@ module forward_mod ! splicer begin module_top ! splicer end module_top - type, bind(C) :: SHROUD_class3_capsule + type, bind(C) :: FOR_SHROUD_class3_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class3_capsule + end type FOR_SHROUD_class3_capsule type class3 - type(SHROUD_class3_capsule) :: cxxmem + type(FOR_SHROUD_class3_capsule) :: cxxmem ! splicer begin class.Class3.component_part ! splicer end class.Class3.component_part contains @@ -38,13 +38,13 @@ module forward_mod ! splicer end class.Class3.type_bound_procedure_part end type class3 - type, bind(C) :: SHROUD_class2_capsule + type, bind(C) :: FOR_SHROUD_class2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class2_capsule + end type FOR_SHROUD_class2_capsule type class2 - type(SHROUD_class2_capsule) :: cxxmem + type(FOR_SHROUD_class2_capsule) :: cxxmem ! splicer begin class.Class2.component_part ! splicer end class.Class2.component_part contains @@ -80,9 +80,9 @@ function c_class2_ctor(SHT_crv) & result(SHT_rv) & bind(C, name="FOR_Class2_ctor") use iso_c_binding, only : C_PTR - import :: SHROUD_class2_capsule + import :: FOR_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(OUT) :: SHT_crv + type(FOR_SHROUD_class2_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_class2_ctor @@ -92,9 +92,9 @@ end function c_class2_ctor ! Match: c_default subroutine c_class2_dtor(self) & bind(C, name="FOR_Class2_dtor") - import :: SHROUD_class2_capsule + import :: FOR_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self + type(FOR_SHROUD_class2_capsule), intent(IN) :: self end subroutine c_class2_dtor ! ---------------------------------------- @@ -108,9 +108,9 @@ end subroutine c_class2_dtor subroutine c_class2_func1(self, arg) & bind(C, name="FOR_Class2_func1") use tutorial_mod, only : SHROUD_class1_capsule - import :: SHROUD_class2_capsule + import :: FOR_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self + type(FOR_SHROUD_class2_capsule), intent(IN) :: self type(SHROUD_class1_capsule), intent(IN) :: arg end subroutine c_class2_func1 @@ -124,10 +124,10 @@ end subroutine c_class2_func1 ! Match: c_shadow_in subroutine c_class2_accept_class3(self, arg) & bind(C, name="FOR_Class2_accept_class3") - import :: SHROUD_class2_capsule, SHROUD_class3_capsule + import :: FOR_SHROUD_class2_capsule, FOR_SHROUD_class3_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self - type(SHROUD_class3_capsule), intent(IN) :: arg + type(FOR_SHROUD_class2_capsule), intent(IN) :: self + type(FOR_SHROUD_class3_capsule), intent(IN) :: arg end subroutine c_class2_accept_class3 ! splicer begin class.Class2.additional_interfaces diff --git a/regression/reference/include/include.json b/regression/reference/include/include.json index 137876362..dfc712c49 100644 --- a/regression/reference/include/include.json +++ b/regression/reference/include/include.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapClass2.cpp", "C_name_scope": "Class2_", "C_type_name": "LIB_Class2", - "F_capsule_data_type": "SHROUD_class2_capsule", + "F_capsule_data_type": "LIB_SHROUD_class2_capsule", "F_derived_name": "class2", "F_name_scope": "class2_", "class_scope": "Class2::", @@ -317,7 +317,7 @@ "C_impl_filename": "wrapthree_Class1.cpp", "C_name_scope": "three_Class1_", "C_type_name": "LIB_three_Class1", - "F_capsule_data_type": "SHROUD_class1_capsule", + "F_capsule_data_type": "LIB_SHROUD_class1_capsule", "F_derived_name": "class1", "F_name_scope": "class1_", "class_scope": "Class1::", @@ -453,7 +453,7 @@ "C_impl_filename": "wrapouter1_class0.cpp", "C_name_scope": "outer1_class0_", "C_type_name": "LIB_outer1_class0", - "F_capsule_data_type": "SHROUD_class0_capsule", + "F_capsule_data_type": "LIB_SHROUD_class0_capsule", "F_derived_name": "class0", "F_name_scope": "class0_", "class_scope": "class0::", @@ -580,7 +580,7 @@ "C_impl_filename": "wrapouter2_class0.cpp", "C_name_scope": "outer2_class0_", "C_type_name": "LIB_outer2_class0", - "F_capsule_data_type": "SHROUD_class0_capsule", + "F_capsule_data_type": "LIB_SHROUD_class0_capsule", "F_derived_name": "class0", "F_name_scope": "class0_", "class_scope": "class0::", diff --git a/regression/reference/include/library_types.yaml b/regression/reference/include/library_types.yaml index 1a37f75c6..6ec70fbc9 100644 --- a/regression/reference/include/library_types.yaml +++ b/regression/reference/include/library_types.yaml @@ -16,7 +16,7 @@ typemap: c_type: LIB_Class2 f_module_name: library_mod f_derived_type: class2 - f_capsule_data_type: SHROUD_class2_capsule + f_capsule_data_type: LIB_SHROUD_class2_capsule f_to_c: "{f_var}%cxxmem" - namespace: one declarations: one @@ -30,7 +30,7 @@ typemap: c_type: LIB_outer1_class0 f_module_name: library_outer1_mod f_derived_type: class0 - f_capsule_data_type: SHROUD_class0_capsule + f_capsule_data_type: LIB_SHROUD_class0_capsule f_to_c: "{f_var}%cxxmem" - namespace: outer2 declarations: outer2 @@ -42,7 +42,7 @@ typemap: c_type: LIB_outer2_class0 f_module_name: library_outer2_mod f_derived_type: class0 - f_capsule_data_type: SHROUD_class0_capsule + f_capsule_data_type: LIB_SHROUD_class0_capsule f_to_c: "{f_var}%cxxmem" - namespace: three declarations: three @@ -54,5 +54,5 @@ typemap: c_type: LIB_three_Class1 f_module_name: library_three_mod f_derived_type: class1 - f_capsule_data_type: SHROUD_class1_capsule + f_capsule_data_type: LIB_SHROUD_class1_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/include/wrapflibrary.f b/regression/reference/include/wrapflibrary.f index 4a2325aac..7c76f113d 100644 --- a/regression/reference/include/wrapflibrary.f +++ b/regression/reference/include/wrapflibrary.f @@ -15,13 +15,13 @@ module library_mod implicit none - type, bind(C) :: SHROUD_class2_capsule + type, bind(C) :: LIB_SHROUD_class2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class2_capsule + end type LIB_SHROUD_class2_capsule type class2 - type(SHROUD_class2_capsule) :: cxxmem + type(LIB_SHROUD_class2_capsule) :: cxxmem contains procedure :: method1 => class2_method1 procedure :: method2 => class2_method2 @@ -51,9 +51,9 @@ module library_mod subroutine c_class2_method1(self, comm) & bind(C, name="LIB_Class2_method1") use iso_c_binding, only : C_INT - import :: SHROUD_class2_capsule + import :: LIB_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self + type(LIB_SHROUD_class2_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: comm end subroutine c_class2_method1 @@ -67,10 +67,10 @@ end subroutine c_class2_method1 ! Match: c_shadow_inout subroutine c_class2_method2(self, c2) & bind(C, name="LIB_Class2_method2") - import :: SHROUD_class1_capsule, SHROUD_class2_capsule + import :: LIB_SHROUD_class1_capsule, LIB_SHROUD_class2_capsule implicit none - type(SHROUD_class2_capsule), intent(IN) :: self - type(SHROUD_class1_capsule), intent(INOUT) :: c2 + type(LIB_SHROUD_class2_capsule), intent(IN) :: self + type(LIB_SHROUD_class1_capsule), intent(INOUT) :: c2 end subroutine c_class2_method2 diff --git a/regression/reference/include/wrapflibrary_outer1.f b/regression/reference/include/wrapflibrary_outer1.f index 476d7473e..358a9cbe6 100644 --- a/regression/reference/include/wrapflibrary_outer1.f +++ b/regression/reference/include/wrapflibrary_outer1.f @@ -15,13 +15,13 @@ module library_outer1_mod implicit none - type, bind(C) :: SHROUD_class0_capsule + type, bind(C) :: LIB_SHROUD_class0_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class0_capsule + end type LIB_SHROUD_class0_capsule type class0 - type(SHROUD_class0_capsule) :: cxxmem + type(LIB_SHROUD_class0_capsule) :: cxxmem contains procedure :: method => class0_method procedure :: get_instance => class0_get_instance @@ -45,9 +45,9 @@ module library_outer1_mod ! Match: c_default subroutine c_class0_method(self) & bind(C, name="LIB_outer1_class0_method") - import :: SHROUD_class0_capsule + import :: LIB_SHROUD_class0_capsule implicit none - type(SHROUD_class0_capsule), intent(IN) :: self + type(LIB_SHROUD_class0_capsule), intent(IN) :: self end subroutine c_class0_method diff --git a/regression/reference/include/wrapflibrary_outer2.f b/regression/reference/include/wrapflibrary_outer2.f index 70e5d244c..397341176 100644 --- a/regression/reference/include/wrapflibrary_outer2.f +++ b/regression/reference/include/wrapflibrary_outer2.f @@ -15,13 +15,13 @@ module library_outer2_mod implicit none - type, bind(C) :: SHROUD_class0_capsule + type, bind(C) :: LIB_SHROUD_class0_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class0_capsule + end type LIB_SHROUD_class0_capsule type class0 - type(SHROUD_class0_capsule) :: cxxmem + type(LIB_SHROUD_class0_capsule) :: cxxmem contains procedure :: method => class0_method procedure :: get_instance => class0_get_instance @@ -45,9 +45,9 @@ module library_outer2_mod ! Match: c_default subroutine c_class0_method(self) & bind(C, name="LIB_outer2_class0_method") - import :: SHROUD_class0_capsule + import :: LIB_SHROUD_class0_capsule implicit none - type(SHROUD_class0_capsule), intent(IN) :: self + type(LIB_SHROUD_class0_capsule), intent(IN) :: self end subroutine c_class0_method diff --git a/regression/reference/include/wrapflibrary_three.f b/regression/reference/include/wrapflibrary_three.f index 3282e3450..aab2679ee 100644 --- a/regression/reference/include/wrapflibrary_three.f +++ b/regression/reference/include/wrapflibrary_three.f @@ -15,13 +15,13 @@ module library_three_mod implicit none - type, bind(C) :: SHROUD_class1_capsule + type, bind(C) :: LIB_SHROUD_class1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class1_capsule + end type LIB_SHROUD_class1_capsule type class1 - type(SHROUD_class1_capsule) :: cxxmem + type(LIB_SHROUD_class1_capsule) :: cxxmem contains procedure :: method1 => class1_method1 procedure :: get_instance => class1_get_instance @@ -50,9 +50,9 @@ module library_three_mod subroutine c_class1_method1(self, arg1) & bind(C, name="LIB_three_Class1_method1") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: LIB_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(LIB_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: arg1 end subroutine c_class1_method1 diff --git a/regression/reference/memdoc/wrapfmemdoc.f b/regression/reference/memdoc/wrapfmemdoc.f index 8c032dd6b..56f6d576e 100644 --- a/regression/reference/memdoc/wrapfmemdoc.f +++ b/regression/reference/memdoc/wrapfmemdoc.f @@ -29,7 +29,7 @@ module memdoc_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: STR_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module memdoc_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type STR_SHROUD_array ! end array_context ! ---------------------------------------- @@ -74,9 +74,9 @@ end function c_get_const_string_ptr_alloc interface subroutine c_get_const_string_ptr_alloc_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_ptr_alloc_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_ptr_alloc_bufferify end interface ! end c_get_const_string_ptr_alloc_bufferify @@ -92,8 +92,8 @@ end subroutine c_get_const_string_ptr_alloc_bufferify subroutine STR_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="STR_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import STR_SHROUD_array + type(STR_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine STR_SHROUD_copy_string_and_free @@ -118,7 +118,7 @@ end subroutine STR_SHROUD_copy_string_and_free ! start get_const_string_ptr_alloc function get_const_string_ptr_alloc() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_ptr_alloc call c_get_const_string_ptr_alloc_bufferify(DSHF_rv) diff --git a/regression/reference/names/foo.f b/regression/reference/names/foo.f index 8e15499c6..36d1c8eb6 100644 --- a/regression/reference/names/foo.f +++ b/regression/reference/names/foo.f @@ -21,13 +21,13 @@ module name_module ! splicer begin namespace.ns0.module_top ! splicer end namespace.ns0.module_top - type, bind(C) :: SHROUD_names_capsule + type, bind(C) :: TES_SHROUD_names_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_names_capsule + end type TES_SHROUD_names_capsule type FNames - type(SHROUD_names_capsule) :: cxxmem + type(TES_SHROUD_names_capsule) :: cxxmem ! splicer begin namespace.ns0.class.Names.component_part ! splicer end namespace.ns0.class.Names.component_part contains @@ -57,9 +57,9 @@ function xxx_tes_names_defaultctor(SHT_crv) & result(SHT_rv) & bind(C, name="XXX_TES_ns0_Names_defaultctor") use iso_c_binding, only : C_PTR - import :: SHROUD_names_capsule + import :: TES_SHROUD_names_capsule implicit none - type(SHROUD_names_capsule), intent(OUT) :: SHT_crv + type(TES_SHROUD_names_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function xxx_tes_names_defaultctor @@ -69,9 +69,9 @@ end function xxx_tes_names_defaultctor ! Match: c_default subroutine xxx_tes_names_method1(self) & bind(C, name="XXX_TES_ns0_Names_method1") - import :: SHROUD_names_capsule + import :: TES_SHROUD_names_capsule implicit none - type(SHROUD_names_capsule), intent(IN) :: self + type(TES_SHROUD_names_capsule), intent(IN) :: self end subroutine xxx_tes_names_method1 ! ---------------------------------------- @@ -80,9 +80,9 @@ end subroutine xxx_tes_names_method1 ! Match: c_default subroutine xxx_tes_names_method2(self2) & bind(C, name="XXX_TES_ns0_Names_method2") - import :: SHROUD_names_capsule + import :: TES_SHROUD_names_capsule implicit none - type(SHROUD_names_capsule), intent(IN) :: self2 + type(TES_SHROUD_names_capsule), intent(IN) :: self2 end subroutine xxx_tes_names_method2 ! splicer begin namespace.ns0.class.Names.additional_interfaces diff --git a/regression/reference/names/names.json b/regression/reference/names/names.json index 210054c3a..b1ed3be6b 100644 --- a/regression/reference/names/names.json +++ b/regression/reference/names/names.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapNames2.cc", "C_name_scope": "Names2_", "C_type_name": "TES_Names2", - "F_capsule_data_type": "SHROUD_names2_capsule", + "F_capsule_data_type": "TES_SHROUD_names2_capsule", "F_derived_name": "names2", "F_name_scope": "names2_", "PY_PyObject": "PY_Names2", @@ -39,7 +39,7 @@ "C_impl_filename": "wraptwoTs_0.cc", "C_name_scope": "twoTs_0_", "C_type_name": "TES_twoTs_0", - "F_capsule_data_type": "SHROUD_twots_0_capsule", + "F_capsule_data_type": "TES_SHROUD_twots_0_capsule", "F_derived_name": "twots_0", "F_name_scope": "twots_0_", "PY_PyObject": "PY_twoTs_0", @@ -111,7 +111,7 @@ "C_impl_filename": "wraptwoTs_instantiation4.cc", "C_name_scope": "twoTs_instantiation4_", "C_type_name": "TES_twoTs_instantiation4", - "F_capsule_data_type": "SHROUD_twots_instantiation4_capsule", + "F_capsule_data_type": "TES_SHROUD_twots_instantiation4_capsule", "F_derived_name": "twots_instantiation4", "F_name_scope": "twots_instantiation4_", "PY_PyObject": "PY_twoTs_instantiation4", @@ -2071,7 +2071,7 @@ "C_impl_filename": "foo.cpp", "C_name_scope": "ns0_Names_", "C_type_name": "TES_ns0_Names", - "F_capsule_data_type": "SHROUD_names_capsule", + "F_capsule_data_type": "TES_SHROUD_names_capsule", "F_derived_name": "FNames", "F_name_scope": "names_", "PY_PyObject": "PY_Names", @@ -2398,7 +2398,7 @@ "C_impl_filename": "wrapinternal_ImplWorker1.cc", "C_name_scope": "internal_ImplWorker1_", "C_type_name": "TES_internal_ImplWorker1", - "F_capsule_data_type": "SHROUD_implworker1_capsule", + "F_capsule_data_type": "TES_SHROUD_implworker1_capsule", "F_derived_name": "implworker1", "F_name_scope": "implworker1_", "class_scope": "ImplWorker1::", @@ -2453,7 +2453,7 @@ "C_impl_filename": "wrapstd_vector_int.cc", "C_name_scope": "std_Vvv1_", "C_type_name": "TES_std_Vvv1", - "F_capsule_data_type": "SHROUD_vvv1_capsule", + "F_capsule_data_type": "TES_SHROUD_vvv1_capsule", "F_derived_name": "FFvvv1", "F_name_scope": "vvv1_", "PY_PyObject": "PY_Vvv1", @@ -2540,7 +2540,7 @@ "C_impl_filename": "wrapstd_vector_double.cc", "C_name_scope": "std_vector_double_", "C_type_name": "TES_std_vector_double", - "F_capsule_data_type": "SHROUD_vector_double_capsule", + "F_capsule_data_type": "TES_SHROUD_vector_double_capsule", "F_derived_name": "vector_double", "F_name_scope": "vector_double_", "PY_PyObject": "PY_vector_double", @@ -2627,7 +2627,7 @@ "C_impl_filename": "wrapstd_vector_instantiation5.cc", "C_name_scope": "std_vector_instantiation5_", "C_type_name": "TES_std_vector_instantiation5", - "F_capsule_data_type": "SHROUD_vector_instantiation5_capsule", + "F_capsule_data_type": "TES_SHROUD_vector_instantiation5_capsule", "F_derived_name": "vector_instantiation5", "F_name_scope": "vector_instantiation5_", "PY_PyObject": "PY_vector_instantiation5", @@ -2715,7 +2715,7 @@ "C_impl_filename": "wrapstd_vector_instantiation3.cc", "C_name_scope": "std_vector_instantiation3_", "C_type_name": "TES_std_vector_instantiation3", - "F_capsule_data_type": "SHROUD_vector_instantiation3_capsule", + "F_capsule_data_type": "TES_SHROUD_vector_instantiation3_capsule", "F_derived_name": "vector_instantiation3", "F_name_scope": "vector_instantiation3_", "PY_PyObject": "PY_vector_instantiation3", @@ -2828,7 +2828,7 @@ "C_impl_filename": "wrapCAPI_Class1.cc", "C_name_scope": "capi_class1_", "C_type_name": "TES_capi_class1", - "F_capsule_data_type": "SHROUD_class1_capsule", + "F_capsule_data_type": "TES_SHROUD_class1_capsule", "F_derived_name": "class1", "F_name_scope": "class1_", "class_scope": "Class1::", diff --git a/regression/reference/names/testnames_types.yaml b/regression/reference/names/testnames_types.yaml index c7e790a64..4a6ccf842 100644 --- a/regression/reference/names/testnames_types.yaml +++ b/regression/reference/names/testnames_types.yaml @@ -18,7 +18,7 @@ typemap: c_type: TES_capi_class1 f_module_name: testnames_capi_mod f_derived_type: class1 - f_capsule_data_type: SHROUD_class1_capsule + f_capsule_data_type: TES_SHROUD_class1_capsule f_to_c: "{f_var}%cxxmem" - type: Names2 fields: @@ -28,7 +28,7 @@ typemap: c_type: TES_Names2 f_module_name: top_module f_derived_type: names2 - f_capsule_data_type: SHROUD_names2_capsule + f_capsule_data_type: TES_SHROUD_names2_capsule f_to_c: "{f_var}%cxxmem" - namespace: internal declarations: internal @@ -40,7 +40,7 @@ typemap: c_type: TES_internal_ImplWorker1 f_module_name: testnames_internal_mod f_derived_type: implworker1 - f_capsule_data_type: SHROUD_implworker1_capsule + f_capsule_data_type: TES_SHROUD_implworker1_capsule f_to_c: "{f_var}%cxxmem" - namespace: ns0 declarations: ns0 @@ -52,7 +52,7 @@ typemap: c_type: TES_ns0_Names f_module_name: name_module f_derived_type: FNames - f_capsule_data_type: SHROUD_names_capsule + f_capsule_data_type: TES_SHROUD_names_capsule f_to_c: "{f_var}%cxxmem" - namespace: std declarations: std @@ -64,7 +64,7 @@ typemap: c_type: TES_std_Vvv1 f_module_name: testnames_std_mod f_derived_type: FFvvv1 - f_capsule_data_type: SHROUD_vvv1_capsule + f_capsule_data_type: TES_SHROUD_vvv1_capsule f_to_c: "{f_var}%cxxmem" - type: vector_double fields: @@ -74,7 +74,7 @@ typemap: c_type: TES_std_vector_double f_module_name: testnames_std_mod f_derived_type: vector_double - f_capsule_data_type: SHROUD_vector_double_capsule + f_capsule_data_type: TES_SHROUD_vector_double_capsule f_to_c: "{f_var}%cxxmem" - type: vector_instantiation3 fields: @@ -84,7 +84,7 @@ typemap: c_type: TES_std_vector_instantiation3 f_module_name: testnames_std_mod f_derived_type: vector_instantiation3 - f_capsule_data_type: SHROUD_vector_instantiation3_capsule + f_capsule_data_type: TES_SHROUD_vector_instantiation3_capsule f_to_c: "{f_var}%cxxmem" - type: vector_instantiation5 fields: @@ -94,7 +94,7 @@ typemap: c_type: TES_std_vector_instantiation5 f_module_name: testnames_std_mod f_derived_type: vector_instantiation5 - f_capsule_data_type: SHROUD_vector_instantiation5_capsule + f_capsule_data_type: TES_SHROUD_vector_instantiation5_capsule f_to_c: "{f_var}%cxxmem" - type: twoTs_0 fields: @@ -104,7 +104,7 @@ typemap: c_type: TES_twoTs_0 f_module_name: top_module f_derived_type: twots_0 - f_capsule_data_type: SHROUD_twots_0_capsule + f_capsule_data_type: TES_SHROUD_twots_0_capsule f_to_c: "{f_var}%cxxmem" - type: twoTs_instantiation4 fields: @@ -114,5 +114,5 @@ typemap: c_type: TES_twoTs_instantiation4 f_module_name: top_module f_derived_type: twots_instantiation4 - f_capsule_data_type: SHROUD_twots_instantiation4_capsule + f_capsule_data_type: TES_SHROUD_twots_instantiation4_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/names/top.f b/regression/reference/names/top.f index f242ad7f2..ea308cb5c 100644 --- a/regression/reference/names/top.f +++ b/regression/reference/names/top.f @@ -26,13 +26,13 @@ module top_module integer(C_INT), parameter :: blue = 1 integer(C_INT), parameter :: white = 2 - type, bind(C) :: SHROUD_names2_capsule + type, bind(C) :: TES_SHROUD_names2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_names2_capsule + end type TES_SHROUD_names2_capsule type names2 - type(SHROUD_names2_capsule) :: cxxmem + type(TES_SHROUD_names2_capsule) :: cxxmem ! splicer begin class.Names2.component_part ! splicer end class.Names2.component_part contains @@ -43,13 +43,13 @@ module top_module ! splicer end class.Names2.type_bound_procedure_part end type names2 - type, bind(C) :: SHROUD_twots_0_capsule + type, bind(C) :: TES_SHROUD_twots_0_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_twots_0_capsule + end type TES_SHROUD_twots_0_capsule type twots_0 - type(SHROUD_twots_0_capsule) :: cxxmem + type(TES_SHROUD_twots_0_capsule) :: cxxmem ! splicer begin class.twoTs_0.component_part ! splicer end class.twoTs_0.component_part contains @@ -60,13 +60,13 @@ module top_module ! splicer end class.twoTs_0.type_bound_procedure_part end type twots_0 - type, bind(C) :: SHROUD_twots_instantiation4_capsule + type, bind(C) :: TES_SHROUD_twots_instantiation4_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_twots_instantiation4_capsule + end type TES_SHROUD_twots_instantiation4_capsule type twots_instantiation4 - type(SHROUD_twots_instantiation4_capsule) :: cxxmem + type(TES_SHROUD_twots_instantiation4_capsule) :: cxxmem ! splicer begin class.twoTs_instantiation4.component_part ! splicer end class.twoTs_instantiation4.component_part contains diff --git a/regression/reference/names/wrapftestnames_CAPI.F b/regression/reference/names/wrapftestnames_CAPI.F index 7b29204a8..4829e7914 100644 --- a/regression/reference/names/wrapftestnames_CAPI.F +++ b/regression/reference/names/wrapftestnames_CAPI.F @@ -21,13 +21,13 @@ module testnames_capi_mod ! splicer begin namespace.CAPI.module_top ! splicer end namespace.CAPI.module_top - type, bind(C) :: SHROUD_class1_capsule + type, bind(C) :: TES_SHROUD_class1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class1_capsule + end type TES_SHROUD_class1_capsule type class1 - type(SHROUD_class1_capsule) :: cxxmem + type(TES_SHROUD_class1_capsule) :: cxxmem ! splicer begin namespace.CAPI.class.Class1.component_part ! splicer end namespace.CAPI.class.Class1.component_part contains @@ -55,9 +55,9 @@ module testnames_capi_mod ! Match: c_default subroutine c_class1_member1(self) & bind(C, name="TES_capi_class1_member1") - import :: SHROUD_class1_capsule + import :: TES_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(TES_SHROUD_class1_capsule), intent(IN) :: self end subroutine c_class1_member1 ! splicer begin namespace.CAPI.class.Class1.additional_interfaces diff --git a/regression/reference/names/wrapftestnames_std.F b/regression/reference/names/wrapftestnames_std.F index ab5d130b0..0e8085cb6 100644 --- a/regression/reference/names/wrapftestnames_std.F +++ b/regression/reference/names/wrapftestnames_std.F @@ -21,13 +21,13 @@ module testnames_std_mod ! splicer begin namespace.std.module_top ! splicer end namespace.std.module_top - type, bind(C) :: SHROUD_vvv1_capsule + type, bind(C) :: TES_SHROUD_vvv1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_vvv1_capsule + end type TES_SHROUD_vvv1_capsule type FFvvv1 - type(SHROUD_vvv1_capsule) :: cxxmem + type(TES_SHROUD_vvv1_capsule) :: cxxmem ! splicer begin namespace.std.class.Vvv1.component_part ! splicer end namespace.std.class.Vvv1.component_part contains @@ -38,13 +38,13 @@ module testnames_std_mod ! splicer end namespace.std.class.Vvv1.type_bound_procedure_part end type FFvvv1 - type, bind(C) :: SHROUD_vector_double_capsule + type, bind(C) :: TES_SHROUD_vector_double_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_vector_double_capsule + end type TES_SHROUD_vector_double_capsule type vector_double - type(SHROUD_vector_double_capsule) :: cxxmem + type(TES_SHROUD_vector_double_capsule) :: cxxmem ! splicer begin namespace.std.class.vector_double.component_part ! splicer end namespace.std.class.vector_double.component_part contains @@ -55,13 +55,13 @@ module testnames_std_mod ! splicer end namespace.std.class.vector_double.type_bound_procedure_part end type vector_double - type, bind(C) :: SHROUD_vector_instantiation5_capsule + type, bind(C) :: TES_SHROUD_vector_instantiation5_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_vector_instantiation5_capsule + end type TES_SHROUD_vector_instantiation5_capsule type vector_instantiation5 - type(SHROUD_vector_instantiation5_capsule) :: cxxmem + type(TES_SHROUD_vector_instantiation5_capsule) :: cxxmem ! splicer begin namespace.std.class.vector_instantiation5.component_part ! splicer end namespace.std.class.vector_instantiation5.component_part contains @@ -72,13 +72,13 @@ module testnames_std_mod ! splicer end namespace.std.class.vector_instantiation5.type_bound_procedure_part end type vector_instantiation5 - type, bind(C) :: SHROUD_vector_instantiation3_capsule + type, bind(C) :: TES_SHROUD_vector_instantiation3_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_vector_instantiation3_capsule + end type TES_SHROUD_vector_instantiation3_capsule type vector_instantiation3 - type(SHROUD_vector_instantiation3_capsule) :: cxxmem + type(TES_SHROUD_vector_instantiation3_capsule) :: cxxmem ! splicer begin namespace.std.class.vector_instantiation3.component_part ! splicer end namespace.std.class.vector_instantiation3.component_part contains diff --git a/regression/reference/namespace/namespace.json b/regression/reference/namespace/namespace.json index 6d5d4b3d8..12fb8b9bf 100644 --- a/regression/reference/namespace/namespace.json +++ b/regression/reference/namespace/namespace.json @@ -324,7 +324,7 @@ "C_impl_filename": "wrapouter_Cstruct1.cpp", "C_name_scope": "outer_Cstruct1_", "C_type_name": "NS_cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "NS_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -609,7 +609,7 @@ "C_impl_filename": "wrapnswork_ClassWork.cpp", "C_name_scope": "nswork_ClassWork_", "C_type_name": "NS_nswork_ClassWork", - "F_capsule_data_type": "SHROUD_nswork_classwork_capsule", + "F_capsule_data_type": "NS_SHROUD_nswork_classwork_capsule", "F_derived_name": "classwork", "F_name_scope": "nswork_classwork_", "PY_PyObject": "PY_ClassWork", diff --git a/regression/reference/namespace/ns_types.yaml b/regression/reference/namespace/ns_types.yaml index 3cb9e1fef..a3cbe8142 100644 --- a/regression/reference/namespace/ns_types.yaml +++ b/regression/reference/namespace/ns_types.yaml @@ -18,7 +18,7 @@ typemap: c_type: NS_nswork_ClassWork f_module_name: ns_nswork_mod f_derived_type: classwork - f_capsule_data_type: SHROUD_nswork_classwork_capsule + f_capsule_data_type: NS_SHROUD_nswork_classwork_capsule f_to_c: "{f_var}%cxxmem" - namespace: outer declarations: outer diff --git a/regression/reference/namespace/wrapfns.f b/regression/reference/namespace/wrapfns.f index 0c9dd05ed..801ea51d4 100644 --- a/regression/reference/namespace/wrapfns.f +++ b/regression/reference/namespace/wrapfns.f @@ -28,7 +28,7 @@ module ns_mod end type SHROUD_capsule_data ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: NS_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -42,19 +42,19 @@ module ns_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type NS_SHROUD_array ! enum upper::Color integer(C_INT), parameter :: upper_error = 0 integer(C_INT), parameter :: upper_warn = 1 - type, bind(C) :: SHROUD_nswork_classwork_capsule + type, bind(C) :: NS_SHROUD_nswork_classwork_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_nswork_classwork_capsule + end type NS_SHROUD_nswork_classwork_capsule type classwork - type(SHROUD_nswork_classwork_capsule) :: cxxmem + type(NS_SHROUD_nswork_classwork_capsule) :: cxxmem ! splicer begin namespace.outer.class.ClassWork.component_part ! splicer end namespace.outer.class.ClassWork.component_part contains @@ -97,9 +97,9 @@ end function c_last_function_called ! Match: c_string_result_buf_allocatable subroutine c_last_function_called_bufferify(DSHF_rv) & bind(C, name="NS_last_function_called_bufferify") - import :: SHROUD_array + import :: NS_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(NS_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_last_function_called_bufferify ! ---------------------------------------- @@ -124,8 +124,8 @@ end subroutine one subroutine NS_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="NS_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import NS_SHROUD_array + type(NS_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine NS_SHROUD_copy_string_and_free @@ -149,7 +149,7 @@ end subroutine NS_SHROUD_copy_string_and_free ! Match: c_string_result_buf_allocatable function last_function_called() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(NS_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.last_function_called call c_last_function_called_bufferify(DSHF_rv) diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index ab92439e8..4bdef3ee4 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -38,7 +38,7 @@ ##### start array_context derived_type ! helper array_context -type, bind(C) :: SHROUD_array +type, bind(C) :: LIB_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -52,7 +52,7 @@ ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 -end type SHROUD_array +end type LIB_SHROUD_array ##### end array_context derived_type ##### start capsule_data_helper derived_type @@ -81,13 +81,13 @@ end subroutine LIB_SHROUD_capsule_dtor ##### start capsule_helper derived_type ! helper capsule_helper -type SHROUD_capsule +type :: LIB_SHROUD_capsule private type(SHROUD_capsule_data) :: mem contains final :: SHROUD_capsule_final procedure :: delete => SHROUD_capsule_delete -end type SHROUD_capsule +end type LIB_SHROUD_capsule ##### end capsule_helper derived_type ##### start capsule_helper source @@ -95,12 +95,12 @@ end subroutine LIB_SHROUD_capsule_dtor ! helper capsule_helper ! finalize a static SHROUD_capsule_data subroutine SHROUD_capsule_final(cap) - type(SHROUD_capsule), intent(INOUT) :: cap + type(LIB_SHROUD_capsule), intent(INOUT) :: cap call LIB_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_final subroutine SHROUD_capsule_delete(cap) - class(SHROUD_capsule) :: cap + class(LIB_SHROUD_capsule) :: cap call LIB_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_delete ##### end capsule_helper source @@ -113,8 +113,8 @@ end subroutine SHROUD_capsule_delete subroutine LIB_SHROUD_copy_array_double(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_DOUBLE, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context real(C_DOUBLE), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_double @@ -129,8 +129,8 @@ end subroutine LIB_SHROUD_copy_array_double subroutine LIB_SHROUD_copy_array_float(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_FLOAT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context real(C_FLOAT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_float @@ -145,8 +145,8 @@ end subroutine LIB_SHROUD_copy_array_float subroutine LIB_SHROUD_copy_array_int(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_int @@ -161,8 +161,8 @@ end subroutine LIB_SHROUD_copy_array_int subroutine LIB_SHROUD_copy_array_int16_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT16_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT16_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_int16_t @@ -177,8 +177,8 @@ end subroutine LIB_SHROUD_copy_array_int16_t subroutine LIB_SHROUD_copy_array_int32_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT32_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT32_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_int32_t @@ -193,8 +193,8 @@ end subroutine LIB_SHROUD_copy_array_int32_t subroutine LIB_SHROUD_copy_array_int64_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT64_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT64_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_int64_t @@ -209,8 +209,8 @@ end subroutine LIB_SHROUD_copy_array_int64_t subroutine LIB_SHROUD_copy_array_int8_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT8_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT8_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_int8_t @@ -225,8 +225,8 @@ end subroutine LIB_SHROUD_copy_array_int8_t subroutine LIB_SHROUD_copy_array_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_long @@ -241,8 +241,8 @@ end subroutine LIB_SHROUD_copy_array_long subroutine LIB_SHROUD_copy_array_long_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG_LONG, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_LONG_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_long_long @@ -257,8 +257,8 @@ end subroutine LIB_SHROUD_copy_array_long_long subroutine LIB_SHROUD_copy_array_short(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_SHORT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_SHORT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_short @@ -273,8 +273,8 @@ end subroutine LIB_SHROUD_copy_array_short subroutine LIB_SHROUD_copy_array_size_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_SIZE_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_SIZE_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_size_t @@ -289,8 +289,8 @@ end subroutine LIB_SHROUD_copy_array_size_t subroutine LIB_SHROUD_copy_array_uint16_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT16_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT16_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_uint16_t @@ -305,8 +305,8 @@ end subroutine LIB_SHROUD_copy_array_uint16_t subroutine LIB_SHROUD_copy_array_uint32_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT32_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT32_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_uint32_t @@ -321,8 +321,8 @@ end subroutine LIB_SHROUD_copy_array_uint32_t subroutine LIB_SHROUD_copy_array_uint64_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT64_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT64_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_uint64_t @@ -337,8 +337,8 @@ end subroutine LIB_SHROUD_copy_array_uint64_t subroutine LIB_SHROUD_copy_array_uint8_t(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT8_T, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT8_T), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_uint8_t @@ -353,8 +353,8 @@ end subroutine LIB_SHROUD_copy_array_uint8_t subroutine LIB_SHROUD_copy_array_unsigned_int(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_unsigned_int @@ -369,8 +369,8 @@ end subroutine LIB_SHROUD_copy_array_unsigned_int subroutine LIB_SHROUD_copy_array_unsigned_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_unsigned_long @@ -385,8 +385,8 @@ end subroutine LIB_SHROUD_copy_array_unsigned_long subroutine LIB_SHROUD_copy_array_unsigned_long_long(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_LONG_LONG, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_LONG_LONG), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_unsigned_long_long @@ -401,8 +401,8 @@ end subroutine LIB_SHROUD_copy_array_unsigned_long_long subroutine LIB_SHROUD_copy_array_unsigned_short(context, c_var, c_var_size) & bind(C, name="LIB_ShroudCopyArray") use iso_c_binding, only : C_SHORT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context integer(C_SHORT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_array_unsigned_short @@ -417,8 +417,8 @@ end subroutine LIB_SHROUD_copy_array_unsigned_short subroutine LIB_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="LIB_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine LIB_SHROUD_copy_string_and_free diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index 2b8897593..f3e52b2a5 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -39,11 +39,11 @@ "F_C_pure_clause": "", "F_C_result_clause": "", "F_arg_c_call": "", - "F_array_type": "SHROUD_array", + "F_array_type": "LIB_SHROUD_array", "F_capsule_data_type": "SHROUD_capsule_data", "F_capsule_delete_function": "SHROUD_capsule_delete", "F_capsule_final_function": "SHROUD_capsule_final", - "F_capsule_type": "SHROUD_capsule", + "F_capsule_type": "LIB_SHROUD_capsule", "F_derived_member": "cxxmem", "F_filename_suffix": "f", "F_impl_filename": "wrapflibrary.f", @@ -145,8 +145,10 @@ "F_C_name_template": "{F_C_prefix}{F_name_scope}{underscore_name}{function_suffix}{template_suffix}", "F_abstract_interface_argument_template": "arg{index}", "F_abstract_interface_subprogram_template": "{underscore_name}_{argname}", + "F_array_type_template": "{C_prefix}SHROUD_array", "F_auto_reference_count": false, - "F_capsule_data_type_class_template": "SHROUD_{F_name_scope}capsule", + "F_capsule_data_type_class_template": "{C_prefix}SHROUD_{F_name_scope}capsule", + "F_capsule_type_template": "{C_prefix}SHROUD_capsule", "F_create_bufferify_function": true, "F_create_generic": true, "F_enum_member_template": "{F_name_scope}{enum_member_lower}", diff --git a/regression/reference/ownership/ownership.json b/regression/reference/ownership/ownership.json index eda7a222c..91c3368b3 100644 --- a/regression/reference/ownership/ownership.json +++ b/regression/reference/ownership/ownership.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapClass1.cpp", "C_name_scope": "Class1_", "C_type_name": "OWN_Class1", - "F_capsule_data_type": "SHROUD_class1_capsule", + "F_capsule_data_type": "OWN_SHROUD_class1_capsule", "F_derived_name": "class1", "F_name_scope": "class1_", "LUA_class_reg": "l_Class1_Reg", diff --git a/regression/reference/ownership/ownership_types.yaml b/regression/reference/ownership/ownership_types.yaml index f6599937e..e9606279e 100644 --- a/regression/reference/ownership/ownership_types.yaml +++ b/regression/reference/ownership/ownership_types.yaml @@ -16,5 +16,5 @@ typemap: c_type: OWN_Class1 f_module_name: ownership_mod f_derived_type: class1 - f_capsule_data_type: SHROUD_class1_capsule + f_capsule_data_type: OWN_SHROUD_class1_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/ownership/wrapfownership.f b/regression/reference/ownership/wrapfownership.f index 8b6e00d92..a468d7cb5 100644 --- a/regression/reference/ownership/wrapfownership.f +++ b/regression/reference/ownership/wrapfownership.f @@ -28,7 +28,7 @@ module ownership_mod end type SHROUD_capsule_data ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: OWN_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -42,24 +42,24 @@ module ownership_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type OWN_SHROUD_array ! helper capsule_helper - type SHROUD_capsule + type :: OWN_SHROUD_capsule private type(SHROUD_capsule_data) :: mem contains final :: SHROUD_capsule_final procedure :: delete => SHROUD_capsule_delete - end type SHROUD_capsule + end type OWN_SHROUD_capsule - type, bind(C) :: SHROUD_class1_capsule + type, bind(C) :: OWN_SHROUD_class1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class1_capsule + end type OWN_SHROUD_class1_capsule type class1 - type(SHROUD_class1_capsule) :: cxxmem + type(OWN_SHROUD_class1_capsule) :: cxxmem ! splicer begin class.Class1.component_part ! splicer end class.Class1.component_part contains @@ -88,9 +88,9 @@ module ownership_mod ! Match: c_default subroutine c_class1_dtor(self) & bind(C, name="OWN_Class1_dtor") - import :: SHROUD_class1_capsule + import :: OWN_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(OWN_SHROUD_class1_capsule), intent(IN) :: self end subroutine c_class1_dtor ! ---------------------------------------- @@ -101,9 +101,9 @@ function c_class1_get_flag(self) & result(SHT_rv) & bind(C, name="OWN_Class1_get_flag") use iso_c_binding, only : C_INT - import :: SHROUD_class1_capsule + import :: OWN_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(IN) :: self + type(OWN_SHROUD_class1_capsule), intent(IN) :: self integer(C_INT) :: SHT_rv end function c_class1_get_flag @@ -191,9 +191,9 @@ function c_return_int_ptr_dim_pointer_bufferify(DSHC_rv, len) & result(SHT_rv) & bind(C, name="OWN_return_int_ptr_dim_pointer_bufferify") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_array + import :: OWN_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(OWN_SHROUD_array), intent(INOUT) :: DSHC_rv integer(C_INT), intent(OUT) :: len type(C_PTR) SHT_rv end function c_return_int_ptr_dim_pointer_bufferify @@ -226,9 +226,9 @@ function c_return_int_ptr_dim_alloc_bufferify(DSHC_rv, len) & result(SHT_rv) & bind(C, name="OWN_return_int_ptr_dim_alloc_bufferify") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_array + import :: OWN_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(OWN_SHROUD_array), intent(INOUT) :: DSHC_rv integer(C_INT), intent(OUT) :: len type(C_PTR) SHT_rv end function c_return_int_ptr_dim_alloc_bufferify @@ -261,9 +261,9 @@ function c_return_int_ptr_dim_default_bufferify(DSHC_rv, len) & result(SHT_rv) & bind(C, name="OWN_return_int_ptr_dim_default_bufferify") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_array + import :: OWN_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(OWN_SHROUD_array), intent(INOUT) :: DSHC_rv integer(C_INT), intent(OUT) :: len type(C_PTR) SHT_rv end function c_return_int_ptr_dim_default_bufferify @@ -314,9 +314,9 @@ function c_return_int_ptr_dim_pointer_new_bufferify(DSHC_rv, & result(SHT_rv) & bind(C, name="OWN_return_int_ptr_dim_pointer_new_bufferify") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_array + import :: OWN_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(OWN_SHROUD_array), intent(INOUT) :: DSHC_rv integer(C_INT), intent(OUT) :: len type(C_PTR) SHT_rv end function c_return_int_ptr_dim_pointer_new_bufferify @@ -367,9 +367,9 @@ function c_return_int_ptr_dim_default_new_bufferify(DSHC_rv, & result(SHT_rv) & bind(C, name="OWN_return_int_ptr_dim_default_new_bufferify") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_array + import :: OWN_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(OWN_SHROUD_array), intent(INOUT) :: DSHC_rv integer(C_INT), intent(OUT) :: len type(C_PTR) SHT_rv end function c_return_int_ptr_dim_default_new_bufferify @@ -397,9 +397,9 @@ function c_get_class_static(SHT_crv) & result(SHT_rv) & bind(C, name="OWN_get_class_static") use iso_c_binding, only : C_PTR - import :: SHROUD_class1_capsule + import :: OWN_SHROUD_class1_capsule implicit none - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(OWN_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_get_class_static @@ -415,10 +415,10 @@ function c_get_class_new(flag, SHT_crv) & result(SHT_rv) & bind(C, name="OWN_get_class_new") use iso_c_binding, only : C_INT, C_PTR - import :: SHROUD_class1_capsule + import :: OWN_SHROUD_class1_capsule implicit none integer(C_INT), value, intent(IN) :: flag - type(SHROUD_class1_capsule), intent(OUT) :: SHT_crv + type(OWN_SHROUD_class1_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_get_class_new @@ -443,8 +443,8 @@ end subroutine OWN_SHROUD_capsule_dtor subroutine OWN_SHROUD_copy_array_int(context, c_var, c_var_size) & bind(C, name="OWN_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import OWN_SHROUD_array + type(OWN_SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine OWN_SHROUD_copy_array_int @@ -541,7 +541,7 @@ end function return_int_ptr_pointer function return_int_ptr_dim_pointer() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(OWN_SHROUD_array) :: DSHC_rv integer(C_INT) :: len integer(C_INT), pointer :: SHT_rv(:) ! splicer begin function.return_int_ptr_dim_pointer @@ -567,7 +567,7 @@ end function return_int_ptr_dim_pointer function return_int_ptr_dim_alloc() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR - type(SHROUD_array) :: DSHC_rv + type(OWN_SHROUD_array) :: DSHC_rv integer(C_INT) :: len integer(C_INT), allocatable :: SHT_rv(:) ! splicer begin function.return_int_ptr_dim_alloc @@ -594,7 +594,7 @@ end function return_int_ptr_dim_alloc function return_int_ptr_dim_default() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(OWN_SHROUD_array) :: DSHC_rv integer(C_INT) :: len integer(C_INT), pointer :: SHT_rv(:) ! splicer begin function.return_int_ptr_dim_default @@ -620,10 +620,10 @@ end function return_int_ptr_dim_default function return_int_ptr_dim_pointer_new(Crv) & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(OWN_SHROUD_array) :: DSHC_rv integer(C_INT) :: len integer(C_INT), pointer :: SHT_rv(:) - type(SHROUD_capsule), intent(OUT) :: Crv + type(OWN_SHROUD_capsule), intent(OUT) :: Crv ! splicer begin function.return_int_ptr_dim_pointer_new type(C_PTR) :: SHT_ptr SHT_ptr = c_return_int_ptr_dim_pointer_new_bufferify(DSHC_rv, & @@ -649,10 +649,10 @@ end function return_int_ptr_dim_pointer_new function return_int_ptr_dim_default_new(Crv) & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(OWN_SHROUD_array) :: DSHC_rv integer(C_INT) :: len integer(C_INT), pointer :: SHT_rv(:) - type(SHROUD_capsule), intent(OUT) :: Crv + type(OWN_SHROUD_capsule), intent(OUT) :: Crv ! splicer begin function.return_int_ptr_dim_default_new type(C_PTR) :: SHT_ptr SHT_ptr = c_return_int_ptr_dim_default_new_bufferify(DSHC_rv, & @@ -735,12 +735,12 @@ end function class1_ne ! helper capsule_helper ! finalize a static SHROUD_capsule_data subroutine SHROUD_capsule_final(cap) - type(SHROUD_capsule), intent(INOUT) :: cap + type(OWN_SHROUD_capsule), intent(INOUT) :: cap call OWN_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_final subroutine SHROUD_capsule_delete(cap) - class(SHROUD_capsule) :: cap + class(OWN_SHROUD_capsule) :: cap call OWN_SHROUD_capsule_dtor(cap%mem) end subroutine SHROUD_capsule_delete diff --git a/regression/reference/pointers-c/wrapfpointers.f b/regression/reference/pointers-c/wrapfpointers.f index 92bfbc95a..1440dc1fb 100644 --- a/regression/reference/pointers-c/wrapfpointers.f +++ b/regression/reference/pointers-c/wrapfpointers.f @@ -29,7 +29,7 @@ module pointers_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: POI_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module pointers_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type POI_SHROUD_array ! end array_context ! ---------------------------------------- @@ -516,9 +516,9 @@ end subroutine c_get_ptr_to_scalar interface subroutine c_get_ptr_to_scalar_bufferify(Dnitems) & bind(C, name="POI_get_ptr_to_scalar_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_ptr_to_scalar_bufferify end interface ! end c_get_ptr_to_scalar_bufferify @@ -554,9 +554,9 @@ end subroutine c_get_ptr_to_fixed_array interface subroutine c_get_ptr_to_fixed_array_bufferify(Dcount) & bind(C, name="POI_get_ptr_to_fixed_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_ptr_to_fixed_array_bufferify end interface ! end c_get_ptr_to_fixed_array_bufferify @@ -602,9 +602,9 @@ end subroutine c_get_ptr_to_dynamic_array subroutine c_get_ptr_to_dynamic_array_bufferify(Dcount, ncount) & bind(C, name="POI_get_ptr_to_dynamic_array_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount integer(C_INT), intent(OUT) :: ncount end subroutine c_get_ptr_to_dynamic_array_bufferify end interface @@ -641,9 +641,9 @@ end subroutine c_get_ptr_to_func_array interface subroutine c_get_ptr_to_func_array_bufferify(Dcount) & bind(C, name="POI_get_ptr_to_func_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_ptr_to_func_array_bufferify end interface ! end c_get_ptr_to_func_array_bufferify @@ -679,9 +679,9 @@ end subroutine c_get_ptr_to_const_scalar interface subroutine c_get_ptr_to_const_scalar_bufferify(Dnitems) & bind(C, name="POI_get_ptr_to_const_scalar_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_ptr_to_const_scalar_bufferify end interface ! end c_get_ptr_to_const_scalar_bufferify @@ -717,9 +717,9 @@ end subroutine c_get_ptr_to_fixed_const_array interface subroutine c_get_ptr_to_fixed_const_array_bufferify(Dcount) & bind(C, name="POI_get_ptr_to_fixed_const_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_ptr_to_fixed_const_array_bufferify end interface ! end c_get_ptr_to_fixed_const_array_bufferify @@ -766,9 +766,9 @@ subroutine c_get_ptr_to_dynamic_const_array_bufferify(Dcount, & ncount) & bind(C, name="POI_get_ptr_to_dynamic_const_array_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount integer(C_INT), intent(OUT) :: ncount end subroutine c_get_ptr_to_dynamic_const_array_bufferify end interface @@ -805,9 +805,9 @@ end subroutine c_get_raw_ptr_to_scalar interface subroutine c_get_raw_ptr_to_scalar_bufferify(Dnitems) & bind(C, name="POI_get_raw_ptr_to_scalar_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_raw_ptr_to_scalar_bufferify end interface ! end c_get_raw_ptr_to_scalar_bufferify @@ -843,9 +843,9 @@ end subroutine c_get_raw_ptr_to_scalar_force interface subroutine c_get_raw_ptr_to_scalar_force_bufferify(Dnitems) & bind(C, name="POI_get_raw_ptr_to_scalar_force_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_raw_ptr_to_scalar_force_bufferify end interface ! end c_get_raw_ptr_to_scalar_force_bufferify @@ -881,9 +881,9 @@ end subroutine c_get_raw_ptr_to_fixed_array interface subroutine c_get_raw_ptr_to_fixed_array_bufferify(Dcount) & bind(C, name="POI_get_raw_ptr_to_fixed_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_raw_ptr_to_fixed_array_bufferify end interface ! end c_get_raw_ptr_to_fixed_array_bufferify @@ -919,9 +919,9 @@ end subroutine c_get_raw_ptr_to_fixed_array_force interface subroutine c_get_raw_ptr_to_fixed_array_force_bufferify(Dcount) & bind(C, name="POI_get_raw_ptr_to_fixed_array_force_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_raw_ptr_to_fixed_array_force_bufferify end interface ! end c_get_raw_ptr_to_fixed_array_force_bufferify @@ -1086,9 +1086,9 @@ function c_return_int_ptr_to_fixed_array_bufferify(DSHC_rv) & result(SHT_rv) & bind(C, name="POI_return_int_ptr_to_fixed_array_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(POI_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_return_int_ptr_to_fixed_array_bufferify end interface @@ -1136,9 +1136,9 @@ function c_return_int_ptr_to_fixed_const_array_bufferify( & result(SHT_rv) & bind(C, name="POI_return_int_ptr_to_fixed_const_array_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(POI_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_return_int_ptr_to_fixed_const_array_bufferify end interface @@ -1485,7 +1485,7 @@ end function accept_char_array_in subroutine get_ptr_to_scalar(nitems) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: nitems - type(SHROUD_array) :: Dnitems + type(POI_SHROUD_array) :: Dnitems ! splicer begin function.get_ptr_to_scalar call c_get_ptr_to_scalar_bufferify(Dnitems) call c_f_pointer(Dnitems%base_addr, nitems) @@ -1514,7 +1514,7 @@ end subroutine get_ptr_to_scalar subroutine get_ptr_to_fixed_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount ! splicer begin function.get_ptr_to_fixed_array call c_get_ptr_to_fixed_array_bufferify(Dcount) call c_f_pointer(Dcount%base_addr, count, Dcount%shape(1:1)) @@ -1550,7 +1550,7 @@ end subroutine get_ptr_to_fixed_array subroutine get_ptr_to_dynamic_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount integer(C_INT) :: ncount ! splicer begin function.get_ptr_to_dynamic_array call c_get_ptr_to_dynamic_array_bufferify(Dcount, ncount) @@ -1582,7 +1582,7 @@ end subroutine get_ptr_to_dynamic_array subroutine get_ptr_to_func_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount ! splicer begin function.get_ptr_to_func_array call c_get_ptr_to_func_array_bufferify(Dcount) call c_f_pointer(Dcount%base_addr, count, Dcount%shape(1:1)) @@ -1608,7 +1608,7 @@ end subroutine get_ptr_to_func_array subroutine get_ptr_to_const_scalar(nitems) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: nitems - type(SHROUD_array) :: Dnitems + type(POI_SHROUD_array) :: Dnitems ! splicer begin function.get_ptr_to_const_scalar call c_get_ptr_to_const_scalar_bufferify(Dnitems) call c_f_pointer(Dnitems%base_addr, nitems) @@ -1634,7 +1634,7 @@ end subroutine get_ptr_to_const_scalar subroutine get_ptr_to_fixed_const_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount ! splicer begin function.get_ptr_to_fixed_const_array call c_get_ptr_to_fixed_const_array_bufferify(Dcount) call c_f_pointer(Dcount%base_addr, count, Dcount%shape(1:1)) @@ -1666,7 +1666,7 @@ end subroutine get_ptr_to_fixed_const_array subroutine get_ptr_to_dynamic_const_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount integer(C_INT) :: ncount ! splicer begin function.get_ptr_to_dynamic_const_array call c_get_ptr_to_dynamic_const_array_bufferify(Dcount, ncount) @@ -1696,7 +1696,7 @@ subroutine get_raw_ptr_to_scalar(nitems) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: nitems ! splicer begin function.get_raw_ptr_to_scalar - type(SHROUD_array) Dnitems + type(POI_SHROUD_array) Dnitems call c_get_raw_ptr_to_scalar_bufferify(Dnitems) nitems = Dnitems%base_addr ! splicer end function.get_raw_ptr_to_scalar @@ -1724,7 +1724,7 @@ subroutine get_raw_ptr_to_scalar_force(nitems) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: nitems ! splicer begin function.get_raw_ptr_to_scalar_force - type(SHROUD_array) Dnitems + type(POI_SHROUD_array) Dnitems call c_get_raw_ptr_to_scalar_force_bufferify(Dnitems) nitems = Dnitems%base_addr ! splicer end function.get_raw_ptr_to_scalar_force @@ -1754,7 +1754,7 @@ subroutine get_raw_ptr_to_fixed_array(count) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: count ! splicer begin function.get_raw_ptr_to_fixed_array - type(SHROUD_array) Dcount + type(POI_SHROUD_array) Dcount call c_get_raw_ptr_to_fixed_array_bufferify(Dcount) count = Dcount%base_addr ! splicer end function.get_raw_ptr_to_fixed_array @@ -1783,7 +1783,7 @@ subroutine get_raw_ptr_to_fixed_array_force(count) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: count ! splicer begin function.get_raw_ptr_to_fixed_array_force - type(SHROUD_array) Dcount + type(POI_SHROUD_array) Dcount call c_get_raw_ptr_to_fixed_array_force_bufferify(Dcount) count = Dcount%base_addr ! splicer end function.get_raw_ptr_to_fixed_array_force @@ -1871,7 +1871,7 @@ end function return_int_ptr_to_scalar function return_int_ptr_to_fixed_array() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(POI_SHROUD_array) :: DSHC_rv integer(C_INT), pointer :: SHT_rv(:) ! splicer begin function.return_int_ptr_to_fixed_array type(C_PTR) :: SHT_ptr @@ -1911,7 +1911,7 @@ end function return_int_ptr_to_const_scalar function return_int_ptr_to_fixed_const_array() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(POI_SHROUD_array) :: DSHC_rv integer(C_INT), pointer :: SHT_rv(:) ! splicer begin function.return_int_ptr_to_fixed_const_array type(C_PTR) :: SHT_ptr diff --git a/regression/reference/pointers-cxx/wrapfpointers.f b/regression/reference/pointers-cxx/wrapfpointers.f index 5d919f7d2..b8c1fd4d7 100644 --- a/regression/reference/pointers-cxx/wrapfpointers.f +++ b/regression/reference/pointers-cxx/wrapfpointers.f @@ -29,7 +29,7 @@ module pointers_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: POI_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module pointers_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type POI_SHROUD_array ! end array_context ! ---------------------------------------- @@ -516,9 +516,9 @@ end subroutine c_get_ptr_to_scalar interface subroutine c_get_ptr_to_scalar_bufferify(Dnitems) & bind(C, name="POI_get_ptr_to_scalar_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_ptr_to_scalar_bufferify end interface ! end c_get_ptr_to_scalar_bufferify @@ -554,9 +554,9 @@ end subroutine c_get_ptr_to_fixed_array interface subroutine c_get_ptr_to_fixed_array_bufferify(Dcount) & bind(C, name="POI_get_ptr_to_fixed_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_ptr_to_fixed_array_bufferify end interface ! end c_get_ptr_to_fixed_array_bufferify @@ -602,9 +602,9 @@ end subroutine c_get_ptr_to_dynamic_array subroutine c_get_ptr_to_dynamic_array_bufferify(Dcount, ncount) & bind(C, name="POI_get_ptr_to_dynamic_array_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount integer(C_INT), intent(OUT) :: ncount end subroutine c_get_ptr_to_dynamic_array_bufferify end interface @@ -641,9 +641,9 @@ end subroutine c_get_ptr_to_func_array interface subroutine c_get_ptr_to_func_array_bufferify(Dcount) & bind(C, name="POI_get_ptr_to_func_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_ptr_to_func_array_bufferify end interface ! end c_get_ptr_to_func_array_bufferify @@ -679,9 +679,9 @@ end subroutine c_get_ptr_to_const_scalar interface subroutine c_get_ptr_to_const_scalar_bufferify(Dnitems) & bind(C, name="POI_get_ptr_to_const_scalar_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_ptr_to_const_scalar_bufferify end interface ! end c_get_ptr_to_const_scalar_bufferify @@ -717,9 +717,9 @@ end subroutine c_get_ptr_to_fixed_const_array interface subroutine c_get_ptr_to_fixed_const_array_bufferify(Dcount) & bind(C, name="POI_get_ptr_to_fixed_const_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_ptr_to_fixed_const_array_bufferify end interface ! end c_get_ptr_to_fixed_const_array_bufferify @@ -766,9 +766,9 @@ subroutine c_get_ptr_to_dynamic_const_array_bufferify(Dcount, & ncount) & bind(C, name="POI_get_ptr_to_dynamic_const_array_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount integer(C_INT), intent(OUT) :: ncount end subroutine c_get_ptr_to_dynamic_const_array_bufferify end interface @@ -805,9 +805,9 @@ end subroutine c_get_raw_ptr_to_scalar interface subroutine c_get_raw_ptr_to_scalar_bufferify(Dnitems) & bind(C, name="POI_get_raw_ptr_to_scalar_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_raw_ptr_to_scalar_bufferify end interface ! end c_get_raw_ptr_to_scalar_bufferify @@ -843,9 +843,9 @@ end subroutine c_get_raw_ptr_to_scalar_force interface subroutine c_get_raw_ptr_to_scalar_force_bufferify(Dnitems) & bind(C, name="POI_get_raw_ptr_to_scalar_force_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dnitems + type(POI_SHROUD_array), intent(INOUT) :: Dnitems end subroutine c_get_raw_ptr_to_scalar_force_bufferify end interface ! end c_get_raw_ptr_to_scalar_force_bufferify @@ -881,9 +881,9 @@ end subroutine c_get_raw_ptr_to_fixed_array interface subroutine c_get_raw_ptr_to_fixed_array_bufferify(Dcount) & bind(C, name="POI_get_raw_ptr_to_fixed_array_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_raw_ptr_to_fixed_array_bufferify end interface ! end c_get_raw_ptr_to_fixed_array_bufferify @@ -919,9 +919,9 @@ end subroutine c_get_raw_ptr_to_fixed_array_force interface subroutine c_get_raw_ptr_to_fixed_array_force_bufferify(Dcount) & bind(C, name="POI_get_raw_ptr_to_fixed_array_force_bufferify") - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Dcount + type(POI_SHROUD_array), intent(INOUT) :: Dcount end subroutine c_get_raw_ptr_to_fixed_array_force_bufferify end interface ! end c_get_raw_ptr_to_fixed_array_force_bufferify @@ -1086,9 +1086,9 @@ function c_return_int_ptr_to_fixed_array_bufferify(DSHC_rv) & result(SHT_rv) & bind(C, name="POI_return_int_ptr_to_fixed_array_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(POI_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_return_int_ptr_to_fixed_array_bufferify end interface @@ -1136,9 +1136,9 @@ function c_return_int_ptr_to_fixed_const_array_bufferify( & result(SHT_rv) & bind(C, name="POI_return_int_ptr_to_fixed_const_array_bufferify") use iso_c_binding, only : C_PTR - import :: SHROUD_array + import :: POI_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: DSHC_rv + type(POI_SHROUD_array), intent(INOUT) :: DSHC_rv type(C_PTR) SHT_rv end function c_return_int_ptr_to_fixed_const_array_bufferify end interface @@ -1485,7 +1485,7 @@ end function accept_char_array_in subroutine get_ptr_to_scalar(nitems) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: nitems - type(SHROUD_array) :: Dnitems + type(POI_SHROUD_array) :: Dnitems ! splicer begin function.get_ptr_to_scalar call c_get_ptr_to_scalar_bufferify(Dnitems) call c_f_pointer(Dnitems%base_addr, nitems) @@ -1514,7 +1514,7 @@ end subroutine get_ptr_to_scalar subroutine get_ptr_to_fixed_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount ! splicer begin function.get_ptr_to_fixed_array call c_get_ptr_to_fixed_array_bufferify(Dcount) call c_f_pointer(Dcount%base_addr, count, Dcount%shape(1:1)) @@ -1550,7 +1550,7 @@ end subroutine get_ptr_to_fixed_array subroutine get_ptr_to_dynamic_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount integer(C_INT) :: ncount ! splicer begin function.get_ptr_to_dynamic_array call c_get_ptr_to_dynamic_array_bufferify(Dcount, ncount) @@ -1582,7 +1582,7 @@ end subroutine get_ptr_to_dynamic_array subroutine get_ptr_to_func_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount ! splicer begin function.get_ptr_to_func_array call c_get_ptr_to_func_array_bufferify(Dcount) call c_f_pointer(Dcount%base_addr, count, Dcount%shape(1:1)) @@ -1608,7 +1608,7 @@ end subroutine get_ptr_to_func_array subroutine get_ptr_to_const_scalar(nitems) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: nitems - type(SHROUD_array) :: Dnitems + type(POI_SHROUD_array) :: Dnitems ! splicer begin function.get_ptr_to_const_scalar call c_get_ptr_to_const_scalar_bufferify(Dnitems) call c_f_pointer(Dnitems%base_addr, nitems) @@ -1634,7 +1634,7 @@ end subroutine get_ptr_to_const_scalar subroutine get_ptr_to_fixed_const_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount ! splicer begin function.get_ptr_to_fixed_const_array call c_get_ptr_to_fixed_const_array_bufferify(Dcount) call c_f_pointer(Dcount%base_addr, count, Dcount%shape(1:1)) @@ -1666,7 +1666,7 @@ end subroutine get_ptr_to_fixed_const_array subroutine get_ptr_to_dynamic_const_array(count) use iso_c_binding, only : C_INT, c_f_pointer integer(C_INT), intent(OUT), pointer :: count(:) - type(SHROUD_array) :: Dcount + type(POI_SHROUD_array) :: Dcount integer(C_INT) :: ncount ! splicer begin function.get_ptr_to_dynamic_const_array call c_get_ptr_to_dynamic_const_array_bufferify(Dcount, ncount) @@ -1696,7 +1696,7 @@ subroutine get_raw_ptr_to_scalar(nitems) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: nitems ! splicer begin function.get_raw_ptr_to_scalar - type(SHROUD_array) Dnitems + type(POI_SHROUD_array) Dnitems call c_get_raw_ptr_to_scalar_bufferify(Dnitems) nitems = Dnitems%base_addr ! splicer end function.get_raw_ptr_to_scalar @@ -1724,7 +1724,7 @@ subroutine get_raw_ptr_to_scalar_force(nitems) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: nitems ! splicer begin function.get_raw_ptr_to_scalar_force - type(SHROUD_array) Dnitems + type(POI_SHROUD_array) Dnitems call c_get_raw_ptr_to_scalar_force_bufferify(Dnitems) nitems = Dnitems%base_addr ! splicer end function.get_raw_ptr_to_scalar_force @@ -1754,7 +1754,7 @@ subroutine get_raw_ptr_to_fixed_array(count) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: count ! splicer begin function.get_raw_ptr_to_fixed_array - type(SHROUD_array) Dcount + type(POI_SHROUD_array) Dcount call c_get_raw_ptr_to_fixed_array_bufferify(Dcount) count = Dcount%base_addr ! splicer end function.get_raw_ptr_to_fixed_array @@ -1783,7 +1783,7 @@ subroutine get_raw_ptr_to_fixed_array_force(count) use iso_c_binding, only : C_INT, C_PTR type(C_PTR), intent(OUT) :: count ! splicer begin function.get_raw_ptr_to_fixed_array_force - type(SHROUD_array) Dcount + type(POI_SHROUD_array) Dcount call c_get_raw_ptr_to_fixed_array_force_bufferify(Dcount) count = Dcount%base_addr ! splicer end function.get_raw_ptr_to_fixed_array_force @@ -1871,7 +1871,7 @@ end function return_int_ptr_to_scalar function return_int_ptr_to_fixed_array() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(POI_SHROUD_array) :: DSHC_rv integer(C_INT), pointer :: SHT_rv(:) ! splicer begin function.return_int_ptr_to_fixed_array type(C_PTR) :: SHT_ptr @@ -1911,7 +1911,7 @@ end function return_int_ptr_to_const_scalar function return_int_ptr_to_fixed_const_array() & result(SHT_rv) use iso_c_binding, only : C_INT, C_PTR, c_f_pointer - type(SHROUD_array) :: DSHC_rv + type(POI_SHROUD_array) :: DSHC_rv integer(C_INT), pointer :: SHT_rv(:) ! splicer begin function.return_int_ptr_to_fixed_const_array type(C_PTR) :: SHT_ptr diff --git a/regression/reference/preprocess/preprocess.json b/regression/reference/preprocess/preprocess.json index 69591da2e..3c23ed18d 100644 --- a/regression/reference/preprocess/preprocess.json +++ b/regression/reference/preprocess/preprocess.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapUser1.cpp", "C_name_scope": "User1_", "C_type_name": "PRE_User1", - "F_capsule_data_type": "SHROUD_user1_capsule", + "F_capsule_data_type": "PRE_SHROUD_user1_capsule", "F_derived_name": "user1", "F_name_scope": "user1_", "PY_PyObject": "PY_User1", @@ -289,7 +289,7 @@ "C_impl_filename": "wrapUser2.cpp", "C_name_scope": "User2_", "C_type_name": "PRE_User2", - "F_capsule_data_type": "SHROUD_user2_capsule", + "F_capsule_data_type": "PRE_SHROUD_user2_capsule", "F_derived_name": "user2", "F_name_scope": "user2_", "PY_PyObject": "PY_User2", diff --git a/regression/reference/preprocess/preprocess_types.yaml b/regression/reference/preprocess/preprocess_types.yaml index 66a9fb86f..683d35181 100644 --- a/regression/reference/preprocess/preprocess_types.yaml +++ b/regression/reference/preprocess/preprocess_types.yaml @@ -16,7 +16,7 @@ typemap: c_type: PRE_User1 f_module_name: preprocess_mod f_derived_type: user1 - f_capsule_data_type: SHROUD_user1_capsule + f_capsule_data_type: PRE_SHROUD_user1_capsule f_to_c: "{f_var}%cxxmem" - type: User2 fields: @@ -26,5 +26,5 @@ typemap: c_type: PRE_User2 f_module_name: preprocess_mod f_derived_type: user2 - f_capsule_data_type: SHROUD_user2_capsule + f_capsule_data_type: PRE_SHROUD_user2_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/preprocess/wrapfpreprocess.f b/regression/reference/preprocess/wrapfpreprocess.f index 5f1aec608..e7c43b03b 100644 --- a/regression/reference/preprocess/wrapfpreprocess.f +++ b/regression/reference/preprocess/wrapfpreprocess.f @@ -21,13 +21,13 @@ module preprocess_mod ! splicer begin module_top ! splicer end module_top - type, bind(C) :: SHROUD_user1_capsule + type, bind(C) :: PRE_SHROUD_user1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_user1_capsule + end type PRE_SHROUD_user1_capsule type user1 - type(SHROUD_user1_capsule) :: cxxmem + type(PRE_SHROUD_user1_capsule) :: cxxmem ! splicer begin class.User1.component_part ! splicer end class.User1.component_part contains @@ -55,13 +55,13 @@ module preprocess_mod end type user1 #ifdef USE_USER2 - type, bind(C) :: SHROUD_user2_capsule + type, bind(C) :: PRE_SHROUD_user2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_user2_capsule + end type PRE_SHROUD_user2_capsule type user2 - type(SHROUD_user2_capsule) :: cxxmem + type(PRE_SHROUD_user2_capsule) :: cxxmem ! splicer begin class.User2.component_part ! splicer end class.User2.component_part contains @@ -107,9 +107,9 @@ module preprocess_mod ! Match: c_default subroutine c_user1_method1(self) & bind(C, name="PRE_User1_method1") - import :: SHROUD_user1_capsule + import :: PRE_SHROUD_user1_capsule implicit none - type(SHROUD_user1_capsule), intent(IN) :: self + type(PRE_SHROUD_user1_capsule), intent(IN) :: self end subroutine c_user1_method1 #if defined(USE_TWO) @@ -119,9 +119,9 @@ end subroutine c_user1_method1 ! Match: c_default subroutine c_user1_method2(self) & bind(C, name="PRE_User1_method2") - import :: SHROUD_user1_capsule + import :: PRE_SHROUD_user1_capsule implicit none - type(SHROUD_user1_capsule), intent(IN) :: self + type(PRE_SHROUD_user1_capsule), intent(IN) :: self end subroutine c_user1_method2 #endif @@ -132,9 +132,9 @@ end subroutine c_user1_method2 ! Match: c_default subroutine c_user1_method3def_0(self) & bind(C, name="PRE_User1_method3def_0") - import :: SHROUD_user1_capsule + import :: PRE_SHROUD_user1_capsule implicit none - type(SHROUD_user1_capsule), intent(IN) :: self + type(PRE_SHROUD_user1_capsule), intent(IN) :: self end subroutine c_user1_method3def_0 #endif @@ -150,9 +150,9 @@ end subroutine c_user1_method3def_0 subroutine c_user1_method3def_1(self, i) & bind(C, name="PRE_User1_method3def_1") use iso_c_binding, only : C_INT - import :: SHROUD_user1_capsule + import :: PRE_SHROUD_user1_capsule implicit none - type(SHROUD_user1_capsule), intent(IN) :: self + type(PRE_SHROUD_user1_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: i end subroutine c_user1_method3def_1 #endif @@ -168,9 +168,9 @@ end subroutine c_user1_method3def_1 ! Match: c_default subroutine c_user2_exfunc_0(self) & bind(C, name="PRE_User2_exfunc_0") - import :: SHROUD_user2_capsule + import :: PRE_SHROUD_user2_capsule implicit none - type(SHROUD_user2_capsule), intent(IN) :: self + type(PRE_SHROUD_user2_capsule), intent(IN) :: self end subroutine c_user2_exfunc_0 #endif @@ -186,9 +186,9 @@ end subroutine c_user2_exfunc_0 subroutine c_user2_exfunc_1(self, flag) & bind(C, name="PRE_User2_exfunc_1") use iso_c_binding, only : C_INT - import :: SHROUD_user2_capsule + import :: PRE_SHROUD_user2_capsule implicit none - type(SHROUD_user2_capsule), intent(IN) :: self + type(PRE_SHROUD_user2_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: flag end subroutine c_user2_exfunc_1 #endif diff --git a/regression/reference/scope/scope.json b/regression/reference/scope/scope.json index b188340b2..1e3e0027c 100644 --- a/regression/reference/scope/scope.json +++ b/regression/reference/scope/scope.json @@ -69,7 +69,7 @@ "C_impl_filename": "wrapClass1.cpp", "C_name_scope": "Class1_", "C_type_name": "SCO_Class1", - "F_capsule_data_type": "SHROUD_class1_capsule", + "F_capsule_data_type": "SCO_SHROUD_class1_capsule", "F_derived_name": "class1", "F_name_scope": "class1_", "class_scope": "Class1::", @@ -149,7 +149,7 @@ "C_impl_filename": "wrapClass2.cpp", "C_name_scope": "Class2_", "C_type_name": "SCO_Class2", - "F_capsule_data_type": "SHROUD_class2_capsule", + "F_capsule_data_type": "SCO_SHROUD_class2_capsule", "F_derived_name": "class2", "F_name_scope": "class2_", "class_scope": "Class2::", diff --git a/regression/reference/scope/scope_types.yaml b/regression/reference/scope/scope_types.yaml index 593fd5aeb..12bada430 100644 --- a/regression/reference/scope/scope_types.yaml +++ b/regression/reference/scope/scope_types.yaml @@ -16,7 +16,7 @@ typemap: c_type: SCO_Class1 f_module_name: scope_mod f_derived_type: class1 - f_capsule_data_type: SHROUD_class1_capsule + f_capsule_data_type: SCO_SHROUD_class1_capsule f_to_c: "{f_var}%cxxmem" - type: Class2 fields: @@ -26,5 +26,5 @@ typemap: c_type: SCO_Class2 f_module_name: scope_mod f_derived_type: class2 - f_capsule_data_type: SHROUD_class2_capsule + f_capsule_data_type: SCO_SHROUD_class2_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/scope/wrapfscope.f b/regression/reference/scope/wrapfscope.f index fd146c571..9ff78e2c4 100644 --- a/regression/reference/scope/wrapfscope.f +++ b/regression/reference/scope/wrapfscope.f @@ -46,13 +46,13 @@ module scope_mod integer(C_INT), parameter :: colorenum_blue = 61 integer(C_INT), parameter :: colorenum_white = 62 - type, bind(C) :: SHROUD_class1_capsule + type, bind(C) :: SCO_SHROUD_class1_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class1_capsule + end type SCO_SHROUD_class1_capsule type class1 - type(SHROUD_class1_capsule) :: cxxmem + type(SCO_SHROUD_class1_capsule) :: cxxmem ! splicer begin class.Class1.component_part ! splicer end class.Class1.component_part contains @@ -63,13 +63,13 @@ module scope_mod ! splicer end class.Class1.type_bound_procedure_part end type class1 - type, bind(C) :: SHROUD_class2_capsule + type, bind(C) :: SCO_SHROUD_class2_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_class2_capsule + end type SCO_SHROUD_class2_capsule type class2 - type(SHROUD_class2_capsule) :: cxxmem + type(SCO_SHROUD_class2_capsule) :: cxxmem ! splicer begin class.Class2.component_part ! splicer end class.Class2.component_part contains diff --git a/regression/reference/strings/wrapfstrings.f b/regression/reference/strings/wrapfstrings.f index 24a44855e..26dac320c 100644 --- a/regression/reference/strings/wrapfstrings.f +++ b/regression/reference/strings/wrapfstrings.f @@ -29,7 +29,7 @@ module strings_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: STR_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module strings_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type STR_SHROUD_array ! end array_context ! ---------------------------------------- @@ -217,9 +217,9 @@ end function c_get_char_ptr1 interface subroutine c_get_char_ptr1_bufferify(DSHF_rv) & bind(C, name="STR_get_char_ptr1_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_char_ptr1_bufferify end interface ! end c_get_char_ptr1_bufferify @@ -316,9 +316,9 @@ end function get_char_ptr4 interface subroutine c_get_const_string_result_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_result_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_result_bufferify end interface @@ -369,9 +369,9 @@ end subroutine c_get_const_string_as_arg_bufferify interface subroutine c_get_const_string_alloc_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_alloc_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_alloc_bufferify end interface @@ -403,9 +403,9 @@ end function c_get_const_string_ref_pure interface subroutine c_get_const_string_ref_pure_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_ref_pure_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_ref_pure_bufferify end interface ! end c_get_const_string_ref_pure_bufferify @@ -533,9 +533,9 @@ end function c_get_const_string_ref_alloc interface subroutine c_get_const_string_ref_alloc_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_ref_alloc_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_ref_alloc_bufferify end interface @@ -596,9 +596,9 @@ end function c_get_const_string_ptr_alloc interface subroutine c_get_const_string_ptr_alloc_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_ptr_alloc_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_ptr_alloc_bufferify end interface @@ -627,9 +627,9 @@ end function c_get_const_string_ptr_owns_alloc interface subroutine c_get_const_string_ptr_owns_alloc_bufferify(DSHF_rv) & bind(C, name="STR_get_const_string_ptr_owns_alloc_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_ptr_owns_alloc_bufferify end interface @@ -659,9 +659,9 @@ end function c_get_const_string_ptr_owns_alloc_pattern subroutine c_get_const_string_ptr_owns_alloc_pattern_bufferify( & DSHF_rv) & bind(C, name="STR_get_const_string_ptr_owns_alloc_pattern_bufferify") - import :: SHROUD_array + import :: STR_SHROUD_array implicit none - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(STR_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_get_const_string_ptr_owns_alloc_pattern_bufferify end interface @@ -1174,8 +1174,8 @@ end subroutine c_post_declare_bufferify subroutine STR_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="STR_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import STR_SHROUD_array + type(STR_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine STR_SHROUD_copy_string_and_free @@ -1311,7 +1311,7 @@ end subroutine pass_char_ptr_in_out ! start get_char_ptr1 function get_char_ptr1() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_char_ptr1 call c_get_char_ptr1_bufferify(DSHF_rv) @@ -1396,7 +1396,7 @@ end subroutine get_char_ptr3 !< function get_const_string_result() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_result call c_get_const_string_result_bufferify(DSHF_rv) @@ -1476,7 +1476,7 @@ end subroutine get_const_string_as_arg ! Match: c_string_result_buf_allocatable function get_const_string_alloc() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_alloc call c_get_const_string_alloc_bufferify(DSHF_rv) @@ -1506,7 +1506,7 @@ end function get_const_string_alloc ! start get_const_string_ref_pure function get_const_string_ref_pure() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_ref_pure call c_get_const_string_ref_pure_bufferify(DSHF_rv) @@ -1620,7 +1620,7 @@ end function get_const_string_ref_len_empty ! Match: c_string_result_buf_allocatable function get_const_string_ref_alloc() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_ref_alloc call c_get_const_string_ref_alloc_bufferify(DSHF_rv) @@ -1677,7 +1677,7 @@ end function get_const_string_ptr_len ! Match: c_string_result_buf_allocatable function get_const_string_ptr_alloc() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_ptr_alloc call c_get_const_string_ptr_alloc_bufferify(DSHF_rv) @@ -1709,7 +1709,7 @@ end function get_const_string_ptr_alloc !< function get_const_string_ptr_owns_alloc() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_ptr_owns_alloc call c_get_const_string_ptr_owns_alloc_bufferify(DSHF_rv) @@ -1737,7 +1737,7 @@ end function get_const_string_ptr_owns_alloc !< function get_const_string_ptr_owns_alloc_pattern() & result(SHT_rv) - type(SHROUD_array) :: DSHF_rv + type(STR_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.get_const_string_ptr_owns_alloc_pattern call c_get_const_string_ptr_owns_alloc_pattern_bufferify(DSHF_rv) diff --git a/regression/reference/struct-c/struct.json b/regression/reference/struct-c/struct.json index abc95a27e..1f148c1a1 100644 --- a/regression/reference/struct-c/struct.json +++ b/regression/reference/struct-c/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.c", "C_name_scope": "Cstruct1_", "C_type_name": "Cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_struct_array_descr_create": "PY_Cstruct1_create_array_descr", @@ -82,7 +82,7 @@ "C_impl_filename": "wrapCstruct_ptr.c", "C_name_scope": "Cstruct_ptr_", "C_type_name": "Cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_struct_array_descr_create": "PY_Cstruct_ptr_create_array_descr", @@ -161,7 +161,7 @@ "C_impl_filename": "wrapCstruct_list.c", "C_name_scope": "Cstruct_list_", "C_type_name": "Cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_struct_array_descr_create": "PY_Cstruct_list_create_array_descr", @@ -334,7 +334,7 @@ "C_impl_filename": "wrapCstruct_numpy.c", "C_name_scope": "Cstruct_numpy_", "C_type_name": "Cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_struct_array_descr_create": "PY_Cstruct_numpy_create_array_descr", @@ -456,7 +456,7 @@ "C_impl_filename": "wrapArrays1.c", "C_name_scope": "Arrays1_", "C_type_name": "Arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_struct_array_descr_create": "PY_Arrays1_create_array_descr", diff --git a/regression/reference/struct-class-c/struct.json b/regression/reference/struct-class-c/struct.json index dbbb8a073..37e0baedf 100644 --- a/regression/reference/struct-class-c/struct.json +++ b/regression/reference/struct-class-c/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.c", "C_name_scope": "Cstruct1_", "C_type_name": "Cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -232,7 +232,7 @@ "C_impl_filename": "wrapCstruct_ptr.c", "C_name_scope": "Cstruct_ptr_", "C_type_name": "Cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_PyObject": "PY_Cstruct_ptr", @@ -482,7 +482,7 @@ "C_impl_filename": "wrapCstruct_list.c", "C_name_scope": "Cstruct_list_", "C_type_name": "Cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_PyObject": "PY_Cstruct_list", @@ -967,7 +967,7 @@ "C_impl_filename": "wrapCstruct_numpy.c", "C_name_scope": "Cstruct_numpy_", "C_type_name": "Cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_PyObject": "PY_Cstruct_numpy", @@ -1323,7 +1323,7 @@ "C_impl_filename": "wrapArrays1.c", "C_name_scope": "Arrays1_", "C_type_name": "Arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_PyObject": "PY_Arrays1", diff --git a/regression/reference/struct-class-cxx/struct.json b/regression/reference/struct-class-cxx/struct.json index 04be9ec56..befc6ac41 100644 --- a/regression/reference/struct-class-cxx/struct.json +++ b/regression/reference/struct-class-cxx/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.cpp", "C_name_scope": "Cstruct1_", "C_type_name": "STR_cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -232,7 +232,7 @@ "C_impl_filename": "wrapCstruct_ptr.cpp", "C_name_scope": "Cstruct_ptr_", "C_type_name": "STR_cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_PyObject": "PY_Cstruct_ptr", @@ -482,7 +482,7 @@ "C_impl_filename": "wrapCstruct_list.cpp", "C_name_scope": "Cstruct_list_", "C_type_name": "STR_cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_PyObject": "PY_Cstruct_list", @@ -967,7 +967,7 @@ "C_impl_filename": "wrapCstruct_numpy.cpp", "C_name_scope": "Cstruct_numpy_", "C_type_name": "STR_cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_PyObject": "PY_Cstruct_numpy", @@ -1323,7 +1323,7 @@ "C_impl_filename": "wrapArrays1.cpp", "C_name_scope": "Arrays1_", "C_type_name": "STR_arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_PyObject": "PY_Arrays1", diff --git a/regression/reference/struct-cxx/struct.json b/regression/reference/struct-cxx/struct.json index 8f70605b9..b35063e2b 100644 --- a/regression/reference/struct-cxx/struct.json +++ b/regression/reference/struct-cxx/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.cpp", "C_name_scope": "Cstruct1_", "C_type_name": "STR_cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_struct_array_descr_create": "PY_Cstruct1_create_array_descr", @@ -82,7 +82,7 @@ "C_impl_filename": "wrapCstruct_ptr.cpp", "C_name_scope": "Cstruct_ptr_", "C_type_name": "STR_cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_struct_array_descr_create": "PY_Cstruct_ptr_create_array_descr", @@ -161,7 +161,7 @@ "C_impl_filename": "wrapCstruct_list.cpp", "C_name_scope": "Cstruct_list_", "C_type_name": "STR_cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_struct_array_descr_create": "PY_Cstruct_list_create_array_descr", @@ -334,7 +334,7 @@ "C_impl_filename": "wrapCstruct_numpy.cpp", "C_name_scope": "Cstruct_numpy_", "C_type_name": "STR_cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_struct_array_descr_create": "PY_Cstruct_numpy_create_array_descr", @@ -456,7 +456,7 @@ "C_impl_filename": "wrapArrays1.cpp", "C_name_scope": "Arrays1_", "C_type_name": "STR_arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_struct_array_descr_create": "PY_Arrays1_create_array_descr", diff --git a/regression/reference/struct-list-cxx/struct.json b/regression/reference/struct-list-cxx/struct.json index 0ed8d6c0e..e14eeb996 100644 --- a/regression/reference/struct-list-cxx/struct.json +++ b/regression/reference/struct-list-cxx/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.cpp", "C_name_scope": "Cstruct1_", "C_type_name": "STR_cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -87,7 +87,7 @@ "C_impl_filename": "wrapCstruct_ptr.cpp", "C_name_scope": "Cstruct_ptr_", "C_type_name": "STR_cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_PyObject": "PY_Cstruct_ptr", @@ -171,7 +171,7 @@ "C_impl_filename": "wrapCstruct_list.cpp", "C_name_scope": "Cstruct_list_", "C_type_name": "STR_cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_PyObject": "PY_Cstruct_list", @@ -349,7 +349,7 @@ "C_impl_filename": "wrapCstruct_numpy.cpp", "C_name_scope": "Cstruct_numpy_", "C_type_name": "STR_cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_PyObject": "PY_Cstruct_numpy", @@ -476,7 +476,7 @@ "C_impl_filename": "wrapArrays1.cpp", "C_name_scope": "Arrays1_", "C_type_name": "STR_arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_PyObject": "PY_Arrays1", diff --git a/regression/reference/struct-numpy-c/struct.json b/regression/reference/struct-numpy-c/struct.json index fed20c09d..9d981eef7 100644 --- a/regression/reference/struct-numpy-c/struct.json +++ b/regression/reference/struct-numpy-c/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.c", "C_name_scope": "Cstruct1_", "C_type_name": "Cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -87,7 +87,7 @@ "C_impl_filename": "wrapCstruct_ptr.c", "C_name_scope": "Cstruct_ptr_", "C_type_name": "Cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_PyObject": "PY_Cstruct_ptr", @@ -171,7 +171,7 @@ "C_impl_filename": "wrapCstruct_list.c", "C_name_scope": "Cstruct_list_", "C_type_name": "Cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_PyObject": "PY_Cstruct_list", @@ -349,7 +349,7 @@ "C_impl_filename": "wrapCstruct_numpy.c", "C_name_scope": "Cstruct_numpy_", "C_type_name": "Cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_PyObject": "PY_Cstruct_numpy", @@ -476,7 +476,7 @@ "C_impl_filename": "wrapArrays1.c", "C_name_scope": "Arrays1_", "C_type_name": "Arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_PyObject": "PY_Arrays1", diff --git a/regression/reference/struct-numpy-cxx/struct.json b/regression/reference/struct-numpy-cxx/struct.json index 3a795501d..626d9e7a5 100644 --- a/regression/reference/struct-numpy-cxx/struct.json +++ b/regression/reference/struct-numpy-cxx/struct.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct1.cpp", "C_name_scope": "Cstruct1_", "C_type_name": "STR_cstruct1", - "F_capsule_data_type": "SHROUD_cstruct1_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct1_capsule", "F_derived_name": "cstruct1", "F_name_scope": "cstruct1_", "PY_PyObject": "PY_Cstruct1", @@ -87,7 +87,7 @@ "C_impl_filename": "wrapCstruct_ptr.cpp", "C_name_scope": "Cstruct_ptr_", "C_type_name": "STR_cstruct_ptr", - "F_capsule_data_type": "SHROUD_cstruct_ptr_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_ptr_capsule", "F_derived_name": "cstruct_ptr", "F_name_scope": "cstruct_ptr_", "PY_PyObject": "PY_Cstruct_ptr", @@ -171,7 +171,7 @@ "C_impl_filename": "wrapCstruct_list.cpp", "C_name_scope": "Cstruct_list_", "C_type_name": "STR_cstruct_list", - "F_capsule_data_type": "SHROUD_cstruct_list_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_list_capsule", "F_derived_name": "cstruct_list", "F_name_scope": "cstruct_list_", "PY_PyObject": "PY_Cstruct_list", @@ -349,7 +349,7 @@ "C_impl_filename": "wrapCstruct_numpy.cpp", "C_name_scope": "Cstruct_numpy_", "C_type_name": "STR_cstruct_numpy", - "F_capsule_data_type": "SHROUD_cstruct_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_numpy_capsule", "F_derived_name": "cstruct_numpy", "F_name_scope": "cstruct_numpy_", "PY_PyObject": "PY_Cstruct_numpy", @@ -476,7 +476,7 @@ "C_impl_filename": "wrapArrays1.cpp", "C_name_scope": "Arrays1_", "C_type_name": "STR_arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_PyObject": "PY_Arrays1", diff --git a/regression/reference/struct-py-c/struct-py.json b/regression/reference/struct-py-c/struct-py.json index 3d525e104..fed7e0260 100644 --- a/regression/reference/struct-py-c/struct-py.json +++ b/regression/reference/struct-py-c/struct-py.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct_as_class.c", "C_name_scope": "Cstruct_as_class_", "C_type_name": "Cstruct_as_class", - "F_capsule_data_type": "SHROUD_cstruct_as_class_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_as_class_capsule", "F_derived_name": "cstruct_as_class", "F_name_scope": "cstruct_as_class_", "PY_PyObject": "PY_Cstruct_as_class", @@ -232,7 +232,7 @@ "C_impl_filename": "wrapCstruct_as_numpy.c", "C_name_scope": "Cstruct_as_numpy_", "C_type_name": "Cstruct_as_numpy", - "F_capsule_data_type": "SHROUD_cstruct_as_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_as_numpy_capsule", "F_derived_name": "cstruct_as_numpy", "F_name_scope": "cstruct_as_numpy_", "PY_PyObject": "PY_Cstruct_as_numpy", diff --git a/regression/reference/struct-py-cxx/struct-py.json b/regression/reference/struct-py-cxx/struct-py.json index f244fe330..cdba20131 100644 --- a/regression/reference/struct-py-cxx/struct-py.json +++ b/regression/reference/struct-py-cxx/struct-py.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapCstruct_as_class.cpp", "C_name_scope": "Cstruct_as_class_", "C_type_name": "STR_cstruct_as_class", - "F_capsule_data_type": "SHROUD_cstruct_as_class_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_as_class_capsule", "F_derived_name": "cstruct_as_class", "F_name_scope": "cstruct_as_class_", "PY_PyObject": "PY_Cstruct_as_class", @@ -232,7 +232,7 @@ "C_impl_filename": "wrapCstruct_as_numpy.cpp", "C_name_scope": "Cstruct_as_numpy_", "C_type_name": "STR_cstruct_as_numpy", - "F_capsule_data_type": "SHROUD_cstruct_as_numpy_capsule", + "F_capsule_data_type": "STR_SHROUD_cstruct_as_numpy_capsule", "F_derived_name": "cstruct_as_numpy", "F_name_scope": "cstruct_as_numpy_", "PY_PyObject": "PY_Cstruct_as_numpy", diff --git a/regression/reference/structlist/structlist.json b/regression/reference/structlist/structlist.json index 2feec4dc7..f6aaa4ffd 100644 --- a/regression/reference/structlist/structlist.json +++ b/regression/reference/structlist/structlist.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapArrays1.c", "C_name_scope": "Arrays1_", "C_type_name": "Arrays1", - "F_capsule_data_type": "SHROUD_arrays1_capsule", + "F_capsule_data_type": "STR_SHROUD_arrays1_capsule", "F_derived_name": "arrays1", "F_name_scope": "arrays1_", "PY_PyObject": "PY_Arrays1", diff --git a/regression/reference/templates/templates.json b/regression/reference/templates/templates.json index d9aa1d0d4..c299dc795 100644 --- a/regression/reference/templates/templates.json +++ b/regression/reference/templates/templates.json @@ -10,7 +10,7 @@ "C_impl_filename": "wrapWorker.cpp", "C_name_scope": "Worker_", "C_type_name": "TEM_Worker", - "F_capsule_data_type": "SHROUD_worker_capsule", + "F_capsule_data_type": "TEM_SHROUD_worker_capsule", "F_derived_name": "worker", "F_name_scope": "worker_", "PY_PyObject": "PY_Worker", @@ -39,7 +39,7 @@ "C_impl_filename": "wrapuser_int.cpp", "C_name_scope": "user_int_", "C_type_name": "TEM_user_int", - "F_capsule_data_type": "SHROUD_user_int_capsule", + "F_capsule_data_type": "TEM_SHROUD_user_int_capsule", "F_derived_name": "user_int", "F_name_scope": "user_int_", "PY_PyObject": "PY_user_int", @@ -1235,7 +1235,7 @@ "C_impl_filename": "wrapvectorforint.cpp", "C_name_scope": "vector_int_", "C_type_name": "TEM_vector_int", - "F_capsule_data_type": "SHROUD_vector_int_capsule", + "F_capsule_data_type": "TEM_SHROUD_vector_int_capsule", "F_derived_name": "vector_int", "F_name_scope": "vector_int_", "PY_PyObject": "PY_vector_int", @@ -1807,7 +1807,7 @@ "C_impl_filename": "wrapstd_vector_double.cpp", "C_name_scope": "vector_double_", "C_type_name": "TEM_vector_double", - "F_capsule_data_type": "SHROUD_vector_double_capsule", + "F_capsule_data_type": "TEM_SHROUD_vector_double_capsule", "F_derived_name": "vector_double", "F_name_scope": "vector_double_", "PY_PyObject": "PY_vector_double", @@ -2404,7 +2404,7 @@ "C_impl_filename": "wrapinternal_ImplWorker1.cpp", "C_name_scope": "internal_ImplWorker1_", "C_type_name": "TEM_internal_ImplWorker1", - "F_capsule_data_type": "SHROUD_implworker1_capsule", + "F_capsule_data_type": "TEM_SHROUD_implworker1_capsule", "F_derived_name": "implworker1", "F_name_scope": "implworker1_", "PY_PyObject": "PY_ImplWorker1", @@ -2437,7 +2437,7 @@ "C_impl_filename": "wrapinternal_ImplWorker2.cpp", "C_name_scope": "internal_ImplWorker2_", "C_type_name": "TEM_internal_ImplWorker2", - "F_capsule_data_type": "SHROUD_implworker2_capsule", + "F_capsule_data_type": "TEM_SHROUD_implworker2_capsule", "F_derived_name": "implworker2", "F_name_scope": "implworker2_", "PY_PyObject": "PY_ImplWorker2", diff --git a/regression/reference/templates/templates_types.yaml b/regression/reference/templates/templates_types.yaml index 87825ae5c..4c4c717b2 100644 --- a/regression/reference/templates/templates_types.yaml +++ b/regression/reference/templates/templates_types.yaml @@ -16,7 +16,7 @@ typemap: c_type: TEM_Worker f_module_name: templates_mod f_derived_type: worker - f_capsule_data_type: SHROUD_worker_capsule + f_capsule_data_type: TEM_SHROUD_worker_capsule f_to_c: "{f_var}%cxxmem" - namespace: internal declarations: internal @@ -28,7 +28,7 @@ typemap: c_type: TEM_internal_ImplWorker1 f_module_name: templates_internal_mod f_derived_type: implworker1 - f_capsule_data_type: SHROUD_implworker1_capsule + f_capsule_data_type: TEM_SHROUD_implworker1_capsule f_to_c: "{f_var}%cxxmem" - type: ImplWorker2 fields: @@ -38,7 +38,7 @@ typemap: c_type: TEM_internal_ImplWorker2 f_module_name: templates_internal_mod f_derived_type: implworker2 - f_capsule_data_type: SHROUD_implworker2_capsule + f_capsule_data_type: TEM_SHROUD_implworker2_capsule f_to_c: "{f_var}%cxxmem" - namespace: std declarations: std @@ -50,7 +50,7 @@ typemap: c_type: TEM_vector_double f_module_name: templates_std_mod f_derived_type: vector_double - f_capsule_data_type: SHROUD_vector_double_capsule + f_capsule_data_type: TEM_SHROUD_vector_double_capsule f_to_c: "{f_var}%cxxmem" - type: vector_int fields: @@ -60,7 +60,7 @@ typemap: c_type: TEM_vector_int f_module_name: templates_std_mod f_derived_type: vector_int - f_capsule_data_type: SHROUD_vector_int_capsule + f_capsule_data_type: TEM_SHROUD_vector_int_capsule f_to_c: "{f_var}%cxxmem" - type: user_int fields: @@ -70,5 +70,5 @@ typemap: c_type: TEM_user_int f_module_name: templates_mod f_derived_type: user_int - f_capsule_data_type: SHROUD_user_int_capsule + f_capsule_data_type: TEM_SHROUD_user_int_capsule f_to_c: "{f_var}%cxxmem" diff --git a/regression/reference/templates/wrapftemplates.f b/regression/reference/templates/wrapftemplates.f index 26607542b..400005dd2 100644 --- a/regression/reference/templates/wrapftemplates.f +++ b/regression/reference/templates/wrapftemplates.f @@ -21,13 +21,13 @@ module templates_mod ! splicer begin module_top ! splicer end module_top - type, bind(C) :: SHROUD_worker_capsule + type, bind(C) :: TEM_SHROUD_worker_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_worker_capsule + end type TEM_SHROUD_worker_capsule type worker - type(SHROUD_worker_capsule) :: cxxmem + type(TEM_SHROUD_worker_capsule) :: cxxmem ! splicer begin class.Worker.component_part ! splicer end class.Worker.component_part contains @@ -38,13 +38,13 @@ module templates_mod ! splicer end class.Worker.type_bound_procedure_part end type worker - type, bind(C) :: SHROUD_user_int_capsule + type, bind(C) :: TEM_SHROUD_user_int_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_user_int_capsule + end type TEM_SHROUD_user_int_capsule type user_int - type(SHROUD_user_int_capsule) :: cxxmem + type(TEM_SHROUD_user_int_capsule) :: cxxmem ! splicer begin class.user_int.component_part ! splicer end class.user_int.component_part contains @@ -86,9 +86,9 @@ module templates_mod subroutine c_user_int_nested_double(self, arg1, arg2) & bind(C, name="TEM_user_int_nested_double") use iso_c_binding, only : C_DOUBLE, C_INT - import :: SHROUD_user_int_capsule + import :: TEM_SHROUD_user_int_capsule implicit none - type(SHROUD_user_int_capsule), intent(IN) :: self + type(TEM_SHROUD_user_int_capsule), intent(IN) :: self integer(C_INT), value, intent(IN) :: arg1 real(C_DOUBLE), value, intent(IN) :: arg2 end subroutine c_user_int_nested_double diff --git a/regression/reference/templates/wrapftemplates_std.f b/regression/reference/templates/wrapftemplates_std.f index edf6645be..9d89de5e6 100644 --- a/regression/reference/templates/wrapftemplates_std.f +++ b/regression/reference/templates/wrapftemplates_std.f @@ -21,13 +21,13 @@ module templates_std_mod ! splicer begin namespace.std.module_top ! splicer end namespace.std.module_top - type, bind(C) :: SHROUD_vector_int_capsule + type, bind(C) :: TEM_SHROUD_vector_int_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_vector_int_capsule + end type TEM_SHROUD_vector_int_capsule type vector_int - type(SHROUD_vector_int_capsule) :: cxxmem + type(TEM_SHROUD_vector_int_capsule) :: cxxmem ! splicer begin namespace.std.class.vector_int.component_part ! splicer end namespace.std.class.vector_int.component_part contains @@ -41,13 +41,13 @@ module templates_std_mod ! splicer end namespace.std.class.vector_int.type_bound_procedure_part end type vector_int - type, bind(C) :: SHROUD_vector_double_capsule + type, bind(C) :: TEM_SHROUD_vector_double_capsule type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_vector_double_capsule + end type TEM_SHROUD_vector_double_capsule type vector_double - type(SHROUD_vector_double_capsule) :: cxxmem + type(TEM_SHROUD_vector_double_capsule) :: cxxmem ! splicer begin namespace.std.class.vector_double.component_part ! splicer end namespace.std.class.vector_double.component_part contains @@ -80,9 +80,9 @@ function c_vector_int_ctor(SHT_crv) & result(SHT_rv) & bind(C, name="TEM_vector_int_ctor") use iso_c_binding, only : C_PTR - import :: SHROUD_vector_int_capsule + import :: TEM_SHROUD_vector_int_capsule implicit none - type(SHROUD_vector_int_capsule), intent(OUT) :: SHT_crv + type(TEM_SHROUD_vector_int_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_vector_int_ctor @@ -92,9 +92,9 @@ end function c_vector_int_ctor ! Match: c_default subroutine c_vector_int_dtor(self) & bind(C, name="TEM_vector_int_dtor") - import :: SHROUD_vector_int_capsule + import :: TEM_SHROUD_vector_int_capsule implicit none - type(SHROUD_vector_int_capsule), intent(IN) :: self + type(TEM_SHROUD_vector_int_capsule), intent(IN) :: self end subroutine c_vector_int_dtor ! ---------------------------------------- @@ -108,9 +108,9 @@ end subroutine c_vector_int_dtor subroutine c_vector_int_push_back(self, value) & bind(C, name="TEM_vector_int_push_back") use iso_c_binding, only : C_INT - import :: SHROUD_vector_int_capsule + import :: TEM_SHROUD_vector_int_capsule implicit none - type(SHROUD_vector_int_capsule), intent(IN) :: self + type(TEM_SHROUD_vector_int_capsule), intent(IN) :: self integer(C_INT), intent(IN) :: value end subroutine c_vector_int_push_back @@ -126,9 +126,9 @@ function c_vector_int_at(self, n) & result(SHT_rv) & bind(C, name="TEM_vector_int_at") use iso_c_binding, only : C_PTR, C_SIZE_T - import :: SHROUD_vector_int_capsule + import :: TEM_SHROUD_vector_int_capsule implicit none - type(SHROUD_vector_int_capsule), intent(IN) :: self + type(TEM_SHROUD_vector_int_capsule), intent(IN) :: self integer(C_SIZE_T), value, intent(IN) :: n type(C_PTR) SHT_rv end function c_vector_int_at @@ -143,9 +143,9 @@ function c_vector_double_ctor(SHT_crv) & result(SHT_rv) & bind(C, name="TEM_vector_double_ctor") use iso_c_binding, only : C_PTR - import :: SHROUD_vector_double_capsule + import :: TEM_SHROUD_vector_double_capsule implicit none - type(SHROUD_vector_double_capsule), intent(OUT) :: SHT_crv + type(TEM_SHROUD_vector_double_capsule), intent(OUT) :: SHT_crv type(C_PTR) SHT_rv end function c_vector_double_ctor @@ -155,9 +155,9 @@ end function c_vector_double_ctor ! Match: c_default subroutine c_vector_double_dtor(self) & bind(C, name="TEM_vector_double_dtor") - import :: SHROUD_vector_double_capsule + import :: TEM_SHROUD_vector_double_capsule implicit none - type(SHROUD_vector_double_capsule), intent(IN) :: self + type(TEM_SHROUD_vector_double_capsule), intent(IN) :: self end subroutine c_vector_double_dtor ! ---------------------------------------- @@ -171,9 +171,9 @@ end subroutine c_vector_double_dtor subroutine c_vector_double_push_back(self, value) & bind(C, name="TEM_vector_double_push_back") use iso_c_binding, only : C_DOUBLE - import :: SHROUD_vector_double_capsule + import :: TEM_SHROUD_vector_double_capsule implicit none - type(SHROUD_vector_double_capsule), intent(IN) :: self + type(TEM_SHROUD_vector_double_capsule), intent(IN) :: self real(C_DOUBLE), intent(IN) :: value end subroutine c_vector_double_push_back @@ -189,9 +189,9 @@ function c_vector_double_at(self, n) & result(SHT_rv) & bind(C, name="TEM_vector_double_at") use iso_c_binding, only : C_PTR, C_SIZE_T - import :: SHROUD_vector_double_capsule + import :: TEM_SHROUD_vector_double_capsule implicit none - type(SHROUD_vector_double_capsule), intent(IN) :: self + type(TEM_SHROUD_vector_double_capsule), intent(IN) :: self integer(C_SIZE_T), value, intent(IN) :: n type(C_PTR) SHT_rv end function c_vector_double_at diff --git a/regression/reference/tutorial/wrapftutorial.f b/regression/reference/tutorial/wrapftutorial.f index 24a123eeb..66df70442 100644 --- a/regression/reference/tutorial/wrapftutorial.f +++ b/regression/reference/tutorial/wrapftutorial.f @@ -29,7 +29,7 @@ module tutorial_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: TUT_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module tutorial_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type TUT_SHROUD_array ! end array_context ! enum tutorial::Color @@ -120,13 +120,13 @@ subroutine c_concatenate_strings_bufferify(arg1, Larg1, arg2, & Larg2, DSHF_rv) & bind(C, name="TUT_concatenate_strings_bufferify") use iso_c_binding, only : C_CHAR, C_INT - import :: SHROUD_array + import :: TUT_SHROUD_array implicit none character(kind=C_CHAR), intent(IN) :: arg1(*) integer(C_INT), value, intent(IN) :: Larg1 character(kind=C_CHAR), intent(IN) :: arg2(*) integer(C_INT), value, intent(IN) :: Larg2 - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(TUT_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_concatenate_strings_bufferify end interface @@ -713,8 +713,8 @@ end subroutine all_test1 subroutine TUT_SHROUD_copy_string_and_free(context, c_var, c_var_size) & bind(c,name="TUT_ShroudCopyStringAndFree") use, intrinsic :: iso_c_binding, only : C_CHAR, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import TUT_SHROUD_array + type(TUT_SHROUD_array), intent(IN) :: context character(kind=C_CHAR), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine TUT_SHROUD_copy_string_and_free @@ -759,7 +759,7 @@ function concatenate_strings(arg1, arg2) & use iso_c_binding, only : C_INT character(len=*), intent(IN) :: arg1 character(len=*), intent(IN) :: arg2 - type(SHROUD_array) :: DSHF_rv + type(TUT_SHROUD_array) :: DSHF_rv character(len=:), allocatable :: SHT_rv ! splicer begin function.concatenate_strings call c_concatenate_strings_bufferify(arg1, & diff --git a/regression/reference/vectors/wrapfvectors.f b/regression/reference/vectors/wrapfvectors.f index 6d894f447..796a1d57d 100644 --- a/regression/reference/vectors/wrapfvectors.f +++ b/regression/reference/vectors/wrapfvectors.f @@ -29,7 +29,7 @@ module vectors_mod ! start array_context ! helper array_context - type, bind(C) :: SHROUD_array + type, bind(C) :: VEC_SHROUD_array ! address of C++ memory type(SHROUD_capsule_data) :: cxx ! address of data in cxx @@ -43,7 +43,7 @@ module vectors_mod ! number of dimensions integer(C_INT) :: rank = -1 integer(C_LONG) :: shape(7) = 0 - end type SHROUD_array + end type VEC_SHROUD_array ! end array_context ! ---------------------------------------- @@ -80,9 +80,9 @@ end function c_vector_sum_bufferify interface subroutine c_vector_iota_out_bufferify(Darg) & bind(C, name="VEC_vector_iota_out_bufferify") - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg end subroutine c_vector_iota_out_bufferify end interface ! end c_vector_iota_out_bufferify @@ -101,9 +101,9 @@ function c_vector_iota_out_with_num_bufferify(Darg) & result(SHT_rv) & bind(C, name="VEC_vector_iota_out_with_num_bufferify") use iso_c_binding, only : C_LONG - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg integer(C_LONG) SHT_rv end function c_vector_iota_out_with_num_bufferify end interface @@ -121,9 +121,9 @@ end function c_vector_iota_out_with_num_bufferify interface subroutine c_vector_iota_out_with_num2_bufferify(Darg) & bind(C, name="VEC_vector_iota_out_with_num2_bufferify") - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg end subroutine c_vector_iota_out_with_num2_bufferify end interface ! end c_vector_iota_out_with_num2_bufferify @@ -140,9 +140,9 @@ end subroutine c_vector_iota_out_with_num2_bufferify interface subroutine c_vector_iota_out_alloc_bufferify(Darg) & bind(C, name="VEC_vector_iota_out_alloc_bufferify") - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg end subroutine c_vector_iota_out_alloc_bufferify end interface ! end c_vector_iota_out_alloc_bufferify @@ -160,11 +160,11 @@ end subroutine c_vector_iota_out_alloc_bufferify subroutine c_vector_iota_inout_alloc_bufferify(arg, Sarg, Darg) & bind(C, name="VEC_vector_iota_inout_alloc_bufferify") use iso_c_binding, only : C_INT, C_LONG - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none integer(C_INT), intent(INOUT) :: arg(*) integer(C_LONG), value, intent(IN) :: Sarg - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg end subroutine c_vector_iota_inout_alloc_bufferify end interface ! end c_vector_iota_inout_alloc_bufferify @@ -181,11 +181,11 @@ end subroutine c_vector_iota_inout_alloc_bufferify subroutine c_vector_increment_bufferify(arg, Sarg, Darg) & bind(C, name="VEC_vector_increment_bufferify") use iso_c_binding, only : C_INT, C_LONG - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none integer(C_INT), intent(INOUT) :: arg(*) integer(C_LONG), value, intent(IN) :: Sarg - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg end subroutine c_vector_increment_bufferify end interface @@ -200,9 +200,9 @@ end subroutine c_vector_increment_bufferify interface subroutine c_vector_iota_out_d_bufferify(Darg) & bind(C, name="VEC_vector_iota_out_d_bufferify") - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none - type(SHROUD_array), intent(INOUT) :: Darg + type(VEC_SHROUD_array), intent(INOUT) :: Darg end subroutine c_vector_iota_out_d_bufferify end interface @@ -243,10 +243,10 @@ end function c_vector_string_count_bufferify subroutine c_return_vector_alloc_bufferify(n, DSHF_rv) & bind(C, name="VEC_return_vector_alloc_bufferify") use iso_c_binding, only : C_INT - import :: SHROUD_array + import :: VEC_SHROUD_array implicit none integer(C_INT), value, intent(IN) :: n - type(SHROUD_array), intent(OUT) :: DSHF_rv + type(VEC_SHROUD_array), intent(OUT) :: DSHF_rv end subroutine c_return_vector_alloc_bufferify end interface @@ -261,8 +261,8 @@ end subroutine c_return_vector_alloc_bufferify subroutine VEC_SHROUD_copy_array_double(context, c_var, c_var_size) & bind(C, name="VEC_ShroudCopyArray") use iso_c_binding, only : C_DOUBLE, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import VEC_SHROUD_array + type(VEC_SHROUD_array), intent(IN) :: context real(C_DOUBLE), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine VEC_SHROUD_copy_array_double @@ -274,8 +274,8 @@ end subroutine VEC_SHROUD_copy_array_double subroutine VEC_SHROUD_copy_array_int(context, c_var, c_var_size) & bind(C, name="VEC_ShroudCopyArray") use iso_c_binding, only : C_INT, C_SIZE_T - import SHROUD_array - type(SHROUD_array), intent(IN) :: context + import VEC_SHROUD_array + type(VEC_SHROUD_array), intent(IN) :: context integer(C_INT), intent(OUT) :: c_var(*) integer(C_SIZE_T), value :: c_var_size end subroutine VEC_SHROUD_copy_array_int @@ -333,7 +333,7 @@ end function vector_sum subroutine vector_iota_out(arg) use iso_c_binding, only : C_INT, C_SIZE_T integer(C_INT), intent(OUT) :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_iota_out call c_vector_iota_out_bufferify(Darg) call VEC_SHROUD_copy_array_int(Darg, arg, & @@ -369,7 +369,7 @@ function vector_iota_out_with_num(arg) & result(num) use iso_c_binding, only : C_INT, C_LONG, C_SIZE_T integer(C_INT), intent(OUT) :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_iota_out_with_num integer(C_LONG) :: num num = c_vector_iota_out_with_num_bufferify(Darg) @@ -406,7 +406,7 @@ function vector_iota_out_with_num2(arg) & result(num) use iso_c_binding, only : C_INT, C_LONG, C_SIZE_T integer(C_INT), intent(OUT) :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_iota_out_with_num2 integer(C_LONG) :: num call c_vector_iota_out_with_num2_bufferify(Darg) @@ -440,7 +440,7 @@ end function vector_iota_out_with_num2 subroutine vector_iota_out_alloc(arg) use iso_c_binding, only : C_INT, C_SIZE_T integer(C_INT), intent(OUT), allocatable :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_iota_out_alloc call c_vector_iota_out_alloc_bufferify(Darg) allocate(arg(Darg%size)) @@ -473,7 +473,7 @@ end subroutine vector_iota_out_alloc subroutine vector_iota_inout_alloc(arg) use iso_c_binding, only : C_INT, C_LONG, C_SIZE_T integer(C_INT), intent(INOUT), allocatable :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_iota_inout_alloc call c_vector_iota_inout_alloc_bufferify(arg, & size(arg, kind=C_LONG), Darg) @@ -503,7 +503,7 @@ end subroutine vector_iota_inout_alloc subroutine vector_increment(arg) use iso_c_binding, only : C_INT, C_LONG, C_SIZE_T integer(C_INT), intent(INOUT) :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_increment call c_vector_increment_bufferify(arg, size(arg, kind=C_LONG), & Darg) @@ -534,7 +534,7 @@ end subroutine vector_increment subroutine vector_iota_out_d(arg) use iso_c_binding, only : C_DOUBLE, C_SIZE_T real(C_DOUBLE), intent(OUT) :: arg(:) - type(SHROUD_array) :: Darg + type(VEC_SHROUD_array) :: Darg ! splicer begin function.vector_iota_out_d call c_vector_iota_out_d_bufferify(Darg) call VEC_SHROUD_copy_array_double(Darg, arg, & @@ -602,7 +602,7 @@ function return_vector_alloc(n) & result(SHT_rv) use iso_c_binding, only : C_INT, C_SIZE_T integer(C_INT), value, intent(IN) :: n - type(SHROUD_array) :: DSHF_rv + type(VEC_SHROUD_array) :: DSHF_rv integer(C_INT), allocatable :: SHT_rv(:) ! splicer begin function.return_vector_alloc call c_return_vector_alloc_bufferify(n, DSHF_rv) diff --git a/regression/run/ownership/main.f b/regression/run/ownership/main.f index 28a77942c..f6ef048f6 100644 --- a/regression/run/ownership/main.f +++ b/regression/run/ownership/main.f @@ -40,7 +40,7 @@ subroutine test_pod integer(C_INT), allocatable :: inta1(:) ! integer(C_INT) :: lencptr ! type(C_PTR) cptr - type(SHROUD_capsule) cap + type(OWN_SHROUD_capsule) cap !---------------------------------------- ! return scalar diff --git a/shroud/ast.py b/shroud/ast.py index a22a31b9d..71b4096d4 100644 --- a/shroud/ast.py +++ b/shroud/ast.py @@ -466,7 +466,9 @@ def default_options(self): F_module_name_namespace_template="{file_scope}_mod", F_impl_filename_library_template="wrapf{library_lower}.{F_filename_suffix}", F_impl_filename_namespace_template="wrapf{file_scope}.{F_filename_suffix}", - F_capsule_data_type_class_template="SHROUD_{F_name_scope}capsule", + F_array_type_template="{C_prefix}SHROUD_array", + F_capsule_type_template="{C_prefix}SHROUD_capsule", + F_capsule_data_type_class_template="{C_prefix}SHROUD_{F_name_scope}capsule", F_abstract_interface_subprogram_template="{underscore_name}_{argname}", F_abstract_interface_argument_template="arg{index}", @@ -588,10 +590,9 @@ def default_format(self, fmtdict, kwargs): C_string_result_as_arg="SHF_rv", F_string_result_as_arg="", F_capsule_data_type="SHROUD_capsule_data", - F_capsule_type="SHROUD_capsule", +# F_capsule_type="SHROUD_capsule", F_capsule_final_function="SHROUD_capsule_final", F_capsule_delete_function="SHROUD_capsule_delete", - F_array_type="SHROUD_array", c_array_shape="", c_array_size="1", @@ -748,6 +749,8 @@ def default_format(self, fmtdict, kwargs): self.eval_template("C_memory_dtor_function") + self.eval_template("F_array_type") + self.eval_template("F_capsule_type") # All class/methods and functions may go into this file or # just functions. self.eval_template("F_module_name", "_library") diff --git a/shroud/whelpers.py b/shroud/whelpers.py index 1b1021522..3138f0f8e 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -72,6 +72,8 @@ # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49111 # Instead, mangle the name with C_prefix. # See FHelpers copy_string +# +# This also applies to derived types which are bind(C). from . import typemap @@ -560,7 +562,7 @@ def add_capsule_helper(): derived_type=wformat( """ ! helper {hname} -type {F_capsule_type}+ +type :: {F_capsule_type}+ private type({F_capsule_data_type}) :: mem -contains From 20b2e07619f8d8a9f47ef6031063398e7507e1cf Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 6 Jul 2020 20:09:28 -0700 Subject: [PATCH 05/36] Remove test returnConstStructByValue It was generating the warning struct.h(33): warning #858: type qualifier on return type is meaningless const Cstruct1 returnConstStructByValue(int i, double d); --- regression/input/struct.yaml | 1 - regression/reference/struct-c/struct.json | 153 ------------------ regression/reference/struct-c/struct.log | 2 - regression/reference/struct-c/wrapfstruct.f | 25 --- .../reference/struct-class-c/pystructmodule.c | 61 ------- .../reference/struct-class-c/pystructutil.c | 7 - .../reference/struct-class-c/struct.json | 121 -------------- .../reference/struct-class-c/struct.log | 1 - .../struct-class-cxx/pystructmodule.cpp | 62 ------- .../struct-class-cxx/pystructutil.cpp | 8 - .../reference/struct-class-cxx/struct.json | 121 -------------- .../reference/struct-class-cxx/struct.log | 1 - regression/reference/struct-cxx/struct.json | 153 ------------------ regression/reference/struct-cxx/struct.log | 2 - regression/reference/struct-cxx/wrapfstruct.f | 23 --- .../reference/struct-cxx/wrapstruct.cpp | 22 --- regression/reference/struct-cxx/wrapstruct.h | 2 - .../struct-list-cxx/pystructmodule.cpp | 47 ------ .../reference/struct-list-cxx/struct.json | 120 -------------- .../reference/struct-list-cxx/struct.log | 1 - .../reference/struct-numpy-c/pystructmodule.c | 71 -------- .../reference/struct-numpy-c/pystructutil.c | 7 - .../reference/struct-numpy-c/struct.json | 121 -------------- .../reference/struct-numpy-c/struct.log | 1 - .../struct-numpy-cxx/pystructmodule.cpp | 73 --------- .../struct-numpy-cxx/pystructutil.cpp | 8 - .../reference/struct-numpy-cxx/struct.json | 121 -------------- .../reference/struct-numpy-cxx/struct.log | 1 - .../run/struct-class-cxx/python/test.py | 6 - regression/run/struct-numpy-c/python/test.py | 9 -- .../run/struct-numpy-cxx/python/test.py | 9 -- regression/run/struct/main.f | 4 - regression/run/struct/struct.c | 6 - regression/run/struct/struct.h | 1 - 34 files changed, 1371 deletions(-) diff --git a/regression/input/struct.yaml b/regression/input/struct.yaml index 73568ca51..1a8ff3f21 100644 --- a/regression/input/struct.yaml +++ b/regression/input/struct.yaml @@ -62,7 +62,6 @@ declarations: ###################################################################### - decl: Cstruct1 returnStructByValue(int i, double d); -- decl: const Cstruct1 returnConstStructByValue(int i, double d); - decl: Cstruct1 *returnStructPtr1(int i, double d) doxygen: diff --git a/regression/reference/struct-c/struct.json b/regression/reference/struct-c/struct.json index 1f148c1a1..b31560525 100644 --- a/regression/reference/struct-c/struct.json +++ b/regression/reference/struct-c/struct.json @@ -1589,159 +1589,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtc": { - "c_addr": "&", - "c_const": "", - "c_deref": "", - "c_member": ".", - "c_var": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "idtor": "0", - "sh_type": "SH_TYPE_DOUBLE", - "stmt0": "c_native_scalar_in", - "stmt1": "c_default" - }, - "fmtf": { - "F_pointer": "SHPTR_d", - "c_var": "d", - "f_intent": "IN", - "f_type": "real(C_DOUBLE)", - "f_var": "d", - "sh_type": "SH_TYPE_DOUBLE", - "stmt0": "f_native_scalar_in", - "stmt1": "f_default", - "stmtc0": "c_native_scalar_in", - "stmtc1": "c_default" - } - }, - "i": { - "fmtc": { - "c_addr": "&", - "c_const": "", - "c_deref": "", - "c_member": ".", - "c_var": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "idtor": "0", - "sh_type": "SH_TYPE_INT", - "stmt0": "c_native_scalar_in", - "stmt1": "c_default" - }, - "fmtf": { - "F_pointer": "SHPTR_i", - "c_var": "i", - "f_intent": "IN", - "f_type": "integer(C_INT)", - "f_var": "i", - "sh_type": "SH_TYPE_INT", - "stmt0": "f_native_scalar_in", - "stmt1": "f_default", - "stmtc0": "c_native_scalar_in", - "stmtc1": "c_default" - } - } - }, - "_fmtresult": { - "fmtc": { - "c_const": "const ", - "c_get_value": "", - "c_type": "Cstruct1", - "c_var": "SHC_rv", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "(Cstruct1 *) &SHC_rv", - "cxx_type": "Cstruct1", - "cxx_var": "SHC_rv", - "idtor": "0", - "sh_type": "SH_TYPE_STRUCT", - "stmt0": "c_struct_scalar_result", - "stmt1": "c_struct_result" - }, - "fmtf": { - "cxx_type": "Cstruct1", - "f_type": "type(cstruct1)", - "f_var": "SHT_rv", - "sh_type": "SH_TYPE_STRUCT", - "stmt0": "f_struct_scalar_result", - "stmt1": "f_struct_scalar_result", - "stmtc0": "c_struct_scalar_result", - "stmtc1": "c_struct_result" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "C_call_list": "i,\t d", - "C_name": "returnConstStructByValue", - "C_prototype": "int i,\t double d", - "C_return_type": "const Cstruct1", - "F_C_call": "c_return_const_struct_by_value", - "F_C_name": "return_const_struct_by_value", - "F_arg_c_call": "i,\t d", - "F_arguments": "i,\t d", - "F_name_function": "return_const_struct_by_value", - "F_name_generic": "return_const_struct_by_value", - "F_name_impl": "return_const_struct_by_value", - "F_result_clause": "\fresult(SHT_rv)", - "F_subprogram": "function", - "cxx_rv_decl": "const Cstruct1 SHC_rv", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-c/struct.log b/regression/reference/struct-c/struct.log index 61918bcaa..dbc64730a 100644 --- a/regression/reference/struct-c/struct.log +++ b/regression/reference/struct-c/struct.log @@ -8,7 +8,6 @@ C function int acceptStructInPtr(Cstruct1 * arg +intent(in)) C function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) C function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) C function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -C function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) C function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) C function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) C function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)+len) @@ -29,7 +28,6 @@ C-interface, Fortran function int acceptStructInPtr(Cstruct1 * arg +intent(in)) C-interface, Fortran function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) C-interface, Fortran function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) C-interface, Fortran function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -C-interface, Fortran function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) C-interface, Fortran function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) C-interface, Fortran function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) C-interface function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)+len) diff --git a/regression/reference/struct-c/wrapfstruct.f b/regression/reference/struct-c/wrapfstruct.f index 7a8da95bc..33d62f69a 100644 --- a/regression/reference/struct-c/wrapfstruct.f +++ b/regression/reference/struct-c/wrapfstruct.f @@ -241,31 +241,6 @@ function return_struct_by_value(i, d) & end function return_struct_by_value end interface - ! ---------------------------------------- - ! Function: const Cstruct1 returnConstStructByValue - ! Requested: c_struct_scalar_result - ! Match: c_struct_result - ! ---------------------------------------- - ! Argument: int i +intent(in)+value - ! Requested: c_native_scalar_in - ! Match: c_default - ! ---------------------------------------- - ! Argument: double d +intent(in)+value - ! Requested: c_native_scalar_in - ! Match: c_default - interface - function return_const_struct_by_value(i, d) & - result(SHT_rv) & - bind(C, name="returnConstStructByValue") - use iso_c_binding, only : C_DOUBLE, C_INT - import :: cstruct1 - implicit none - integer(C_INT), value, intent(IN) :: i - real(C_DOUBLE), value, intent(IN) :: d - type(cstruct1) :: SHT_rv - end function return_const_struct_by_value - end interface - ! ---------------------------------------- ! Function: Cstruct1 * returnStructPtr1 +deref(pointer) ! Requested: c_struct_*_result diff --git a/regression/reference/struct-class-c/pystructmodule.c b/regression/reference/struct-class-c/pystructmodule.c index 0b9e60c2d..da0a8a610 100644 --- a/regression/reference/struct-class-c/pystructmodule.c +++ b/regression/reference/struct-class-c/pystructmodule.c @@ -353,65 +353,6 @@ PY_returnStructByValue( // splicer end function.return_struct_by_value } -// ---------------------------------------- -// Function: const Cstruct1 returnConstStructByValue -// Exact: py_struct_result_class -// ---------------------------------------- -// Argument: int i +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -// ---------------------------------------- -// Argument: double d +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -static char PY_returnConstStructByValue__doc__[] = -"documentation" -; - -static PyObject * -PY_returnConstStructByValue( - PyObject *SHROUD_UNUSED(self), - PyObject *args, - PyObject *kwds) -{ -// splicer begin function.return_const_struct_by_value - int i; - double d; - char *SHT_kwlist[] = { - "i", - "d", - NULL }; - Cstruct1 * SHCXX_rv = NULL; - PyObject *SHTPy_rv = NULL; // struct_result_class - - if (!PyArg_ParseTupleAndKeywords(args, kwds, - "id:returnConstStructByValue", SHT_kwlist, &i, &d)) - return NULL; - - // result pre_call - SHCXX_rv = malloc(sizeof(Cstruct1)); - if (SHCXX_rv == NULL) { - PyErr_NoMemory(); - goto fail; - } - - *SHCXX_rv = returnConstStructByValue(i, d); - - // post_call - SHTPy_rv = PP_Cstruct1_to_Object_idtor(SHCXX_rv, 6); - if (SHTPy_rv == NULL) goto fail; - - return (PyObject *) SHTPy_rv; - -fail: - if (SHCXX_rv != NULL) { - PY_SHROUD_release_memory(6, SHCXX_rv); - } - Py_XDECREF(SHTPy_rv); - return NULL; -// splicer end function.return_const_struct_by_value -} - // ---------------------------------------- // Function: Cstruct1 * returnStructPtr1 +deref(pointer) // Exact: py_struct_result_class @@ -568,8 +509,6 @@ static PyMethodDef PY_methods[] = { METH_VARARGS|METH_KEYWORDS, PY_acceptStructInOutPtr__doc__}, {"returnStructByValue", (PyCFunction)PY_returnStructByValue, METH_VARARGS|METH_KEYWORDS, PY_returnStructByValue__doc__}, -{"returnConstStructByValue", (PyCFunction)PY_returnConstStructByValue, - METH_VARARGS|METH_KEYWORDS, PY_returnConstStructByValue__doc__}, {"returnStructPtr1", (PyCFunction)PY_returnStructPtr1, METH_VARARGS|METH_KEYWORDS, PY_returnStructPtr1__doc__}, {"returnStructPtr2", (PyCFunction)PY_returnStructPtr2, diff --git a/regression/reference/struct-class-c/pystructutil.c b/regression/reference/struct-class-c/pystructutil.c index 6a3228a51..053fc61d1 100644 --- a/regression/reference/struct-class-c/pystructutil.c +++ b/regression/reference/struct-class-c/pystructutil.c @@ -663,12 +663,6 @@ static void PY_SHROUD_capsule_destructor_5(void *ptr) free(ptr); } -// 6 - c const Cstruct1 * -static void PY_SHROUD_capsule_destructor_6(void *ptr) -{ - free(ptr); -} - // Code used to release arrays for NumPy objects // via a Capsule base object with a destructor. // Context strings @@ -679,7 +673,6 @@ static PY_SHROUD_dtor_context PY_SHROUD_capsule_context[] = { {"c Cstruct_list *", PY_SHROUD_capsule_destructor_3}, {"c Cstruct_numpy *", PY_SHROUD_capsule_destructor_4}, {"c Arrays1 *", PY_SHROUD_capsule_destructor_5}, - {"c const Cstruct1 *", PY_SHROUD_capsule_destructor_6}, {NULL, NULL}, }; diff --git a/regression/reference/struct-class-c/struct.json b/regression/reference/struct-class-c/struct.json index 37e0baedf..b9246656c 100644 --- a/regression/reference/struct-class-c/struct.json +++ b/regression/reference/struct-class-c/struct.json @@ -2304,127 +2304,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "double", - "c_var": "d", - "ctor_expr": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "data_var": "SHData_d", - "numpy_type": "NPY_DOUBLE", - "py_var": "SHPy_d", - "size_var": "SHSize_d", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_d" - } - }, - "i": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "int", - "c_var": "i", - "ctor_expr": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "data_var": "SHData_i", - "numpy_type": "NPY_INT", - "py_var": "SHPy_i", - "size_var": "SHSize_i", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_i" - } - } - }, - "_fmtresult": { - "fmtpy": { - "PYN_descr": "PY_Cstruct1_array_descr", - "PY_to_object_idtor_func": "PP_Cstruct1_to_Object_idtor", - "PyObject": "PY_Cstruct1", - "PyTypeObject": "PY_Cstruct1_Type", - "c_deref": "*", - "c_var": "SHCXX_rv", - "capsule_order": "6", - "ctor_expr": "*SHCXX_rv", - "cxx_addr": "", - "cxx_alloc_decl": "Cstruct1 * SHCXX_rv", - "cxx_member": "->", - "cxx_nonconst_ptr": "(Cstruct1 *) &SHCXX_rv", - "cxx_type": "Cstruct1", - "cxx_var": "SHCXX_rv", - "data_var": "SHData_rv", - "numpy_type": null, - "py_capsule": "SHC_SHCXX_rv", - "py_var": "SHTPy_rv", - "size_var": "SHSize_rv", - "stmt0": "py_struct_result_class", - "stmt1": "py_struct_result_class", - "value_var": "SHValue_rv" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "PY_name_impl": "PY_returnConstStructByValue", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-class-c/struct.log b/regression/reference/struct-class-c/struct.log index ba8f5f9cd..41e1d43ce 100644 --- a/regression/reference/struct-class-c/struct.log +++ b/regression/reference/struct-class-c/struct.log @@ -22,7 +22,6 @@ Python function int acceptStructInPtr(Cstruct1 * arg +intent(in)) Python function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) Python function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) Python function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -Python function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) Python function Cstruct_list * get_global_struct_list() diff --git a/regression/reference/struct-class-cxx/pystructmodule.cpp b/regression/reference/struct-class-cxx/pystructmodule.cpp index b3517f4c7..e991adc66 100644 --- a/regression/reference/struct-class-cxx/pystructmodule.cpp +++ b/regression/reference/struct-class-cxx/pystructmodule.cpp @@ -355,66 +355,6 @@ PY_returnStructByValue( // splicer end function.return_struct_by_value } -// ---------------------------------------- -// Function: const Cstruct1 returnConstStructByValue -// Exact: py_struct_result_class -// ---------------------------------------- -// Argument: int i +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -// ---------------------------------------- -// Argument: double d +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -static char PY_returnConstStructByValue__doc__[] = -"documentation" -; - -static PyObject * -PY_returnConstStructByValue( - PyObject *SHROUD_UNUSED(self), - PyObject *args, - PyObject *kwds) -{ -// splicer begin function.return_const_struct_by_value - int i; - double d; - const char *SHT_kwlist[] = { - "i", - "d", - nullptr }; - Cstruct1 * SHCXX_rv = nullptr; - PyObject *SHTPy_rv = nullptr; // struct_result_class - - if (!PyArg_ParseTupleAndKeywords(args, kwds, - "id:returnConstStructByValue", const_cast(SHT_kwlist), - &i, &d)) - return nullptr; - - // result pre_call - SHCXX_rv = new Cstruct1; - if (SHCXX_rv == nullptr) { - PyErr_NoMemory(); - goto fail; - } - - *SHCXX_rv = returnConstStructByValue(i, d); - - // post_call - SHTPy_rv = PP_Cstruct1_to_Object_idtor(SHCXX_rv, 6); - if (SHTPy_rv == nullptr) goto fail; - - return (PyObject *) SHTPy_rv; - -fail: - if (SHCXX_rv != nullptr) { - PY_SHROUD_release_memory(6, SHCXX_rv); - } - Py_XDECREF(SHTPy_rv); - return nullptr; -// splicer end function.return_const_struct_by_value -} - // ---------------------------------------- // Function: Cstruct1 * returnStructPtr1 +deref(pointer) // Exact: py_struct_result_class @@ -571,8 +511,6 @@ static PyMethodDef PY_methods[] = { METH_VARARGS|METH_KEYWORDS, PY_acceptStructInOutPtr__doc__}, {"returnStructByValue", (PyCFunction)PY_returnStructByValue, METH_VARARGS|METH_KEYWORDS, PY_returnStructByValue__doc__}, -{"returnConstStructByValue", (PyCFunction)PY_returnConstStructByValue, - METH_VARARGS|METH_KEYWORDS, PY_returnConstStructByValue__doc__}, {"returnStructPtr1", (PyCFunction)PY_returnStructPtr1, METH_VARARGS|METH_KEYWORDS, PY_returnStructPtr1__doc__}, {"returnStructPtr2", (PyCFunction)PY_returnStructPtr2, diff --git a/regression/reference/struct-class-cxx/pystructutil.cpp b/regression/reference/struct-class-cxx/pystructutil.cpp index cf9a584ff..79a73065d 100644 --- a/regression/reference/struct-class-cxx/pystructutil.cpp +++ b/regression/reference/struct-class-cxx/pystructutil.cpp @@ -675,13 +675,6 @@ static void PY_SHROUD_capsule_destructor_5(void *ptr) delete cxx_ptr; } -// 6 - cxx const Cstruct1 * -static void PY_SHROUD_capsule_destructor_6(void *ptr) -{ - const Cstruct1 * cxx_ptr = static_cast(ptr); - delete cxx_ptr; -} - // Code used to release arrays for NumPy objects // via a Capsule base object with a destructor. // Context strings @@ -692,7 +685,6 @@ static PY_SHROUD_dtor_context PY_SHROUD_capsule_context[] = { {"cxx Cstruct_list *", PY_SHROUD_capsule_destructor_3}, {"cxx Cstruct_numpy *", PY_SHROUD_capsule_destructor_4}, {"cxx Arrays1 *", PY_SHROUD_capsule_destructor_5}, - {"cxx const Cstruct1 *", PY_SHROUD_capsule_destructor_6}, {nullptr, nullptr}, }; diff --git a/regression/reference/struct-class-cxx/struct.json b/regression/reference/struct-class-cxx/struct.json index befc6ac41..daa90c52c 100644 --- a/regression/reference/struct-class-cxx/struct.json +++ b/regression/reference/struct-class-cxx/struct.json @@ -2304,127 +2304,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "double", - "c_var": "d", - "ctor_expr": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "data_var": "SHData_d", - "numpy_type": "NPY_DOUBLE", - "py_var": "SHPy_d", - "size_var": "SHSize_d", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_d" - } - }, - "i": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "int", - "c_var": "i", - "ctor_expr": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "data_var": "SHData_i", - "numpy_type": "NPY_INT", - "py_var": "SHPy_i", - "size_var": "SHSize_i", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_i" - } - } - }, - "_fmtresult": { - "fmtpy": { - "PYN_descr": "PY_Cstruct1_array_descr", - "PY_to_object_idtor_func": "PP_Cstruct1_to_Object_idtor", - "PyObject": "PY_Cstruct1", - "PyTypeObject": "PY_Cstruct1_Type", - "c_deref": "*", - "c_var": "SHCXX_rv", - "capsule_order": "6", - "ctor_expr": "*SHCXX_rv", - "cxx_addr": "", - "cxx_alloc_decl": "Cstruct1 * SHCXX_rv", - "cxx_member": "->", - "cxx_nonconst_ptr": "const_cast\t(&SHCXX_rv)", - "cxx_type": "Cstruct1", - "cxx_var": "SHCXX_rv", - "data_var": "SHData_rv", - "numpy_type": null, - "py_capsule": "SHC_SHCXX_rv", - "py_var": "SHTPy_rv", - "size_var": "SHSize_rv", - "stmt0": "py_struct_result_class", - "stmt1": "py_struct_result_class", - "value_var": "SHValue_rv" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "PY_name_impl": "PY_returnConstStructByValue", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-class-cxx/struct.log b/regression/reference/struct-class-cxx/struct.log index dfb8b0e1d..cdc4af1df 100644 --- a/regression/reference/struct-class-cxx/struct.log +++ b/regression/reference/struct-class-cxx/struct.log @@ -22,7 +22,6 @@ Python function int acceptStructInPtr(Cstruct1 * arg +intent(in)) Python function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) Python function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) Python function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -Python function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) Python function Cstruct_list * get_global_struct_list() diff --git a/regression/reference/struct-cxx/struct.json b/regression/reference/struct-cxx/struct.json index b35063e2b..62c87a1b8 100644 --- a/regression/reference/struct-cxx/struct.json +++ b/regression/reference/struct-cxx/struct.json @@ -1589,159 +1589,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtc": { - "c_addr": "&", - "c_const": "", - "c_deref": "", - "c_member": ".", - "c_var": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "idtor": "0", - "sh_type": "SH_TYPE_DOUBLE", - "stmt0": "c_native_scalar_in", - "stmt1": "c_default" - }, - "fmtf": { - "F_pointer": "SHPTR_d", - "c_var": "d", - "f_intent": "IN", - "f_type": "real(C_DOUBLE)", - "f_var": "d", - "sh_type": "SH_TYPE_DOUBLE", - "stmt0": "f_native_scalar_in", - "stmt1": "f_default", - "stmtc0": "c_native_scalar_in", - "stmtc1": "c_default" - } - }, - "i": { - "fmtc": { - "c_addr": "&", - "c_const": "", - "c_deref": "", - "c_member": ".", - "c_var": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "idtor": "0", - "sh_type": "SH_TYPE_INT", - "stmt0": "c_native_scalar_in", - "stmt1": "c_default" - }, - "fmtf": { - "F_pointer": "SHPTR_i", - "c_var": "i", - "f_intent": "IN", - "f_type": "integer(C_INT)", - "f_var": "i", - "sh_type": "SH_TYPE_INT", - "stmt0": "f_native_scalar_in", - "stmt1": "f_default", - "stmtc0": "c_native_scalar_in", - "stmtc1": "c_default" - } - } - }, - "_fmtresult": { - "fmtc": { - "c_const": "const ", - "c_get_value": "*", - "c_type": "STR_cstruct1", - "c_var": "SHC_rv", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "const_cast\t(&SHCXX_rv)", - "cxx_type": "Cstruct1", - "cxx_var": "SHCXX_rv", - "idtor": "0", - "sh_type": "SH_TYPE_STRUCT", - "stmt0": "c_struct_scalar_result", - "stmt1": "c_struct_result" - }, - "fmtf": { - "cxx_type": "Cstruct1", - "f_type": "type(cstruct1)", - "f_var": "SHT_rv", - "sh_type": "SH_TYPE_STRUCT", - "stmt0": "f_struct_scalar_result", - "stmt1": "f_struct_scalar_result", - "stmtc0": "c_struct_scalar_result", - "stmtc1": "c_struct_result" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "C_call_list": "i,\t d", - "C_name": "STR_return_const_struct_by_value", - "C_prototype": "int i,\t double d", - "C_return_type": "const STR_cstruct1", - "F_C_call": "c_return_const_struct_by_value", - "F_C_name": "return_const_struct_by_value", - "F_arg_c_call": "i,\t d", - "F_arguments": "i,\t d", - "F_name_function": "return_const_struct_by_value", - "F_name_generic": "return_const_struct_by_value", - "F_name_impl": "return_const_struct_by_value", - "F_result_clause": "\fresult(SHT_rv)", - "F_subprogram": "function", - "cxx_rv_decl": "const Cstruct1 SHCXX_rv", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-cxx/struct.log b/regression/reference/struct-cxx/struct.log index a89bf029c..2e4ab8eff 100644 --- a/regression/reference/struct-cxx/struct.log +++ b/regression/reference/struct-cxx/struct.log @@ -13,7 +13,6 @@ C function int acceptStructInPtr(Cstruct1 * arg +intent(in)) C function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) C function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) C function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -C function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) C function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) C function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) C function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)+len) @@ -34,7 +33,6 @@ C-interface, Fortran function int acceptStructInPtr(Cstruct1 * arg +intent(in)) C-interface, Fortran function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) C-interface, Fortran function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) C-interface, Fortran function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -C-interface, Fortran function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) C-interface, Fortran function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) C-interface, Fortran function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) C-interface function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)+len) diff --git a/regression/reference/struct-cxx/wrapfstruct.f b/regression/reference/struct-cxx/wrapfstruct.f index b486290d6..a8204d5d0 100644 --- a/regression/reference/struct-cxx/wrapfstruct.f +++ b/regression/reference/struct-cxx/wrapfstruct.f @@ -227,29 +227,6 @@ function return_struct_by_value(i, d) & type(cstruct1) :: SHT_rv end function return_struct_by_value - ! ---------------------------------------- - ! Function: const Cstruct1 returnConstStructByValue - ! Requested: c_struct_scalar_result - ! Match: c_struct_result - ! ---------------------------------------- - ! Argument: int i +intent(in)+value - ! Requested: c_native_scalar_in - ! Match: c_default - ! ---------------------------------------- - ! Argument: double d +intent(in)+value - ! Requested: c_native_scalar_in - ! Match: c_default - function return_const_struct_by_value(i, d) & - result(SHT_rv) & - bind(C, name="STR_return_const_struct_by_value") - use iso_c_binding, only : C_DOUBLE, C_INT - import :: cstruct1 - implicit none - integer(C_INT), value, intent(IN) :: i - real(C_DOUBLE), value, intent(IN) :: d - type(cstruct1) :: SHT_rv - end function return_const_struct_by_value - ! ---------------------------------------- ! Function: Cstruct1 * returnStructPtr1 +deref(pointer) ! Requested: c_struct_*_result diff --git a/regression/reference/struct-cxx/wrapstruct.cpp b/regression/reference/struct-cxx/wrapstruct.cpp index 608ad8041..96ffb54e7 100644 --- a/regression/reference/struct-cxx/wrapstruct.cpp +++ b/regression/reference/struct-cxx/wrapstruct.cpp @@ -204,28 +204,6 @@ STR_cstruct1 STR_return_struct_by_value(int i, double d) // splicer end function.return_struct_by_value } -// ---------------------------------------- -// Function: const Cstruct1 returnConstStructByValue -// Requested: c_struct_scalar_result -// Match: c_struct_result -// ---------------------------------------- -// Argument: int i +intent(in)+value -// Requested: c_native_scalar_in -// Match: c_default -// ---------------------------------------- -// Argument: double d +intent(in)+value -// Requested: c_native_scalar_in -// Match: c_default -const STR_cstruct1 STR_return_const_struct_by_value(int i, double d) -{ - // splicer begin function.return_const_struct_by_value - const Cstruct1 SHCXX_rv = returnConstStructByValue(i, d); - const STR_cstruct1 * SHC_rv = static_cast( - static_cast(&SHCXX_rv)); - return *SHC_rv; - // splicer end function.return_const_struct_by_value -} - /** * \brief Return a pointer to a struct * diff --git a/regression/reference/struct-cxx/wrapstruct.h b/regression/reference/struct-cxx/wrapstruct.h index 657124eff..6aecd2497 100644 --- a/regression/reference/struct-cxx/wrapstruct.h +++ b/regression/reference/struct-cxx/wrapstruct.h @@ -82,8 +82,6 @@ void STR_accept_struct_in_out_ptr(STR_cstruct1 * arg); STR_cstruct1 STR_return_struct_by_value(int i, double d); -const STR_cstruct1 STR_return_const_struct_by_value(int i, double d); - STR_cstruct1 * STR_return_struct_ptr1(int i, double d); STR_cstruct1 * STR_return_struct_ptr2(int i, double d, char * outbuf); diff --git a/regression/reference/struct-list-cxx/pystructmodule.cpp b/regression/reference/struct-list-cxx/pystructmodule.cpp index 68c977b8d..98a1429a6 100644 --- a/regression/reference/struct-list-cxx/pystructmodule.cpp +++ b/regression/reference/struct-list-cxx/pystructmodule.cpp @@ -329,51 +329,6 @@ PY_returnStructByValue( // splicer end function.return_struct_by_value } -// ---------------------------------------- -// Function: const Cstruct1 returnConstStructByValue -// Requested: py_struct_result_list -// Match: py_default -// ---------------------------------------- -// Argument: int i +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -// ---------------------------------------- -// Argument: double d +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -static char PY_returnConstStructByValue__doc__[] = -"documentation" -; - -static PyObject * -PY_returnConstStructByValue( - PyObject *SHROUD_UNUSED(self), - PyObject *args, - PyObject *kwds) -{ -// splicer begin function.return_const_struct_by_value - int i; - double d; - const char *SHT_kwlist[] = { - "i", - "d", - nullptr }; - PY_Cstruct1 * SHTPy_rv = nullptr; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, - "id:returnConstStructByValue", const_cast(SHT_kwlist), - &i, &d)) - return nullptr; - - const Cstruct1 SHCXX_rv = returnConstStructByValue(i, d); - - // post_call - SHTPy_rv = Py_BuildValue("O", SHCXX_rv); - - return (PyObject *) SHTPy_rv; -// splicer end function.return_const_struct_by_value -} - // ---------------------------------------- // Function: Cstruct1 * returnStructPtr1 +deref(pointer) // Requested: py_struct_result_list @@ -516,8 +471,6 @@ static PyMethodDef PY_methods[] = { METH_VARARGS|METH_KEYWORDS, PY_acceptStructInOutPtr__doc__}, {"returnStructByValue", (PyCFunction)PY_returnStructByValue, METH_VARARGS|METH_KEYWORDS, PY_returnStructByValue__doc__}, -{"returnConstStructByValue", (PyCFunction)PY_returnConstStructByValue, - METH_VARARGS|METH_KEYWORDS, PY_returnConstStructByValue__doc__}, {"returnStructPtr1", (PyCFunction)PY_returnStructPtr1, METH_VARARGS|METH_KEYWORDS, PY_returnStructPtr1__doc__}, {"returnStructPtr2", (PyCFunction)PY_returnStructPtr2, diff --git a/regression/reference/struct-list-cxx/struct.json b/regression/reference/struct-list-cxx/struct.json index e14eeb996..924e1f234 100644 --- a/regression/reference/struct-list-cxx/struct.json +++ b/regression/reference/struct-list-cxx/struct.json @@ -1293,126 +1293,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "double", - "c_var": "d", - "ctor_expr": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "data_var": "SHData_d", - "numpy_type": "NPY_DOUBLE", - "py_var": "SHPy_d", - "size_var": "SHSize_d", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_d" - } - }, - "i": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "int", - "c_var": "i", - "ctor_expr": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "data_var": "SHData_i", - "numpy_type": "NPY_INT", - "py_var": "SHPy_i", - "size_var": "SHSize_i", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_i" - } - } - }, - "_fmtresult": { - "fmtpy": { - "PYN_descr": "PY_Cstruct1_array_descr", - "PY_build_format": "O", - "PY_to_object_idtor_func": "PP_Cstruct1_to_Object_idtor", - "PyObject": "PY_Cstruct1", - "PyTypeObject": "PY_Cstruct1_Type", - "c_deref": "", - "c_var": "SHCXX_rv", - "ctor_expr": "SHCXX_rv", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "const_cast\t(&SHCXX_rv)", - "cxx_type": "Cstruct1", - "cxx_var": "SHCXX_rv", - "data_var": "SHData_rv", - "numpy_type": null, - "py_var": "SHTPy_rv", - "size_var": "SHSize_rv", - "stmt0": "py_struct_result_list", - "stmt1": "py_default", - "value_var": "SHValue_rv", - "vargs": "SHCXX_rv" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "PY_name_impl": "PY_returnConstStructByValue", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-list-cxx/struct.log b/regression/reference/struct-list-cxx/struct.log index 6487138d0..0bfa9e9e9 100644 --- a/regression/reference/struct-list-cxx/struct.log +++ b/regression/reference/struct-list-cxx/struct.log @@ -7,7 +7,6 @@ Python function int acceptStructInPtr(Cstruct1 * arg +intent(in)) Python function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) Python function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) Python function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -Python function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) Python function Cstruct_list * get_global_struct_list() diff --git a/regression/reference/struct-numpy-c/pystructmodule.c b/regression/reference/struct-numpy-c/pystructmodule.c index 46f792058..14eacb878 100644 --- a/regression/reference/struct-numpy-c/pystructmodule.c +++ b/regression/reference/struct-numpy-c/pystructmodule.c @@ -468,75 +468,6 @@ PY_returnStructByValue( // splicer end function.return_struct_by_value } -// ---------------------------------------- -// Function: const Cstruct1 returnConstStructByValue -// Exact: py_struct_result_numpy -// ---------------------------------------- -// Argument: int i +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -// ---------------------------------------- -// Argument: double d +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -static char PY_returnConstStructByValue__doc__[] = -"documentation" -; - -static PyObject * -PY_returnConstStructByValue( - PyObject *SHROUD_UNUSED(self), - PyObject *args, - PyObject *kwds) -{ -// splicer begin function.return_const_struct_by_value - int i; - double d; - char *SHT_kwlist[] = { - "i", - "d", - NULL }; - Cstruct1 * SHCXX_rv = NULL; - PyObject * SHTPy_rv = NULL; - PyObject *SHC_SHCXX_rv = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, - "id:returnConstStructByValue", SHT_kwlist, &i, &d)) - return NULL; - - // result pre_call - SHCXX_rv = malloc(sizeof(Cstruct1)); - if (SHCXX_rv == NULL) { - PyErr_NoMemory(); - goto fail; - } - - *SHCXX_rv = returnConstStructByValue(i, d); - - // post_call - Py_INCREF(PY_Cstruct1_array_descr); - SHTPy_rv = PyArray_NewFromDescr(&PyArray_Type, - PY_Cstruct1_array_descr, 0, NULL, NULL, SHCXX_rv, 0, NULL); - if (SHTPy_rv == NULL) goto fail; - SHC_SHCXX_rv = PyCapsule_New(SHCXX_rv, "PY_array_dtor", - PY_SHROUD_capsule_destructor); - if (SHC_SHCXX_rv == NULL) goto fail; - PyCapsule_SetContext(SHC_SHCXX_rv, PY_SHROUD_fetch_context(2)); - if (PyArray_SetBaseObject((PyArrayObject *) SHTPy_rv, - SHC_SHCXX_rv) < 0) goto fail; - - return (PyObject *) SHTPy_rv; - -fail: - if (SHCXX_rv != NULL) { - PY_SHROUD_release_memory(2, SHCXX_rv); - } - Py_XDECREF(SHTPy_rv); - Py_XDECREF(SHC_SHCXX_rv); - return NULL; -// splicer end function.return_const_struct_by_value -} - // ---------------------------------------- // Function: Cstruct1 * returnStructPtr1 +deref(pointer) // Exact: py_struct_result_numpy @@ -699,8 +630,6 @@ static PyMethodDef PY_methods[] = { METH_VARARGS|METH_KEYWORDS, PY_acceptStructInOutPtr__doc__}, {"returnStructByValue", (PyCFunction)PY_returnStructByValue, METH_VARARGS|METH_KEYWORDS, PY_returnStructByValue__doc__}, -{"returnConstStructByValue", (PyCFunction)PY_returnConstStructByValue, - METH_VARARGS|METH_KEYWORDS, PY_returnConstStructByValue__doc__}, {"returnStructPtr1", (PyCFunction)PY_returnStructPtr1, METH_VARARGS|METH_KEYWORDS, PY_returnStructPtr1__doc__}, {"returnStructPtr2", (PyCFunction)PY_returnStructPtr2, diff --git a/regression/reference/struct-numpy-c/pystructutil.c b/regression/reference/struct-numpy-c/pystructutil.c index 88eade222..985c1e5e9 100644 --- a/regression/reference/struct-numpy-c/pystructutil.c +++ b/regression/reference/struct-numpy-c/pystructutil.c @@ -40,19 +40,12 @@ static void PY_SHROUD_capsule_destructor_1(void *ptr) free(ptr); } -// 2 - c const Cstruct1 * -static void PY_SHROUD_capsule_destructor_2(void *ptr) -{ - free(ptr); -} - // Code used to release arrays for NumPy objects // via a Capsule base object with a destructor. // Context strings static PY_SHROUD_dtor_context PY_SHROUD_capsule_context[] = { {"--none--", PY_SHROUD_capsule_destructor_0}, {"c Cstruct1 *", PY_SHROUD_capsule_destructor_1}, - {"c const Cstruct1 *", PY_SHROUD_capsule_destructor_2}, {NULL, NULL}, }; diff --git a/regression/reference/struct-numpy-c/struct.json b/regression/reference/struct-numpy-c/struct.json index 9d981eef7..748509aca 100644 --- a/regression/reference/struct-numpy-c/struct.json +++ b/regression/reference/struct-numpy-c/struct.json @@ -1290,127 +1290,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "double", - "c_var": "d", - "ctor_expr": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "data_var": "SHData_d", - "numpy_type": "NPY_DOUBLE", - "py_var": "SHPy_d", - "size_var": "SHSize_d", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_d" - } - }, - "i": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "int", - "c_var": "i", - "ctor_expr": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "data_var": "SHData_i", - "numpy_type": "NPY_INT", - "py_var": "SHPy_i", - "size_var": "SHSize_i", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_i" - } - } - }, - "_fmtresult": { - "fmtpy": { - "PYN_descr": "PY_Cstruct1_array_descr", - "PY_to_object_idtor_func": "PP_Cstruct1_to_Object_idtor", - "PyObject": "PY_Cstruct1", - "PyTypeObject": "PY_Cstruct1_Type", - "c_deref": "*", - "c_var": "SHCXX_rv", - "capsule_order": "2", - "ctor_expr": "*SHCXX_rv", - "cxx_addr": "", - "cxx_alloc_decl": "Cstruct1 * SHCXX_rv", - "cxx_member": "->", - "cxx_nonconst_ptr": "(Cstruct1 *) &SHCXX_rv", - "cxx_type": "Cstruct1", - "cxx_var": "SHCXX_rv", - "data_var": "SHData_rv", - "numpy_type": null, - "py_capsule": "SHC_SHCXX_rv", - "py_var": "SHTPy_rv", - "size_var": "SHSize_rv", - "stmt0": "py_struct_result_numpy", - "stmt1": "py_struct_result_numpy", - "value_var": "SHValue_rv" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "PY_name_impl": "PY_returnConstStructByValue", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-numpy-c/struct.log b/regression/reference/struct-numpy-c/struct.log index 8b91e4e2b..5e3688b19 100644 --- a/regression/reference/struct-numpy-c/struct.log +++ b/regression/reference/struct-numpy-c/struct.log @@ -7,7 +7,6 @@ Python function int acceptStructInPtr(Cstruct1 * arg +intent(in)) Python function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) Python function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) Python function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -Python function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) Python function Cstruct_list * get_global_struct_list() diff --git a/regression/reference/struct-numpy-cxx/pystructmodule.cpp b/regression/reference/struct-numpy-cxx/pystructmodule.cpp index 5aa945dc4..fac454160 100644 --- a/regression/reference/struct-numpy-cxx/pystructmodule.cpp +++ b/regression/reference/struct-numpy-cxx/pystructmodule.cpp @@ -478,77 +478,6 @@ PY_returnStructByValue( // splicer end function.return_struct_by_value } -// ---------------------------------------- -// Function: const Cstruct1 returnConstStructByValue -// Exact: py_struct_result_numpy -// ---------------------------------------- -// Argument: int i +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -// ---------------------------------------- -// Argument: double d +intent(in)+value -// Requested: py_native_scalar_in -// Match: py_default -static char PY_returnConstStructByValue__doc__[] = -"documentation" -; - -static PyObject * -PY_returnConstStructByValue( - PyObject *SHROUD_UNUSED(self), - PyObject *args, - PyObject *kwds) -{ -// splicer begin function.return_const_struct_by_value - int i; - double d; - const char *SHT_kwlist[] = { - "i", - "d", - nullptr }; - Cstruct1 * SHCXX_rv = nullptr; - PyObject * SHTPy_rv = nullptr; - PyObject *SHC_SHCXX_rv = nullptr; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, - "id:returnConstStructByValue", const_cast(SHT_kwlist), - &i, &d)) - return nullptr; - - // result pre_call - SHCXX_rv = new Cstruct1; - if (SHCXX_rv == nullptr) { - PyErr_NoMemory(); - goto fail; - } - - *SHCXX_rv = returnConstStructByValue(i, d); - - // post_call - Py_INCREF(PY_Cstruct1_array_descr); - SHTPy_rv = PyArray_NewFromDescr(&PyArray_Type, - PY_Cstruct1_array_descr, 0, nullptr, - nullptr, SHCXX_rv, 0, nullptr); - if (SHTPy_rv == nullptr) goto fail; - SHC_SHCXX_rv = PyCapsule_New(SHCXX_rv, "PY_array_dtor", - PY_SHROUD_capsule_destructor); - if (SHC_SHCXX_rv == nullptr) goto fail; - PyCapsule_SetContext(SHC_SHCXX_rv, PY_SHROUD_fetch_context(2)); - if (PyArray_SetBaseObject(reinterpret_cast - (SHTPy_rv), SHC_SHCXX_rv) < 0) goto fail; - - return (PyObject *) SHTPy_rv; - -fail: - if (SHCXX_rv != nullptr) { - PY_SHROUD_release_memory(2, SHCXX_rv); - } - Py_XDECREF(SHTPy_rv); - Py_XDECREF(SHC_SHCXX_rv); - return nullptr; -// splicer end function.return_const_struct_by_value -} - // ---------------------------------------- // Function: Cstruct1 * returnStructPtr1 +deref(pointer) // Exact: py_struct_result_numpy @@ -714,8 +643,6 @@ static PyMethodDef PY_methods[] = { METH_VARARGS|METH_KEYWORDS, PY_acceptStructInOutPtr__doc__}, {"returnStructByValue", (PyCFunction)PY_returnStructByValue, METH_VARARGS|METH_KEYWORDS, PY_returnStructByValue__doc__}, -{"returnConstStructByValue", (PyCFunction)PY_returnConstStructByValue, - METH_VARARGS|METH_KEYWORDS, PY_returnConstStructByValue__doc__}, {"returnStructPtr1", (PyCFunction)PY_returnStructPtr1, METH_VARARGS|METH_KEYWORDS, PY_returnStructPtr1__doc__}, {"returnStructPtr2", (PyCFunction)PY_returnStructPtr2, diff --git a/regression/reference/struct-numpy-cxx/pystructutil.cpp b/regression/reference/struct-numpy-cxx/pystructutil.cpp index ad6ef58b8..9ac0b3919 100644 --- a/regression/reference/struct-numpy-cxx/pystructutil.cpp +++ b/regression/reference/struct-numpy-cxx/pystructutil.cpp @@ -41,20 +41,12 @@ static void PY_SHROUD_capsule_destructor_1(void *ptr) delete cxx_ptr; } -// 2 - cxx const Cstruct1 * -static void PY_SHROUD_capsule_destructor_2(void *ptr) -{ - const Cstruct1 * cxx_ptr = static_cast(ptr); - delete cxx_ptr; -} - // Code used to release arrays for NumPy objects // via a Capsule base object with a destructor. // Context strings static PY_SHROUD_dtor_context PY_SHROUD_capsule_context[] = { {"--none--", PY_SHROUD_capsule_destructor_0}, {"cxx Cstruct1 *", PY_SHROUD_capsule_destructor_1}, - {"cxx const Cstruct1 *", PY_SHROUD_capsule_destructor_2}, {nullptr, nullptr}, }; diff --git a/regression/reference/struct-numpy-cxx/struct.json b/regression/reference/struct-numpy-cxx/struct.json index 626d9e7a5..4e2265921 100644 --- a/regression/reference/struct-numpy-cxx/struct.json +++ b/regression/reference/struct-numpy-cxx/struct.json @@ -1290,127 +1290,6 @@ }, "options": {} }, - { - "_fmtargs": { - "d": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "double", - "c_var": "d", - "ctor_expr": "d", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&d", - "cxx_type": "double", - "cxx_var": "d", - "data_var": "SHData_d", - "numpy_type": "NPY_DOUBLE", - "py_var": "SHPy_d", - "size_var": "SHSize_d", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_d" - } - }, - "i": { - "fmtpy": { - "c_const": "", - "c_deref": "", - "c_type": "int", - "c_var": "i", - "ctor_expr": "i", - "cxx_addr": "&", - "cxx_member": ".", - "cxx_nonconst_ptr": "&i", - "cxx_type": "int", - "cxx_var": "i", - "data_var": "SHData_i", - "numpy_type": "NPY_INT", - "py_var": "SHPy_i", - "size_var": "SHSize_i", - "stmt0": "py_native_scalar_in", - "stmt1": "py_default", - "value_var": "SHValue_i" - } - } - }, - "_fmtresult": { - "fmtpy": { - "PYN_descr": "PY_Cstruct1_array_descr", - "PY_to_object_idtor_func": "PP_Cstruct1_to_Object_idtor", - "PyObject": "PY_Cstruct1", - "PyTypeObject": "PY_Cstruct1_Type", - "c_deref": "*", - "c_var": "SHCXX_rv", - "capsule_order": "2", - "ctor_expr": "*SHCXX_rv", - "cxx_addr": "", - "cxx_alloc_decl": "Cstruct1 * SHCXX_rv", - "cxx_member": "->", - "cxx_nonconst_ptr": "const_cast\t(&SHCXX_rv)", - "cxx_type": "Cstruct1", - "cxx_var": "SHCXX_rv", - "data_var": "SHData_rv", - "numpy_type": null, - "py_capsule": "SHC_SHCXX_rv", - "py_var": "SHTPy_rv", - "size_var": "SHSize_rv", - "stmt0": "py_struct_result_numpy", - "stmt1": "py_struct_result_numpy", - "value_var": "SHValue_rv" - } - }, - "ast": { - "const": true, - "declarator": { - "name": "returnConstStructByValue", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "i", - "pointer": [] - }, - "specifier": [ - "int" - ], - "typemap_name": "int" - }, - { - "attrs": { - "intent": "in", - "value": true - }, - "declarator": { - "name": "d", - "pointer": [] - }, - "specifier": [ - "double" - ], - "typemap_name": "double" - } - ], - "specifier": [ - "Cstruct1" - ], - "typemap_name": "Cstruct1" - }, - "decl": "const Cstruct1 returnConstStructByValue(int i, double d);", - "declgen": "const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value)", - "fmtdict": { - "PY_name_impl": "PY_returnConstStructByValue", - "function_name": "returnConstStructByValue", - "underscore_name": "return_const_struct_by_value" - }, - "options": {} - }, { "_fmtargs": { "d": { diff --git a/regression/reference/struct-numpy-cxx/struct.log b/regression/reference/struct-numpy-cxx/struct.log index d3483e3ec..56c9fd817 100644 --- a/regression/reference/struct-numpy-cxx/struct.log +++ b/regression/reference/struct-numpy-cxx/struct.log @@ -7,7 +7,6 @@ Python function int acceptStructInPtr(Cstruct1 * arg +intent(in)) Python function void acceptStructOutPtr(Cstruct1 * arg +intent(out), int i +intent(in)+value, double d +intent(in)+value) Python function void acceptStructInOutPtr(Cstruct1 * arg +intent(inout)) Python function Cstruct1 returnStructByValue(int i +intent(in)+value, double d +intent(in)+value) -Python function const Cstruct1 returnConstStructByValue(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr1(int i +intent(in)+value, double d +intent(in)+value) Python function Cstruct1 * returnStructPtr2(int i +intent(in)+value, double d +intent(in)+value, char * outbuf +charlen(LENOUTBUF)+intent(out)) Python function Cstruct_list * get_global_struct_list() diff --git a/regression/run/struct-class-cxx/python/test.py b/regression/run/struct-class-cxx/python/test.py index fb9009014..2b103cfdb 100644 --- a/regression/run/struct-class-cxx/python/test.py +++ b/regression/run/struct-class-cxx/python/test.py @@ -86,12 +86,6 @@ def test_returnStructByValue(self): self.assertEqual(1, out.ifield) self.assertEqual(2.5, out.dfield) - def test_returnConstStructByValue(self): - out = cstruct.returnStructByValue(1, 2.5) - self.assertIsInstance(out, cstruct.Cstruct1) - self.assertEqual(1, out.ifield) - self.assertEqual(2.5, out.dfield) - def test_returnStructPtr1(self): out = cstruct.returnStructPtr1(33, 33.5) self.assertIsInstance(out, cstruct.Cstruct1) diff --git a/regression/run/struct-numpy-c/python/test.py b/regression/run/struct-numpy-c/python/test.py index 204eba9e0..d08cf7396 100644 --- a/regression/run/struct-numpy-c/python/test.py +++ b/regression/run/struct-numpy-c/python/test.py @@ -112,15 +112,6 @@ def test_returnStructByValue(self): self.assertEqual(1, out["ifield"]) self.assertEqual(2.5, out["dfield"]) - def test_returnConstStructByValue(self): - out = cstruct.returnConstStructByValue(1, 2.5) - self.assertIsInstance(out, np.ndarray) - self.assertIs(out.dtype, cstruct.Cstruct1_dtype) - self.assertEqual(0, out.ndim) - self.assertEqual(1, out.size) - self.assertEqual(1, out["ifield"]) - self.assertEqual(2.5, out["dfield"]) - def test_returnStructPtr1(self): out = cstruct.returnStructPtr1(33, 33.5) self.assertIsInstance(out, np.ndarray) diff --git a/regression/run/struct-numpy-cxx/python/test.py b/regression/run/struct-numpy-cxx/python/test.py index 824cbea9a..fbc212a74 100644 --- a/regression/run/struct-numpy-cxx/python/test.py +++ b/regression/run/struct-numpy-cxx/python/test.py @@ -112,15 +112,6 @@ def test_returnStructByValue(self): self.assertEqual(1, out["ifield"]) self.assertEqual(2.5, out["dfield"]) - def test_returnConstStructByValue(self): - out = cstruct.returnConstStructByValue(1, 2.5) - self.assertIsInstance(out, np.ndarray) - self.assertIs(out.dtype, cstruct.Cstruct1_dtype) - self.assertEqual(0, out.ndim) - self.assertEqual(1, out.size) - self.assertEqual(1, out["ifield"]) - self.assertEqual(2.5, out["dfield"]) - def test_returnStructPtr1(self): out = cstruct.returnStructPtr1(33, 33.5) self.assertIsInstance(out, np.ndarray) diff --git a/regression/run/struct/main.f b/regression/run/struct/main.f index df94f4d14..c40090f5a 100644 --- a/regression/run/struct/main.f +++ b/regression/run/struct/main.f @@ -90,10 +90,6 @@ subroutine test_struct2 call assert_equals(1_C_INT, str1%ifield, "returnStructByValue i field") call assert_equals(2.5_C_DOUBLE, str1%dfield, "returnStructByValue d field") - str1 = return_const_struct_by_value(10_C_INT, 20.5_C_DOUBLE) - call assert_equals(10_C_INT, str1%ifield, "return_constStructByValue i field") - call assert_equals(20.5_C_DOUBLE, str1%dfield, "return_constStructByValue d field") - nullify(str2) str2 => return_struct_ptr1(33, 33.5d0) call assert_true(associated(str2), "returnStructPtr1") diff --git a/regression/run/struct/struct.c b/regression/run/struct/struct.c index 013769a4a..323a582be 100644 --- a/regression/run/struct/struct.c +++ b/regression/run/struct/struct.c @@ -76,12 +76,6 @@ Cstruct1 returnStructByValue(int i, double d) return s; } -const Cstruct1 returnConstStructByValue(int i, double d) -{ - Cstruct1 s = {i, d}; - return s; -} - Cstruct1 *returnStructPtr1(int i, double d) { strncpy(last_function_called, "returnStructPtr1", MAXLAST); diff --git a/regression/run/struct/struct.h b/regression/run/struct/struct.h index 956c1826c..f3308e2b6 100644 --- a/regression/run/struct/struct.h +++ b/regression/run/struct/struct.h @@ -30,7 +30,6 @@ int acceptStructInPtr(Cstruct1 *arg); void acceptStructOutPtr(Cstruct1 *arg, int i, double d); void acceptStructInOutPtr(Cstruct1 *arg); Cstruct1 returnStructByValue(int i, double d); -const Cstruct1 returnConstStructByValue(int i, double d); Cstruct1 *returnStructPtr1(int i, double d); Cstruct1 *returnStructPtr2(int i, double d, char *outbuf); From fe2bfbdba2283e9b2a1f4eed15ed045c46b823e8 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 6 Jul 2020 20:19:05 -0700 Subject: [PATCH 06/36] Update CHANGELOG with Fortran helper mangle comments --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97d706cc7..6eb4dd429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] - +### Fixed +- Mangle names of Fortran helper functions with *C_prefix*. This + fixes a conflict when two Shroud generated wrappers are used in the + same subprogram. Ideally these helpers would be `PRIVATE`, but + gfortran does not allow `PRIVATE` and `BIND(C)` together. + ## v0.12.0 - 2020-06-29 ### Added - Option `C_force_wrapper` to create a C wrapper. @@ -23,7 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. are a lot of classes which may create lots of duplicate helpers. - Parse array syntax for variables and struct members. - Change Python setter and getter functions to be driven by py_statements. -- Parse `(void)` C prototype to indicate no parameters. +- Parse `(void)` C prototype to indicate no parameters. ### Changed - *intent(in)* pointer arguments now use the *rank* attribute instead of From d83a8dab727f5361e96e2b817a8b6ec3703f6035 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 27 Jul 2020 22:48:34 -0700 Subject: [PATCH 07/36] Test default arguments - defaultArgsInOut --- regression/input/cxxlibrary.yaml | 5 + .../reference/cxxlibrary/cxxlibrary.json | 501 +++++++++++++++++- .../reference/cxxlibrary/cxxlibrary.log | 5 + .../cxxlibrary/pycxxlibrarymodule.cpp | 72 +++ .../reference/cxxlibrary/wrapcxxlibrary.cpp | 51 ++ .../reference/cxxlibrary/wrapcxxlibrary.h | 5 + .../reference/cxxlibrary/wrapfcxxlibrary.f | 140 +++++ regression/run/cxxlibrary/cxxlibrary.cpp | 12 + regression/run/cxxlibrary/cxxlibrary.hpp | 4 + regression/run/cxxlibrary/main.f | 9 + regression/run/cxxlibrary/python/test.py | 11 + 11 files changed, 814 insertions(+), 1 deletion(-) diff --git a/regression/input/cxxlibrary.yaml b/regression/input/cxxlibrary.yaml index ac23d4359..99017a2d6 100644 --- a/regression/input/cxxlibrary.yaml +++ b/regression/input/cxxlibrary.yaml @@ -66,3 +66,8 @@ declarations: ################################################## - decl: bool defaultPtrIsNULL(double* data +intent(IN)+rank(1) = nullptr ) + +- decl: void defaultArgsInOut(int in1, + int *out1+intent(out), + int *out2+intent(out), + bool flag = false) diff --git a/regression/reference/cxxlibrary/cxxlibrary.json b/regression/reference/cxxlibrary/cxxlibrary.json index 814370240..beaf0ef28 100644 --- a/regression/reference/cxxlibrary/cxxlibrary.json +++ b/regression/reference/cxxlibrary/cxxlibrary.json @@ -1234,7 +1234,7 @@ }, { "_default_funcs": [ - 9 + 10 ], "_fmtargs": { "data": { @@ -1398,6 +1398,505 @@ "underscore_name": "default_ptr_is_null" }, "options": {} + }, + { + "_fmtargs": { + "in1": { + "fmtc": { + "c_addr": "&", + "c_const": "", + "c_deref": "", + "c_member": ".", + "c_var": "in1", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&in1", + "cxx_type": "int", + "cxx_var": "in1", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_scalar_in", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_in1", + "c_var": "in1", + "f_intent": "IN", + "f_type": "integer(C_INT)", + "f_var": "in1", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_scalar_in", + "stmt1": "f_default", + "stmtc0": "c_native_scalar_in", + "stmtc1": "c_default" + } + }, + "out1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "out1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "out1", + "cxx_type": "int", + "cxx_var": "out1", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_out1", + "c_var": "out1", + "f_intent": "OUT", + "f_type": "integer(C_INT)", + "f_var": "out1", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + } + }, + "out2": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "out2", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "out2", + "cxx_type": "int", + "cxx_var": "out2", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_out2", + "c_var": "out2", + "f_intent": "OUT", + "f_type": "integer(C_INT)", + "f_var": "out2", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + } + } + }, + "_generated": "has_default_arg", + "_overloaded": true, + "ast": { + "declarator": { + "name": "defaultArgsInOut", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "in", + "value": true + }, + "declarator": { + "name": "in1", + "pointer": [] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "out1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "out2", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void defaultArgsInOut(int in1, int *out1+intent(out), int *out2+intent(out), bool flag = false)", + "declgen": "void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out))", + "fmtdict": { + "C_call_list": "in1,\t out1,\t out2", + "C_name": "CXX_default_args_in_out_0", + "C_prototype": "int in1,\t int * out1,\t int * out2", + "C_return_type": "void", + "F_C_call": "c_default_args_in_out_0", + "F_C_name": "c_default_args_in_out_0", + "F_arg_c_call": "in1,\t out1,\t out2", + "F_arguments": "in1,\t out1,\t out2", + "F_name_function": "default_args_in_out_0", + "F_name_generic": "default_args_in_out", + "F_name_impl": "default_args_in_out_0", + "F_subprogram": "subroutine", + "function_name": "defaultArgsInOut", + "function_suffix": "_0", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "default_args_in_out" + }, + "options": { + "wrap_c": true, + "wrap_fortran": true, + "wrap_lua": false, + "wrap_python": false + } + }, + { + "_default_funcs": [ + 11 + ], + "_fmtargs": { + "flag": { + "fmtc": { + "c_addr": "&", + "c_const": "", + "c_deref": "", + "c_member": ".", + "c_var": "flag", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&flag", + "cxx_type": "bool", + "cxx_var": "flag", + "idtor": "0", + "sh_type": "SH_TYPE_BOOL", + "stmt0": "c_bool_scalar_in", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_flag", + "c_var": "SH_flag", + "f_intent": "IN", + "f_type": "logical", + "f_var": "flag", + "sh_type": "SH_TYPE_BOOL", + "stmt0": "f_bool_scalar_in", + "stmt1": "f_bool_in", + "stmtc0": "c_bool_scalar_in", + "stmtc1": "c_default" + }, + "fmtpy": { + "PyTypeObject": "PyBool_Type", + "c_const": "", + "c_deref": "", + "c_type": "bool", + "c_var": "flag", + "ctor_expr": "flag", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&flag", + "cxx_type": "bool", + "cxx_var": "flag", + "data_var": "SHData_flag", + "numpy_type": "NPY_BOOL", + "py_type": "PyObject", + "py_var": "SHPy_flag", + "size_var": "SHSize_flag", + "stmt0": "py_bool_scalar_in", + "stmt1": "py_bool_in", + "value_var": "SHValue_flag" + } + }, + "in1": { + "fmtc": { + "c_addr": "&", + "c_const": "", + "c_deref": "", + "c_member": ".", + "c_var": "in1", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&in1", + "cxx_type": "int", + "cxx_var": "in1", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_scalar_in", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_in1", + "c_var": "in1", + "f_intent": "IN", + "f_type": "integer(C_INT)", + "f_var": "in1", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_scalar_in", + "stmt1": "f_default", + "stmtc0": "c_native_scalar_in", + "stmtc1": "c_default" + }, + "fmtpy": { + "c_const": "", + "c_deref": "", + "c_type": "int", + "c_var": "in1", + "ctor_expr": "in1", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&in1", + "cxx_type": "int", + "cxx_var": "in1", + "data_var": "SHData_in1", + "numpy_type": "NPY_INT", + "py_var": "SHPy_in1", + "size_var": "SHSize_in1", + "stmt0": "py_native_scalar_in", + "stmt1": "py_default", + "value_var": "SHValue_in1" + } + }, + "out1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "out1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "out1", + "cxx_type": "int", + "cxx_var": "out1", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_out1", + "c_var": "out1", + "f_intent": "OUT", + "f_type": "integer(C_INT)", + "f_var": "out1", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + }, + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "int", + "c_var": "out1", + "ctor_expr": "out1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "out1", + "cxx_type": "int", + "cxx_var": "out1", + "data_var": "SHData_out1", + "numpy_type": "NPY_INT", + "py_var": "SHPy_out1", + "size_var": "SHSize_out1", + "stmt0": "py_native_*_out", + "stmt1": "py_native_*_out", + "value_var": "SHValue_out1" + } + }, + "out2": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "out2", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "out2", + "cxx_type": "int", + "cxx_var": "out2", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_out2", + "c_var": "out2", + "f_intent": "OUT", + "f_type": "integer(C_INT)", + "f_var": "out2", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + }, + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "int", + "c_var": "out2", + "ctor_expr": "out2", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "out2", + "cxx_type": "int", + "cxx_var": "out2", + "data_var": "SHData_out2", + "numpy_type": "NPY_INT", + "py_var": "SHPy_out2", + "size_var": "SHSize_out2", + "stmt0": "py_native_*_out", + "stmt1": "py_native_*_out", + "value_var": "SHValue_out2" + } + } + }, + "_has_default_arg": true, + "_nargs": [ + 3, + 4 + ], + "_overloaded": true, + "ast": { + "declarator": { + "name": "defaultArgsInOut", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "in", + "value": true + }, + "declarator": { + "name": "in1", + "pointer": [] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "out1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "out2", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + { + "attrs": { + "intent": "in", + "value": true + }, + "declarator": { + "name": "flag", + "pointer": [] + }, + "init": "false", + "specifier": [ + "bool" + ], + "typemap_name": "bool" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void defaultArgsInOut(int in1, int *out1+intent(out), int *out2+intent(out), bool flag = false)", + "declgen": "void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out), bool flag=false +intent(in)+value)", + "fmtdict": { + "C_call_list": "in1,\t out1,\t out2,\t flag", + "C_name": "CXX_default_args_in_out_1", + "C_prototype": "int in1,\t int * out1,\t int * out2,\t bool flag", + "C_return_type": "void", + "F_C_call": "c_default_args_in_out_1", + "F_C_name": "c_default_args_in_out_1", + "F_arg_c_call": "in1,\t out1,\t out2,\t SH_flag", + "F_arguments": "in1,\t out1,\t out2,\t flag", + "F_name_function": "default_args_in_out_1", + "F_name_generic": "default_args_in_out", + "F_name_impl": "default_args_in_out_1", + "F_subprogram": "subroutine", + "PY_cleanup_decref": "Py_XDECREF", + "PY_name_impl": "PY_defaultArgsInOut_1", + "function_name": "defaultArgsInOut", + "function_suffix": "_1", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "default_args_in_out" + }, + "options": {} } ], "language": "cxx", diff --git a/regression/reference/cxxlibrary/cxxlibrary.log b/regression/reference/cxxlibrary/cxxlibrary.log index 7494dfa12..e4220e3a3 100644 --- a/regression/reference/cxxlibrary/cxxlibrary.log +++ b/regression/reference/cxxlibrary/cxxlibrary.log @@ -7,6 +7,8 @@ C function void passStructByReferenceInout(Cstruct1 & arg +intent(inout)) C function void passStructByReferenceOut(Cstruct1 & arg +intent(out)) C function bool defaultPtrIsNULL() C function bool defaultPtrIsNULL(double * data=nullptr +intent(in)+rank(1)) +C function void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out)) +C function void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out), bool flag=false +intent(in)+value) Close wrapcxxlibrary.h Close wrapcxxlibrary.cpp Close typescxxlibrary.h @@ -17,6 +19,8 @@ C-interface, Fortran function void passStructByReferenceInout(Cstruct1 & arg +in C-interface, Fortran function void passStructByReferenceOut(Cstruct1 & arg +intent(out)) C-interface, Fortran function bool defaultPtrIsNULL() C-interface, Fortran function bool defaultPtrIsNULL(double * data=nullptr +intent(in)+rank(1)) +C-interface, Fortran function void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out)) +C-interface, Fortran function void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out), bool flag=false +intent(in)+value) Close wrapfcxxlibrary.f class Cstruct1_cls Python method Cstruct1_cls(int ifield +intent(in), double dfield +intent(in)) +name(Cstruct1_cls_ctor) @@ -30,6 +34,7 @@ Python function int passStructByReferenceInCls(const Cstruct1_cls & arg +intent( Python function void passStructByReferenceInoutCls(Cstruct1_cls & arg +intent(inout)) Python function void passStructByReferenceOutCls(Cstruct1_cls & arg +intent(out)) Python function bool defaultPtrIsNULL(double * data=nullptr +intent(in)+rank(1)) +Python function void defaultArgsInOut(int in1 +intent(in)+value, int * out1 +intent(out), int * out2 +intent(out), bool flag=false +intent(in)+value) Close pycxxlibrarymodule.cpp Close pycxxlibraryutil.cpp Close pycxxlibrarymodule.hpp diff --git a/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp b/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp index 417a399de..793e4128f 100644 --- a/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp +++ b/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp @@ -491,6 +491,76 @@ PY_defaultPtrIsNULL_1( return nullptr; // splicer end function.default_ptr_is_null } + +// ---------------------------------------- +// Function: void defaultArgsInOut +// Exact: py_default +// ---------------------------------------- +// Argument: int in1 +intent(in)+value +// Requested: py_native_scalar_in +// Match: py_default +// ---------------------------------------- +// Argument: int * out1 +intent(out) +// Exact: py_native_*_out +// ---------------------------------------- +// Argument: int * out2 +intent(out) +// Exact: py_native_*_out +// ---------------------------------------- +// Argument: bool flag=false +intent(in)+value +// Requested: py_bool_scalar_in +// Match: py_bool_in +static char PY_defaultArgsInOut_1__doc__[] = +"documentation" +; + +static PyObject * +PY_defaultArgsInOut_1( + PyObject *SHROUD_UNUSED(self), + PyObject *args, + PyObject *kwds) +{ +// splicer begin function.default_args_in_out + Py_ssize_t SH_nargs = 0; + int in1; + int out1; + int out2; + bool flag; + PyObject * SHPy_flag; + const char *SHT_kwlist[] = { + "in1", + "flag", + nullptr }; + PyObject *SHTPy_rv = nullptr; // return value object + + if (args != nullptr) SH_nargs += PyTuple_Size(args); + if (kwds != nullptr) SH_nargs += PyDict_Size(args); + if (!PyArg_ParseTupleAndKeywords(args, kwds, + "i|O!:defaultArgsInOut", const_cast(SHT_kwlist), &in1, + &PyBool_Type, &SHPy_flag)) + return nullptr; + switch (SH_nargs) { + case 3: + defaultArgsInOut(in1, &out1, &out2); + break; + case 4: + { + // pre_call + flag = PyObject_IsTrue(SHPy_flag); + + defaultArgsInOut(in1, &out1, &out2, flag); + break; + } + default: + PyErr_SetString(PyExc_ValueError, "Wrong number of arguments"); + return nullptr; + } + + // post_call + SHTPy_rv = Py_BuildValue("ii", out1, out2); + + return SHTPy_rv; +// splicer end function.default_args_in_out +} static PyMethodDef PY_methods[] = { {"passStructByReference", (PyCFunction)PY_passStructByReference, METH_VARARGS|METH_KEYWORDS, PY_passStructByReference__doc__}, @@ -515,6 +585,8 @@ static PyMethodDef PY_methods[] = { PY_passStructByReferenceOutCls__doc__}, {"defaultPtrIsNULL", (PyCFunction)PY_defaultPtrIsNULL_1, METH_VARARGS|METH_KEYWORDS, PY_defaultPtrIsNULL_1__doc__}, +{"defaultArgsInOut", (PyCFunction)PY_defaultArgsInOut_1, + METH_VARARGS|METH_KEYWORDS, PY_defaultArgsInOut_1__doc__}, {nullptr, (PyCFunction)nullptr, 0, nullptr} /* sentinel */ }; diff --git a/regression/reference/cxxlibrary/wrapcxxlibrary.cpp b/regression/reference/cxxlibrary/wrapcxxlibrary.cpp index 67b253ce0..c6b9a966a 100644 --- a/regression/reference/cxxlibrary/wrapcxxlibrary.cpp +++ b/regression/reference/cxxlibrary/wrapcxxlibrary.cpp @@ -123,6 +123,57 @@ bool CXX_default_ptr_is_null_1(double * data) // splicer end function.default_ptr_is_null_1 } +// ---------------------------------------- +// Function: void defaultArgsInOut +// Requested: c +// Match: c_default +// ---------------------------------------- +// Argument: int in1 +intent(in)+value +// Requested: c_native_scalar_in +// Match: c_default +// ---------------------------------------- +// Argument: int * out1 +intent(out) +// Requested: c_native_*_out +// Match: c_default +// ---------------------------------------- +// Argument: int * out2 +intent(out) +// Requested: c_native_*_out +// Match: c_default +void CXX_default_args_in_out_0(int in1, int * out1, int * out2) +{ + // splicer begin function.default_args_in_out_0 + defaultArgsInOut(in1, out1, out2); + // splicer end function.default_args_in_out_0 +} + +// ---------------------------------------- +// Function: void defaultArgsInOut +// Requested: c +// Match: c_default +// ---------------------------------------- +// Argument: int in1 +intent(in)+value +// Requested: c_native_scalar_in +// Match: c_default +// ---------------------------------------- +// Argument: int * out1 +intent(out) +// Requested: c_native_*_out +// Match: c_default +// ---------------------------------------- +// Argument: int * out2 +intent(out) +// Requested: c_native_*_out +// Match: c_default +// ---------------------------------------- +// Argument: bool flag=false +intent(in)+value +// Requested: c_bool_scalar_in +// Match: c_default +void CXX_default_args_in_out_1(int in1, int * out1, int * out2, + bool flag) +{ + // splicer begin function.default_args_in_out_1 + defaultArgsInOut(in1, out1, out2, flag); + // splicer end function.default_args_in_out_1 +} + // Release library allocated memory. void CXX_SHROUD_memory_destructor(CXX_SHROUD_capsule_data *cap) { diff --git a/regression/reference/cxxlibrary/wrapcxxlibrary.h b/regression/reference/cxxlibrary/wrapcxxlibrary.h index 61043fa76..c024ff171 100644 --- a/regression/reference/cxxlibrary/wrapcxxlibrary.h +++ b/regression/reference/cxxlibrary/wrapcxxlibrary.h @@ -49,6 +49,11 @@ bool CXX_default_ptr_is_null_0(void); bool CXX_default_ptr_is_null_1(double * data); +void CXX_default_args_in_out_0(int in1, int * out1, int * out2); + +void CXX_default_args_in_out_1(int in1, int * out1, int * out2, + bool flag); + #ifdef __cplusplus } #endif diff --git a/regression/reference/cxxlibrary/wrapfcxxlibrary.f b/regression/reference/cxxlibrary/wrapfcxxlibrary.f index a7761de22..9977e77c4 100644 --- a/regression/reference/cxxlibrary/wrapfcxxlibrary.f +++ b/regression/reference/cxxlibrary/wrapfcxxlibrary.f @@ -124,10 +124,70 @@ function c_default_ptr_is_null_1(data) & logical(C_BOOL) :: SHT_rv end function c_default_ptr_is_null_1 + ! ---------------------------------------- + ! Function: void defaultArgsInOut + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: int in1 +intent(in)+value + ! Requested: c_native_scalar_in + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out1 +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out2 +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + subroutine c_default_args_in_out_0(in1, out1, out2) & + bind(C, name="CXX_default_args_in_out_0") + use iso_c_binding, only : C_INT + implicit none + integer(C_INT), value, intent(IN) :: in1 + integer(C_INT), intent(OUT) :: out1 + integer(C_INT), intent(OUT) :: out2 + end subroutine c_default_args_in_out_0 + + ! ---------------------------------------- + ! Function: void defaultArgsInOut + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: int in1 +intent(in)+value + ! Requested: c_native_scalar_in + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out1 +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out2 +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: bool flag=false +intent(in)+value + ! Requested: c_bool_scalar_in + ! Match: c_default + subroutine c_default_args_in_out_1(in1, out1, out2, flag) & + bind(C, name="CXX_default_args_in_out_1") + use iso_c_binding, only : C_BOOL, C_INT + implicit none + integer(C_INT), value, intent(IN) :: in1 + integer(C_INT), intent(OUT) :: out1 + integer(C_INT), intent(OUT) :: out2 + logical(C_BOOL), value, intent(IN) :: flag + end subroutine c_default_args_in_out_1 + ! splicer begin additional_interfaces ! splicer end additional_interfaces end interface + interface default_args_in_out + module procedure default_args_in_out_0 + module procedure default_args_in_out_1 + end interface default_args_in_out + interface default_ptr_is_null module procedure default_ptr_is_null_0 module procedure default_ptr_is_null_1 @@ -175,6 +235,86 @@ function default_ptr_is_null_1(data) & ! splicer end function.default_ptr_is_null_1 end function default_ptr_is_null_1 + ! Generated by has_default_arg + ! ---------------------------------------- + ! Function: void defaultArgsInOut + ! void defaultArgsInOut + ! Requested: f_subroutine + ! Match: f_default + ! Requested: c + ! Match: c_default + ! ---------------------------------------- + ! Argument: int in1 +intent(in)+value + ! Requested: f_native_scalar_in + ! Match: f_default + ! Requested: c_native_scalar_in + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out1 +intent(out) + ! Requested: f_native_*_out + ! Match: f_default + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out2 +intent(out) + ! Requested: f_native_*_out + ! Match: f_default + ! Requested: c_native_*_out + ! Match: c_default + subroutine default_args_in_out_0(in1, out1, out2) + use iso_c_binding, only : C_INT + integer(C_INT), value, intent(IN) :: in1 + integer(C_INT), intent(OUT) :: out1 + integer(C_INT), intent(OUT) :: out2 + ! splicer begin function.default_args_in_out_0 + call c_default_args_in_out_0(in1, out1, out2) + ! splicer end function.default_args_in_out_0 + end subroutine default_args_in_out_0 + + ! ---------------------------------------- + ! Function: void defaultArgsInOut + ! void defaultArgsInOut + ! Requested: f_subroutine + ! Match: f_default + ! Requested: c + ! Match: c_default + ! ---------------------------------------- + ! Argument: int in1 +intent(in)+value + ! Requested: f_native_scalar_in + ! Match: f_default + ! Requested: c_native_scalar_in + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out1 +intent(out) + ! Requested: f_native_*_out + ! Match: f_default + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * out2 +intent(out) + ! Requested: f_native_*_out + ! Match: f_default + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: bool flag=false +intent(in)+value + ! Requested: f_bool_scalar_in + ! Match: f_bool_in + ! Requested: c_bool_scalar_in + ! Match: c_default + subroutine default_args_in_out_1(in1, out1, out2, flag) + use iso_c_binding, only : C_BOOL, C_INT + integer(C_INT), value, intent(IN) :: in1 + integer(C_INT), intent(OUT) :: out1 + integer(C_INT), intent(OUT) :: out2 + logical, value, intent(IN) :: flag + ! splicer begin function.default_args_in_out_1 + logical(C_BOOL) SH_flag + SH_flag = flag ! coerce to C_BOOL + call c_default_args_in_out_1(in1, out1, out2, SH_flag) + ! splicer end function.default_args_in_out_1 + end subroutine default_args_in_out_1 + ! splicer begin additional_functions ! splicer end additional_functions diff --git a/regression/run/cxxlibrary/cxxlibrary.cpp b/regression/run/cxxlibrary/cxxlibrary.cpp index bb03820bd..7fc4e5799 100644 --- a/regression/run/cxxlibrary/cxxlibrary.cpp +++ b/regression/run/cxxlibrary/cxxlibrary.cpp @@ -80,3 +80,15 @@ bool defaultPtrIsNULL(double *data) return true; return false; } + +//---------------------------------------------------------------------- + +void defaultArgsInOut(int in1, int *out1, int *out2, bool flag) +{ + *out1 = 1; + if (flag) { + *out2 = 20; + } else { + *out2 = 2; + } +} diff --git a/regression/run/cxxlibrary/cxxlibrary.hpp b/regression/run/cxxlibrary/cxxlibrary.hpp index e9b5f7ec0..c74f27d02 100644 --- a/regression/run/cxxlibrary/cxxlibrary.hpp +++ b/regression/run/cxxlibrary/cxxlibrary.hpp @@ -40,5 +40,9 @@ void passStructByReferenceOutCls(Cstruct1_cls &arg); bool defaultPtrIsNULL(double *data = nullptr); +//---------------------------------------------------------------------- + +void defaultArgsInOut(int in1, int *out1, int *out2, bool flag = false); + #endif // CXXLIBRARY_H diff --git a/regression/run/cxxlibrary/main.f b/regression/run/cxxlibrary/main.f index 5b38a984e..8314bdad6 100644 --- a/regression/run/cxxlibrary/main.f +++ b/regression/run/cxxlibrary/main.f @@ -60,9 +60,18 @@ end subroutine test_struct subroutine test_default_args real(C_DOUBLE) :: some_var(2) + integer(C_INT) :: out1, out2 call assert_true(default_ptr_is_null()) call assert_false(default_ptr_is_null(some_var)) + + ! flag defaults to false + call default_args_in_out(1, out1, out2) + call assert_equals(1, out1, "defaultArgsInOut") + call assert_equals(2, out2, "defaultArgsInOut") + call default_args_in_out(1, out1, out2, .true.) + call assert_equals(1, out1, "defaultArgsInOut") + call assert_equals(20, out2, "defaultArgsInOut") end subroutine test_default_args diff --git a/regression/run/cxxlibrary/python/test.py b/regression/run/cxxlibrary/python/test.py index 8b598780d..88b322f71 100644 --- a/regression/run/cxxlibrary/python/test.py +++ b/regression/run/cxxlibrary/python/test.py @@ -72,6 +72,17 @@ def test_DefaultArgs(self): self.assertTrue(cxxlibrary.defaultPtrIsNULL()) self.assertFalse(cxxlibrary.defaultPtrIsNULL([1., 2.])) + def test_defaultArgsInOut(self): + out1, out2 = cxxlibrary.defaultArgsInOut(1) + self.assertEqual(1, out1) + self.assertEqual(2, out2) + out1, out2 = cxxlibrary.defaultArgsInOut(1, True) + self.assertEqual(1, out1) + self.assertEqual(20, out2) + +# cxxlibrary.defaultArgsInOut(1, True, 5) + + # creating a new test suite newSuite = unittest.TestSuite() From 792aa09f84dd3ed26d0660113927f787685ef49f Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 27 Jul 2020 23:20:42 -0700 Subject: [PATCH 08/36] Correctly count arguments to Python function Default arguments creates a switch based on the number of arguments. However, intent(out) arguments are not passed into the function. Only intent(in) and intent(inout). --- CHANGELOG.md | 2 ++ .../reference/cxxlibrary/pycxxlibrarymodule.cpp | 4 ++-- regression/run/cxxlibrary/python/test.py | 1 + shroud/wrapp.py | 14 +++++++++----- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb4dd429..832702611 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. fixes a conflict when two Shroud generated wrappers are used in the same subprogram. Ideally these helpers would be `PRIVATE`, but gfortran does not allow `PRIVATE` and `BIND(C)` together. +- Correctly count Python arguments when there are default arguments. + Do not include *intent(out)* arguments. ## v0.12.0 - 2020-06-29 ### Added diff --git a/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp b/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp index 793e4128f..ab8c84b79 100644 --- a/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp +++ b/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp @@ -539,10 +539,10 @@ PY_defaultArgsInOut_1( &PyBool_Type, &SHPy_flag)) return nullptr; switch (SH_nargs) { - case 3: + case 1: defaultArgsInOut(in1, &out1, &out2); break; - case 4: + case 2: { // pre_call flag = PyObject_IsTrue(SHPy_flag); diff --git a/regression/run/cxxlibrary/python/test.py b/regression/run/cxxlibrary/python/test.py index 88b322f71..0bbba3a15 100644 --- a/regression/run/cxxlibrary/python/test.py +++ b/regression/run/cxxlibrary/python/test.py @@ -80,6 +80,7 @@ def test_defaultArgsInOut(self): self.assertEqual(1, out1) self.assertEqual(20, out2) + # XXX - this segfaults with Python3 # cxxlibrary.defaultArgsInOut(1, True, 5) diff --git a/shroud/wrapp.py b/shroud/wrapp.py index 051c4e47a..1e1a08aad 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -1195,10 +1195,11 @@ def wrap_function(self, cls, node, fileinfo): goto_fail = False args = ast.params - arg_names = [] + arg_names = [] # Arguments to function, intent in or inout. arg_offsets = [] arg_implied = [] # Collect implied arguments offset = 0 + npyargs = 0 # Number of intent in or inout arguments. for arg in args: arg_name = arg.name fmt_arg0 = fmtargs.setdefault(arg_name, {}) @@ -1369,6 +1370,8 @@ def wrap_function(self, cls, node, fileinfo): parse_format.append("|") # add once found_optional = True found_default = True + # Since this argument is optional, save current state + # so we can process without this argument. # Cleanup should always do Py_XDECREF instead of # Py_DECREF since PyObject pointers may be NULL due # to different paths of execution in switch statement. @@ -1376,13 +1379,14 @@ def wrap_function(self, cls, node, fileinfo): # call for default arguments (num args, arg string) default_calls.append( ( - len(cxx_call_list), + npyargs, len(post_declare_code), len(post_parse_code), len(pre_call_code), ",\t ".join(cxx_call_list), ) ) + npyargs = npyargs + 1 # Declare C variable - may be PyObject. # add argument to call to PyArg_ParseTypleAndKeywords @@ -1489,7 +1493,7 @@ def wrap_function(self, cls, node, fileinfo): # call with all arguments default_calls.append( ( - len(cxx_call_list), + npyargs, len(post_declare_code), len(post_parse_code), len(pre_call_code), @@ -1534,9 +1538,9 @@ def wrap_function(self, cls, node, fileinfo): PY_code.append("switch (SH_nargs) {") # build up code for a function - for nargs, post_declare_len, post_parse_len, pre_call_len, call_list in default_calls: + for npyargs, post_declare_len, post_parse_len, pre_call_len, call_list in default_calls: if found_default: - PY_code.append("case %d:" % nargs) + PY_code.append("case %d:" % npyargs) PY_code.append(1) need_blank = False if post_declare_len or post_parse_len or pre_call_len: From 169bbb46d10861d143fb5a0af91552168734f4c4 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Tue, 28 Jul 2020 23:13:04 -0700 Subject: [PATCH 09/36] Check intent.need_wrapper for arguments too Move into function add_code_from_statements so it works with arguments and results. --- shroud/wrapf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/shroud/wrapf.py b/shroud/wrapf.py index caf73cd62..16001f478 100644 --- a/shroud/wrapf.py +++ b/shroud/wrapf.py @@ -1369,6 +1369,9 @@ def add_code_from_statements( for line in intent_blk.post_call: append_format(post_call, line, fmt) + # this catches stuff like a bool to logical conversion which + # requires the wrapper + need_wrapper = need_wrapper or intent_blk.need_wrapper return need_wrapper def set_fmt_fields(self, cls, fcn, f_ast, c_ast, fmt, modules, fileinfo, @@ -1550,10 +1553,6 @@ def wrap_function_impl(self, cls, node, fileinfo): fmt_func.F_result = f_result_blk.result fmt_func.F_result_clause = "\fresult(%s)" % fmt_func.F_result - # this catches stuff like a bool to logical conversion which - # requires the wrapper - need_wrapper = need_wrapper or f_result_blk.need_wrapper - if cls: need_wrapper = True is_static = "static" in ast.storage From 321d3fbb806d623d3b1b18ad95aff3a83d0938f9 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Wed, 29 Jul 2020 22:35:24 -0700 Subject: [PATCH 10/36] Create bufferify function if std::string argument This includes scalar std::string arguments. Use typemap.sgroup instead of typemap.base since it is now the prefered choice. --- shroud/generate.py | 6 ++++-- shroud/wrapc.py | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/shroud/generate.py b/shroud/generate.py index 56d6beab0..c975fae96 100644 --- a/shroud/generate.py +++ b/shroud/generate.py @@ -1204,12 +1204,14 @@ def arg_to_buffer(self, node, ordered_functions): has_buf_arg = False for arg in ast.params: arg_typemap = arg.typemap - if arg_typemap.base == "string": + if arg_typemap.sgroup == "string": + has_buf_arg = True + elif arg_typemap.sgroup == "char": if arg.ftrim_char_in: pass elif arg.is_indirect(): has_buf_arg = True - elif arg_typemap.base == "vector": + elif arg_typemap.sgroup == "vector": has_buf_arg = True elif (arg_typemap.sgroup == "native" and arg.attrs["intent"] == "out" and diff --git a/shroud/wrapc.py b/shroud/wrapc.py index 8a328a140..f1ed34505 100644 --- a/shroud/wrapc.py +++ b/shroud/wrapc.py @@ -735,9 +735,9 @@ def set_fmt_fields(self, cls, fcn, ast, ntypemap, fmt, is_func): Args: cls - ast.ClassNode or None of enclosing class. fcn - ast.FunctionNode of calling function. - ast - - ntypemap - - fmt - + ast - declast.Declaration + ntypemap - typemap.Typemap + fmt - scope.Util is_func - True if function. """ From f12b04881d519bfb8cc7fa15d5fc11d083d469ca Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Thu, 30 Jul 2020 11:27:40 -0700 Subject: [PATCH 11/36] Specialize fc_statements f_string_result_allocatable Add scalar, *, and & version which all use the same base. Needed to specalize f_string_scalar in pending changes. --- regression/reference/classes/classes.json | 8 ++-- regression/reference/classes/wrapfclasses.f | 12 ++---- regression/reference/debugfalse/tutorial.json | 4 +- regression/reference/example/example.json | 16 ++++---- .../example/wrapfUserLibrary_example_nested.f | 24 ++++-------- regression/reference/memdoc/memdoc.json | 4 +- regression/reference/memdoc/wrapfmemdoc.f | 5 +-- regression/reference/namespace/namespace.json | 4 +- regression/reference/namespace/wrapfns.f | 6 +-- regression/reference/strings/strings.json | 28 ++++++------- regression/reference/strings/wrapfstrings.f | 39 +++++++------------ regression/reference/tutorial/tutorial.json | 4 +- regression/reference/tutorial/wrapftutorial.f | 6 +-- shroud/typemap.py | 12 +++++- 14 files changed, 76 insertions(+), 96 deletions(-) diff --git a/regression/reference/classes/classes.json b/regression/reference/classes/classes.json index 2d25db706..30fe343de 100644 --- a/regression/reference/classes/classes.json +++ b/regression/reference/classes/classes.json @@ -1104,7 +1104,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -1205,7 +1205,7 @@ "hnamefunc0": "CLA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -1796,7 +1796,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -1897,7 +1897,7 @@ "hnamefunc0": "CLA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/classes/wrapfclasses.f b/regression/reference/classes/wrapfclasses.f index 46a8311b1..c0ea67f94 100644 --- a/regression/reference/classes/wrapfclasses.f +++ b/regression/reference/classes/wrapfclasses.f @@ -925,14 +925,12 @@ end function class1_getclass3 ! ---------------------------------------- ! Function: const std::string & getName +deref(allocatable) ! const std::string & getName +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getName ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> @@ -1071,14 +1069,12 @@ end function class1_associated ! ---------------------------------------- ! Function: const std::string & getName +deref(allocatable) ! const std::string & getName +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getName ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> diff --git a/regression/reference/debugfalse/tutorial.json b/regression/reference/debugfalse/tutorial.json index 6c1eef4d1..6907266f0 100644 --- a/regression/reference/debugfalse/tutorial.json +++ b/regression/reference/debugfalse/tutorial.json @@ -422,7 +422,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -556,7 +556,7 @@ "hnamefunc0": "TUT_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/example/example.json b/regression/reference/example/example.json index d1a2d6a16..cf4a4beeb 100644 --- a/regression/reference/example/example.json +++ b/regression/reference/example/example.json @@ -679,7 +679,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -786,7 +786,7 @@ "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -2277,7 +2277,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -2383,7 +2383,7 @@ "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -2485,7 +2485,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -2591,7 +2591,7 @@ "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -2693,7 +2693,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -2798,7 +2798,7 @@ "hnamefunc0": "AA_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/example/wrapfUserLibrary_example_nested.f b/regression/reference/example/wrapfUserLibrary_example_nested.f index 02b9c3973..566b4ce0f 100644 --- a/regression/reference/example/wrapfUserLibrary_example_nested.f +++ b/regression/reference/example/wrapfUserLibrary_example_nested.f @@ -1336,14 +1336,12 @@ end function exclass1_increment_count ! ---------------------------------------- ! Function: const string & getNameErrorCheck +deref(allocatable) ! const string & getNameErrorCheck +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getNameErrorCheck ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable function exclass1_get_name_error_check(obj) & @@ -1564,14 +1562,12 @@ end function exclass2_get_name ! ---------------------------------------- ! Function: const string & getName2 +deref(allocatable) ! const string & getName2 +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getName2 ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable function exclass2_get_name2(obj) & @@ -1590,14 +1586,12 @@ end function exclass2_get_name2 ! ---------------------------------------- ! Function: string & getName3 +deref(allocatable) ! string & getName3 +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getName3 ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable function exclass2_get_name3(obj) & @@ -1616,14 +1610,12 @@ end function exclass2_get_name3 ! ---------------------------------------- ! Function: string & getName4 +deref(allocatable) ! string & getName4 +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getName4 ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable function exclass2_get_name4(obj) & diff --git a/regression/reference/memdoc/memdoc.json b/regression/reference/memdoc/memdoc.json index 892a7600a..4c8ea67eb 100644 --- a/regression/reference/memdoc/memdoc.json +++ b/regression/reference/memdoc/memdoc.json @@ -34,7 +34,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable_library", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" } @@ -110,7 +110,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/memdoc/wrapfmemdoc.f b/regression/reference/memdoc/wrapfmemdoc.f index 56f6d576e..ff98dd321 100644 --- a/regression/reference/memdoc/wrapfmemdoc.f +++ b/regression/reference/memdoc/wrapfmemdoc.f @@ -106,13 +106,12 @@ end subroutine STR_SHROUD_copy_string_and_free ! Function: const std::string * getConstStringPtrAlloc +deref(allocatable)+owner(library) ! const std::string * getConstStringPtrAlloc +deref(allocatable)+owner(library) ! Requested: f_string_scalar_result_allocatable_library - ! Match: f_string_result_allocatable + ! Match: f_string_scalar_result_allocatable ! Function: void getConstStringPtrAlloc ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string * SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out)+owner(library) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable ! start get_const_string_ptr_alloc diff --git a/regression/reference/namespace/namespace.json b/regression/reference/namespace/namespace.json index 12fb8b9bf..cf4356deb 100644 --- a/regression/reference/namespace/namespace.json +++ b/regression/reference/namespace/namespace.json @@ -37,7 +37,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -131,7 +131,7 @@ "hnamefunc0": "NS_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/namespace/wrapfns.f b/regression/reference/namespace/wrapfns.f index 801ea51d4..b76a4afd0 100644 --- a/regression/reference/namespace/wrapfns.f +++ b/regression/reference/namespace/wrapfns.f @@ -137,14 +137,12 @@ end subroutine NS_SHROUD_copy_string_and_free ! ---------------------------------------- ! Function: const std::string & LastFunctionCalled +deref(allocatable) ! const std::string & LastFunctionCalled +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void LastFunctionCalled ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable function last_function_called() & diff --git a/regression/reference/strings/strings.json b/regression/reference/strings/strings.json index 3f838e83c..d7342b43e 100644 --- a/regression/reference/strings/strings.json +++ b/regression/reference/strings/strings.json @@ -1619,7 +1619,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -1709,7 +1709,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -2194,7 +2194,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -2280,7 +2280,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -2378,7 +2378,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -2477,7 +2477,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -3238,7 +3238,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -3332,7 +3332,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_&_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_&_result_allocatable", "stmtc0": "c_string_&_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -3648,7 +3648,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable_library", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -3743,7 +3743,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -3842,7 +3842,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable_caller", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -3940,7 +3940,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } @@ -4042,7 +4042,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable_caller", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -4141,7 +4141,7 @@ "hnamefunc0": "STR_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/strings/wrapfstrings.f b/regression/reference/strings/wrapfstrings.f index 26dac320c..ceb0c1261 100644 --- a/regression/reference/strings/wrapfstrings.f +++ b/regression/reference/strings/wrapfstrings.f @@ -1380,14 +1380,12 @@ end subroutine get_char_ptr3 ! ---------------------------------------- ! Function: const string getConstStringResult +deref(allocatable) ! const string getConstStringResult +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getConstStringResult ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const string * SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> @@ -1464,14 +1462,12 @@ end subroutine get_const_string_as_arg ! ---------------------------------------- ! Function: const std::string getConstStringAlloc +deref(allocatable) ! const std::string getConstStringAlloc +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getConstStringAlloc ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string * SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable function get_const_string_alloc() & @@ -1489,14 +1485,12 @@ end function get_const_string_alloc ! ---------------------------------------- ! Function: const string & getConstStringRefPure +deref(allocatable) ! const string & getConstStringRefPure +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getConstStringRefPure ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> @@ -1608,14 +1602,12 @@ end function get_const_string_ref_len_empty ! ---------------------------------------- ! Function: const std::string & getConstStringRefAlloc +deref(allocatable) ! const std::string & getConstStringRefAlloc +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void getConstStringRefAlloc ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string & SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_&_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_&_result_allocatable ! Requested: c_string_&_result_buf_allocatable ! Match: c_string_result_buf_allocatable function get_const_string_ref_alloc() & @@ -1666,13 +1658,12 @@ end function get_const_string_ptr_len ! Function: const std::string * getConstStringPtrAlloc +deref(allocatable)+owner(library) ! const std::string * getConstStringPtrAlloc +deref(allocatable)+owner(library) ! Requested: f_string_scalar_result_allocatable_library - ! Match: f_string_result_allocatable + ! Match: f_string_scalar_result_allocatable ! Function: void getConstStringPtrAlloc ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string * SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out)+owner(library) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable function get_const_string_ptr_alloc() & @@ -1691,13 +1682,12 @@ end function get_const_string_ptr_alloc ! Function: const std::string * getConstStringPtrOwnsAlloc +deref(allocatable)+owner(caller) ! const std::string * getConstStringPtrOwnsAlloc +deref(allocatable)+owner(caller) ! Requested: f_string_scalar_result_allocatable_caller - ! Match: f_string_result_allocatable + ! Match: f_string_scalar_result_allocatable ! Function: void getConstStringPtrOwnsAlloc ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string * SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out)+owner(caller) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> @@ -1723,13 +1713,12 @@ end function get_const_string_ptr_owns_alloc ! Function: const std::string * getConstStringPtrOwnsAllocPattern +deref(allocatable)+free_pattern(C_string_free)+owner(caller) ! const std::string * getConstStringPtrOwnsAllocPattern +deref(allocatable)+free_pattern(C_string_free)+owner(caller) ! Requested: f_string_scalar_result_allocatable_caller - ! Match: f_string_result_allocatable + ! Match: f_string_scalar_result_allocatable ! Function: void getConstStringPtrOwnsAllocPattern ! Exact: c_string_scalar_result_buf ! ---------------------------------------- ! Argument: const std::string * SHF_rv +context(DSHF_rv)+deref(allocatable)+free_pattern(C_string_free)+intent(out)+owner(caller) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> diff --git a/regression/reference/tutorial/tutorial.json b/regression/reference/tutorial/tutorial.json index 6c1eef4d1..6907266f0 100644 --- a/regression/reference/tutorial/tutorial.json +++ b/regression/reference/tutorial/tutorial.json @@ -422,7 +422,7 @@ "f_var": "SHT_rv", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_scalar_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_scalar_result_allocatable", "stmtc0": "c_string_scalar_result_buf", "stmtc1": "c_string_scalar_result_buf" }, @@ -556,7 +556,7 @@ "hnamefunc0": "TUT_SHROUD_copy_string_and_free", "sh_type": "SH_TYPE_OTHER", "stmt0": "f_string_*_result_allocatable", - "stmt1": "f_string_result_allocatable", + "stmt1": "f_string_*_result_allocatable", "stmtc0": "c_string_*_result_buf_allocatable", "stmtc1": "c_string_result_buf_allocatable" } diff --git a/regression/reference/tutorial/wrapftutorial.f b/regression/reference/tutorial/wrapftutorial.f index 66df70442..7963b529d 100644 --- a/regression/reference/tutorial/wrapftutorial.f +++ b/regression/reference/tutorial/wrapftutorial.f @@ -726,8 +726,7 @@ end subroutine TUT_SHROUD_copy_string_and_free ! ---------------------------------------- ! Function: const std::string ConcatenateStrings +deref(allocatable) ! const std::string ConcatenateStrings +deref(allocatable) - ! Requested: f_string_scalar_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_scalar_result_allocatable ! Function: void ConcatenateStrings ! Exact: c_string_scalar_result_buf ! ---------------------------------------- @@ -746,8 +745,7 @@ end subroutine TUT_SHROUD_copy_string_and_free ! Match: c_string_in_buf ! ---------------------------------------- ! Argument: const std::string * SHF_rv +context(DSHF_rv)+deref(allocatable)+intent(out) - ! Requested: f_string_*_result_allocatable - ! Match: f_string_result_allocatable + ! Exact: f_string_*_result_allocatable ! Requested: c_string_*_result_buf_allocatable ! Match: c_string_result_buf_allocatable !> diff --git a/shroud/typemap.py b/shroud/typemap.py index 7c3719400..11888beda 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -2039,9 +2039,9 @@ def __init__(self, ], ), - # similar to f_char_result_allocatable + # similar to f_char_scalar_result_allocatable dict( - name="f_string_result_allocatable", + name="f_string_scalar_result_allocatable", need_wrapper=True, c_helper="copy_string", f_helper="copy_string", @@ -2053,6 +2053,14 @@ def __init__(self, "call {hnamefunc0}({c_var_context}, {f_var}, {c_var_context}%elem_len)", ], ), + dict( + name="f_string_*_result_allocatable", + base="f_string_scalar_result_allocatable", + ), + dict( + name="f_string_&_result_allocatable", + base="f_string_scalar_result_allocatable", + ), dict( From 968a51a46e1ca232cbdfa080278ecd14f7b72a46 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Thu, 30 Jul 2020 17:31:45 -0700 Subject: [PATCH 12/36] Add support for std::string scalar arguments Add fc_statements c_string_scalar_in, c_string_scalar_in_buf, f_string_scalar_in. --- CHANGELOG.md | 3 + docs/cstatements.rst | 4 +- docs/fstatements.rst | 20 ++ docs/python.rst | 1 + regression/input/strings.yaml | 6 +- .../reference/strings/pystringsmodule.cpp | 47 ++++ regression/reference/strings/strings.json | 240 ++++++++++++++++++ regression/reference/strings/strings.log | 5 + regression/reference/strings/wrapfstrings.f | 65 +++++ regression/reference/strings/wrapstrings.cpp | 39 +++ regression/reference/strings/wrapstrings.h | 4 + regression/run/strings/main.f | 25 +- regression/run/strings/python/test.py | 5 + regression/run/strings/strings.cpp | 7 + regression/run/strings/strings.hpp | 2 + shroud/typemap.py | 37 +++ shroud/wrapp.py | 4 + 17 files changed, 504 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 832702611..24b1ce499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Added std::string scalar arguments. + ### Fixed - Mangle names of Fortran helper functions with *C_prefix*. This fixes a conflict when two Shroud generated wrappers are used in the diff --git a/docs/cstatements.rst b/docs/cstatements.rst index 4bf371cb7..774c42492 100644 --- a/docs/cstatements.rst +++ b/docs/cstatements.rst @@ -48,7 +48,7 @@ arg arg_decl The explicit declarations will be provided in the fields - c_arg_decl and f_arg_decl. + *c_arg_decl* and *f_arg_decl*. capsule @@ -181,6 +181,8 @@ f_arg_decl ^^^^^^^^^^ A list of declarations in the Fortran interface when buf_arg includes "arg_decl". +The variable to be declared is *c_var*. +*f_module* can be used to add ``USE`` statements. .. c_var diff --git a/docs/fstatements.rst b/docs/fstatements.rst index 32ac41330..947febd6f 100644 --- a/docs/fstatements.rst +++ b/docs/fstatements.rst @@ -67,6 +67,8 @@ If true, the Fortran wrapper will always be created. This is used when an assignment is needed to do a type coercion; for example, with logical types. +.. XXX tends to call bufferify version + arg_name ^^^^^^^^ @@ -93,6 +95,12 @@ Added before splicer. arg_c_call ^^^^^^^^^^ +List of arguments to pass to C wrapper. +This can include an expression or additional arguments if required. + +.. code-block:: text + + arg_c_call=["C_LOC({f_var})"], declare ^^^^^^^ @@ -113,6 +121,18 @@ call Code used to call the function. Defaults to ``{F_result} = {F_C_call}({F_arg_c_call})`` + +For example, to assign to an intermediate variable: + +.. code-block:: text + + declare=[ + "type(C_PTR) :: {F_pointer}", + ], + call=[ + "{F_pointer} = {F_C_call}({F_arg_c_call})", + ], + post_call ^^^^^^^^^ diff --git a/docs/python.rst b/docs/python.rst index 68b9cf2f8..223dc8fe6 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -269,6 +269,7 @@ Assign a blank list will not add any declarations. This is used when only an output ``std::string`` or ``std::vector`` is created after parsing arguments. +This variables is used with ``PyArg_ParseTupleAndKeywords``. The argument will be non-const to allow it to be assigned later. diff --git a/regression/input/strings.yaml b/regression/input/strings.yaml index 318e487be..6fb7d9379 100644 --- a/regression/input/strings.yaml +++ b/regression/input/strings.yaml @@ -248,9 +248,9 @@ declarations: Test return tuple with two arguments. Must rename argument to nlen to avoid conflict with intrinsic len. -#- decl: void acceptStringInstance(std::string arg1) -# doxygen: -# brief: Accept a string instance +- decl: int acceptStringInstance(std::string arg1) + doxygen: + brief: Accept a string instance - decl: void returnStrings(std::string & arg1 +intent(out), std::string & arg2 +intent(out)) diff --git a/regression/reference/strings/pystringsmodule.cpp b/regression/reference/strings/pystringsmodule.cpp index becd24d41..1eed91570 100644 --- a/regression/reference/strings/pystringsmodule.cpp +++ b/regression/reference/strings/pystringsmodule.cpp @@ -1052,6 +1052,51 @@ PY_fetchStringPointerLen( // splicer end function.fetch_string_pointer_len } +// ---------------------------------------- +// Function: int acceptStringInstance +// Requested: py_native_scalar_result +// Match: py_default +// ---------------------------------------- +// Argument: std::string arg1 +intent(in)+value +// Exact: py_string_scalar_in +static char PY_acceptStringInstance__doc__[] = +"documentation" +; + +/** + * \brief Accept a string instance + * + */ +static PyObject * +PY_acceptStringInstance( + PyObject *SHROUD_UNUSED(self), + PyObject *args, + PyObject *kwds) +{ +// splicer begin function.accept_string_instance + char * arg1; + const char *SHT_kwlist[] = { + "arg1", + nullptr }; + PyObject * SHTPy_rv = nullptr; + + if (!PyArg_ParseTupleAndKeywords(args, kwds, + "s:acceptStringInstance", const_cast(SHT_kwlist), + &arg1)) + return nullptr; + + // post_declare + std::string SH_arg1(arg1); + + int SHCXX_rv = acceptStringInstance(SH_arg1); + + // post_call + SHTPy_rv = PyInt_FromLong(SHCXX_rv); + + return (PyObject *) SHTPy_rv; +// splicer end function.accept_string_instance +} + // ---------------------------------------- // Function: void returnStrings // Exact: py_default @@ -1309,6 +1354,8 @@ static PyMethodDef PY_methods[] = { METH_VARARGS|METH_KEYWORDS, PY_acceptStringPointerLen__doc__}, {"fetchStringPointerLen", (PyCFunction)PY_fetchStringPointerLen, METH_NOARGS, PY_fetchStringPointerLen__doc__}, +{"acceptStringInstance", (PyCFunction)PY_acceptStringInstance, + METH_VARARGS|METH_KEYWORDS, PY_acceptStringInstance__doc__}, {"returnStrings", (PyCFunction)PY_returnStrings, METH_NOARGS, PY_returnStrings__doc__}, {"explicit1", (PyCFunction)PY_explicit1, METH_VARARGS|METH_KEYWORDS, diff --git a/regression/reference/strings/strings.json b/regression/reference/strings/strings.json index d7342b43e..57bb62610 100644 --- a/regression/reference/strings/strings.json +++ b/regression/reference/strings/strings.json @@ -5967,6 +5967,246 @@ "wrap_python": false } }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "&", + "c_const": "", + "c_deref": "", + "c_member": ".", + "c_var": "arg1", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&arg1", + "cxx_type": "std::string", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_OTHER", + "stmt0": "c_string_scalar_in", + "stmt1": "c_string_scalar_in" + }, + "fmtpy": { + "c_const": "", + "c_deref": "", + "c_type": "char", + "c_var": "arg1", + "ctor_expr": "SH_arg1.data(),\t SH_arg1.size()", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&arg1", + "cxx_type": "std::string", + "cxx_var": "SH_arg1", + "data_var": "SHData_arg1", + "numpy_type": null, + "py_var": "SHPy_arg1", + "size_var": "SHSize_arg1", + "stmt0": "py_string_scalar_in", + "stmt1": "py_string_scalar_in", + "value_var": "SHValue_arg1" + } + } + }, + "_fmtresult": { + "fmtc": { + "c_const": "", + "c_get_value": "", + "c_type": "int", + "c_var": "SHC_rv", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&SHC_rv", + "cxx_type": "int", + "cxx_var": "SHC_rv", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_scalar_result", + "stmt1": "c_default" + }, + "fmtf": { + "cxx_type": "int", + "f_type": "integer(C_INT)", + "f_var": "SHT_rv", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_scalar_result", + "stmt1": "f_default", + "stmtc0": "c_native_scalar_result_buf", + "stmtc1": "c_default" + }, + "fmtpy": { + "c_deref": "", + "c_var": "SHCXX_rv", + "ctor_expr": "SHCXX_rv", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&SHCXX_rv", + "cxx_type": "int", + "cxx_var": "SHCXX_rv", + "data_var": "SHData_rv", + "numpy_type": "NPY_INT", + "py_var": "SHTPy_rv", + "size_var": "SHSize_rv", + "stmt0": "py_native_scalar_result", + "stmt1": "py_default", + "value_var": "SHValue_rv" + } + }, + "ast": { + "declarator": { + "name": "acceptStringInstance", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "in", + "value": true + }, + "declarator": { + "name": "arg1", + "pointer": [] + }, + "specifier": [ + "std::string" + ], + "typemap_name": "std::string" + } + ], + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + "decl": "int acceptStringInstance(std::string arg1)", + "declgen": "int acceptStringInstance(std::string arg1 +intent(in)+value)", + "doxygen": { + "brief": "Accept a string instance" + }, + "fmtdict": { + "C_call_list": "arg1", + "C_name": "STR_accept_string_instance", + "C_prototype": "char *arg1", + "C_return_type": "int", + "F_C_call": "c_accept_string_instance_bufferify", + "F_C_name": "c_accept_string_instance", + "F_arg_c_call": "arg1,\t len_trim(arg1, kind=C_INT)", + "F_arguments": "arg1", + "F_name_function": "accept_string_instance", + "F_name_generic": "accept_string_instance", + "F_name_impl": "accept_string_instance", + "F_result_clause": "\fresult(SHT_rv)", + "F_subprogram": "function", + "PY_name_impl": "PY_acceptStringInstance", + "cxx_rv_decl": "int SHC_rv", + "function_name": "acceptStringInstance", + "underscore_name": "accept_string_instance" + }, + "options": {} + }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "&", + "c_const": "", + "c_deref": "", + "c_member": ".", + "c_var": "arg1", + "c_var_trim": "Larg1", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&SHCXX_arg1", + "cxx_type": "std::string", + "cxx_var": "SHCXX_arg1", + "idtor": "0", + "sh_type": "SH_TYPE_OTHER", + "stmt0": "c_string_scalar_in_buf", + "stmt1": "c_string_scalar_in_buf" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "c_var_trim": "Larg1", + "f_intent": "IN", + "f_type": "character(*)", + "f_var": "arg1", + "sh_type": "SH_TYPE_OTHER", + "stmt0": "f_string_scalar_in", + "stmt1": "f_string_scalar_in", + "stmtc0": "c_string_scalar_in_buf", + "stmtc1": "c_string_scalar_in_buf" + } + } + }, + "_fmtresult": { + "fmtc": { + "c_const": "", + "c_get_value": "", + "c_type": "int", + "c_var": "SHC_rv", + "cxx_addr": "&", + "cxx_member": ".", + "cxx_nonconst_ptr": "&SHC_rv", + "cxx_type": "int", + "cxx_var": "SHC_rv", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_scalar_result_buf", + "stmt1": "c_default" + } + }, + "_generated": "arg_to_buffer", + "ast": { + "declarator": { + "name": "acceptStringInstance", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "in", + "len_trim": "Larg1", + "value": true + }, + "declarator": { + "name": "arg1", + "pointer": [] + }, + "specifier": [ + "std::string" + ], + "stmts_suffix": "buf", + "typemap_name": "std::string" + } + ], + "specifier": [ + "int" + ], + "typemap_name": "int" + }, + "decl": "int acceptStringInstance(std::string arg1)", + "declgen": "int acceptStringInstance(std::string arg1 +intent(in)+len_trim+value)", + "doxygen": { + "brief": "Accept a string instance" + }, + "fmtdict": { + "C_call_list": "SHCXX_arg1", + "C_name": "STR_accept_string_instance_bufferify", + "C_prototype": "char *arg1,\t int Larg1", + "C_return_type": "int", + "F_C_name": "c_accept_string_instance_bufferify", + "cxx_rv_decl": "int SHC_rv", + "function_name": "acceptStringInstance", + "function_suffix": "_bufferify", + "underscore_name": "accept_string_instance" + }, + "options": { + "wrap_c": true, + "wrap_fortran": false, + "wrap_lua": false, + "wrap_python": false + } + }, { "_fmtargs": { "arg1": { diff --git a/regression/reference/strings/strings.log b/regression/reference/strings/strings.log index 1f9ec30b3..23931e182 100644 --- a/regression/reference/strings/strings.log +++ b/regression/reference/strings/strings.log @@ -56,6 +56,8 @@ C function void acceptStringPointerLen(std::string * arg1 +intent(inout), int * C function void acceptStringPointerLen(std::string * arg1 +intent(inout)+len+len_trim, int * nlen +intent(out)) C function void fetchStringPointerLen(std::string * arg1 +intent(out), int * nlen +intent(out)) C function void fetchStringPointerLen(std::string * arg1 +intent(out)+len, int * nlen +intent(out)) +C function int acceptStringInstance(std::string arg1 +intent(in)+value) +C function int acceptStringInstance(std::string arg1 +intent(in)+len_trim+value) C function void explicit1(char * name +intent(in)+len_trim(AAlen)) C function void explicit2(char * name +intent(out)+len(AAtrim)) C function void explicit2(char * name +intent(out)+len(AAtrim)) @@ -128,6 +130,8 @@ C-interface, Fortran function void acceptStringPointerLen(std::string * arg1 +in C-interface function void acceptStringPointerLen(std::string * arg1 +intent(inout)+len+len_trim, int * nlen +intent(out)) C-interface, Fortran function void fetchStringPointerLen(std::string * arg1 +intent(out), int * nlen +intent(out)) C-interface function void fetchStringPointerLen(std::string * arg1 +intent(out)+len, int * nlen +intent(out)) +C-interface, Fortran function int acceptStringInstance(std::string arg1 +intent(in)+value) +C-interface function int acceptStringInstance(std::string arg1 +intent(in)+len_trim+value) C-interface, Fortran function void explicit1(char * name +intent(in)+len_trim(AAlen)) C-interface, Fortran function void explicit2(char * name +intent(out)+len(AAtrim)) C-interface function void explicit2(char * name +intent(out)+len(AAtrim)) @@ -168,6 +172,7 @@ Python function void acceptStringPointer(std::string * arg1 +intent(inout)) Python function void fetchStringPointer(std::string * arg1 +intent(out)) Python function void acceptStringPointerLen(std::string * arg1 +intent(inout), int * nlen +intent(out)) Python function void fetchStringPointerLen(std::string * arg1 +intent(out), int * nlen +intent(out)) +Python function int acceptStringInstance(std::string arg1 +intent(in)+value) Python function void returnStrings(std::string & arg1 +intent(out), std::string & arg2 +intent(out)) Python function void explicit1(char * name +intent(in)+len_trim(AAlen)) Python function void CpassChar(char status +intent(in)+value) diff --git a/regression/reference/strings/wrapfstrings.f b/regression/reference/strings/wrapfstrings.f index ceb0c1261..f0b92662b 100644 --- a/regression/reference/strings/wrapfstrings.f +++ b/regression/reference/strings/wrapfstrings.f @@ -976,6 +976,43 @@ subroutine c_fetch_string_pointer_len_bufferify(arg1, Narg1, & end subroutine c_fetch_string_pointer_len_bufferify end interface + ! ---------------------------------------- + ! Function: int acceptStringInstance + ! Requested: c_native_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: std::string arg1 +intent(in)+value + ! Exact: c_string_scalar_in + interface + function c_accept_string_instance(arg1) & + result(SHT_rv) & + bind(C, name="STR_accept_string_instance") + use iso_c_binding, only : C_CHAR, C_INT + implicit none + character(kind=C_CHAR), intent(IN) :: arg1(*) + integer(C_INT) :: SHT_rv + end function c_accept_string_instance + end interface + + ! ---------------------------------------- + ! Function: int acceptStringInstance + ! Requested: c_native_scalar_result_buf + ! Match: c_default + ! ---------------------------------------- + ! Argument: std::string arg1 +intent(in)+len_trim(Larg1)+value + ! Exact: c_string_scalar_in_buf + interface + function c_accept_string_instance_bufferify(arg1, Larg1) & + result(SHT_rv) & + bind(C, name="STR_accept_string_instance_bufferify") + use iso_c_binding, only : C_CHAR, C_INT + implicit none + character(kind=C_CHAR), intent(IN) :: arg1(*) + integer(C_INT), value, intent(IN) :: Larg1 + integer(C_INT) :: SHT_rv + end function c_accept_string_instance_bufferify + end interface + ! ---------------------------------------- ! Function: void explicit1 ! Requested: c_void_scalar_result @@ -1990,6 +2027,34 @@ subroutine fetch_string_pointer_len(arg1, nlen) ! splicer end function.fetch_string_pointer_len end subroutine fetch_string_pointer_len + ! Generated by arg_to_buffer + ! ---------------------------------------- + ! Function: int acceptStringInstance + ! int acceptStringInstance + ! Requested: f_native_scalar_result + ! Match: f_default + ! Requested: c_native_scalar_result_buf + ! Match: c_default + ! ---------------------------------------- + ! Argument: std::string arg1 +intent(in)+value + ! Exact: f_string_scalar_in + ! Argument: std::string arg1 +intent(in)+len_trim(Larg1)+value + ! Exact: c_string_scalar_in_buf + !> + !! \brief Accept a string instance + !! + !< + function accept_string_instance(arg1) & + result(SHT_rv) + use iso_c_binding, only : C_INT + character(len=*), intent(IN) :: arg1 + integer(C_INT) :: SHT_rv + ! splicer begin function.accept_string_instance + SHT_rv = c_accept_string_instance_bufferify(arg1, & + len_trim(arg1, kind=C_INT)) + ! splicer end function.accept_string_instance + end function accept_string_instance + ! ---------------------------------------- ! Function: void explicit1 ! void explicit1 diff --git a/regression/reference/strings/wrapstrings.cpp b/regression/reference/strings/wrapstrings.cpp index 55d4bed2a..e10b3f160 100644 --- a/regression/reference/strings/wrapstrings.cpp +++ b/regression/reference/strings/wrapstrings.cpp @@ -1250,6 +1250,45 @@ void STR_fetch_string_pointer_len_bufferify(char * arg1, int Narg1, // splicer end function.fetch_string_pointer_len_bufferify } +/** + * \brief Accept a string instance + * + */ +// ---------------------------------------- +// Function: int acceptStringInstance +// Requested: c_native_scalar_result +// Match: c_default +// ---------------------------------------- +// Argument: std::string arg1 +intent(in)+value +// Exact: c_string_scalar_in +int STR_accept_string_instance(char *arg1) +{ + // splicer begin function.accept_string_instance + int SHC_rv = acceptStringInstance(arg1); + return SHC_rv; + // splicer end function.accept_string_instance +} + +/** + * \brief Accept a string instance + * + */ +// ---------------------------------------- +// Function: int acceptStringInstance +// Requested: c_native_scalar_result_buf +// Match: c_default +// ---------------------------------------- +// Argument: std::string arg1 +intent(in)+len_trim(Larg1)+value +// Exact: c_string_scalar_in_buf +int STR_accept_string_instance_bufferify(char *arg1, int Larg1) +{ + // splicer begin function.accept_string_instance_bufferify + std::string SHCXX_arg1(arg1, Larg1); + int SHC_rv = acceptStringInstance(SHCXX_arg1); + return SHC_rv; + // splicer end function.accept_string_instance_bufferify +} + // ---------------------------------------- // Function: void explicit1 // Requested: c diff --git a/regression/reference/strings/wrapstrings.h b/regression/reference/strings/wrapstrings.h index 492364180..e0f817fb2 100644 --- a/regression/reference/strings/wrapstrings.h +++ b/regression/reference/strings/wrapstrings.h @@ -146,6 +146,10 @@ void STR_fetch_string_pointer_len(char * arg1, int * nlen); void STR_fetch_string_pointer_len_bufferify(char * arg1, int Narg1, int * nlen); +int STR_accept_string_instance(char *arg1); + +int STR_accept_string_instance_bufferify(char *arg1, int Larg1); + void STR_explicit1(char * name); void STR_explicit2(char * name); diff --git a/regression/run/strings/main.f b/regression/run/strings/main.f index 7855ecf7f..93b004344 100644 --- a/regression/run/strings/main.f +++ b/regression/run/strings/main.f @@ -226,21 +226,34 @@ subroutine test_functions ! Fetch from global_str. call fetch_string_pointer(str) - call assert_true( str == "from Fortran") + call assert_true( str == "from Fortran", "fetchStringPointer") call fetch_string_pointer_len(str, nlen) - call assert_true( str == "from Fortran") - call assert_equals(len_trim(str), nlen) + call assert_true( str == "from Fortran", "FetchStringPointerLen") + call assert_equals(len_trim(str), nlen, "FetchStringPointerLen") + + ! Return length of string + nlen = accept_string_instance("from Fortran") + call assert_equals(12, nlen, "acceptStringInstance") + str = "from Fortran" + nlen = accept_string_instance(str) ! Returns trimmed length + call assert_equals(12, nlen, "acceptStringInstance") + ! argument is passed by value to C++ so changes will not effect argument. + call assert_equals("from Fortran", str) + + ! Call C++ function directly by adding trailing NULL. + nlen = c_accept_string_instance("from Fortran" // C_NULL_CHAR) + call assert_equals(12, nlen, "acceptStringInstance") ! append "dog". str = "bird" call accept_string_pointer(str) - call assert_true( str == "birddog") + call assert_true( str == "birddog", "acceptStringPointer") str = "bird" call accept_string_pointer_len(str, nlen) - call assert_true( str == "birddog") - call assert_equals(len_trim(str), nlen) + call assert_true( str == "birddog", "acceptStringPointerLen") + call assert_equals(len_trim(str), nlen, "acceptStringPointerLen") end subroutine test_functions diff --git a/regression/run/strings/python/test.py b/regression/run/strings/python/test.py index 5c75c3b37..0a50d44c8 100644 --- a/regression/run/strings/python/test.py +++ b/regression/run/strings/python/test.py @@ -111,6 +111,11 @@ def testacceptStringPointer(self): self.assertEqual('birddog', s) self.assertEqual(len(s), nlen) + def testacceptStringInstance(self): + s = "acceptStringInstance" + nlen = strings.acceptStringInstance(s) + self.assertEqual(len(s), nlen) + def testreturnStrings(self): self.assertEqual(('up', 'down'), strings.returnStrings()) diff --git a/regression/run/strings/strings.cpp b/regression/run/strings/strings.cpp index 8c3ebf4fc..ebb989c9e 100644 --- a/regression/run/strings/strings.cpp +++ b/regression/run/strings/strings.cpp @@ -219,6 +219,13 @@ void fetchStringPointerLen(std::string * arg1, int *len) *len = arg1->size(); } +// Return length of string +int acceptStringInstance(std::string arg1) +{ + arg1[0] = 'X'; + return arg1.length(); +} + void returnStrings(std::string & arg1, std::string & arg2) { arg1 = "up"; diff --git a/regression/run/strings/strings.hpp b/regression/run/strings/strings.hpp index 052e6544b..ffd3009db 100644 --- a/regression/run/strings/strings.hpp +++ b/regression/run/strings/strings.hpp @@ -59,6 +59,8 @@ void acceptStringPointerLen(std::string * arg1, int *len); void fetchStringPointerLen(std::string * arg1, int *len); +int acceptStringInstance(std::string arg1); + void returnStrings(std::string & arg1, std::string & arg2); char returnMany(int * arg1); diff --git a/shroud/typemap.py b/shroud/typemap.py index 11888beda..e56e1e3cb 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -1981,6 +1981,43 @@ def __init__(self, "-}}", ], ), + + # std::string + dict( + name="c_string_scalar_in", + buf_args=["arg_decl"], + c_arg_decl=[ + # Argument is a pointer while std::string is a scalar. + # C++ compiler will convert to std::string when calling function. + "char *{c_var}", + ], + f_arg_decl=[ + # Remove VALUE added by c_default + "character(kind=C_CHAR), intent(IN) :: {c_var}(*)", + ], + f_module=dict(iso_c_binding=["C_CHAR"]), + ), + dict( + name="c_string_scalar_in_buf", + base="c_string_scalar_in", + buf_args=["arg_decl", "len_trim"], + cxx_local_var="scalar", + pre_call=[ + "std::string {cxx_var}({c_var}, {c_var_trim});", + ], + call=[ + "{cxx_var}", + ], + ), + dict( + name="f_string_scalar_in", # pairs with c_string_scalar_in_buf + need_wrapper=True, + buf_args=["arg", "len"], + arg_decl=[ + # Remove VALUE added by f_default + "character(len=*), intent(IN) :: {f_var}", + ], + ), # Uses a two part call to copy results of std::string into a # allocatable Fortran array. diff --git a/shroud/wrapp.py b/shroud/wrapp.py index 1e1a08aad..0b5a8ed6d 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -4162,6 +4162,10 @@ def to_dict(self): dict( name="py_string_scalar_in", cxx_local_var="scalar", + arg_declare=[ + # std::string defaults to making this scalar. Make sure it is pointer. + "char * {c_var};", + ], post_declare=["{c_const}std::string {cxx_var}({c_var});"], fmtdict=dict( ctor_expr="{cxx_var}{cxx_member}data(),\t {cxx_var}{cxx_member}size()", From a19adc0896299021d2b4d4f3690f1a50e1bca12c Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Thu, 30 Jul 2020 21:17:10 -0700 Subject: [PATCH 13/36] Start complex examples For C and C++. Only added functions to wrap, no wrapping done yet. --- regression/run/clibrary/clibrary.c | 6 ++++++ regression/run/clibrary/clibrary.h | 3 +++ regression/run/cxxlibrary/cxxlibrary.cpp | 6 ++++++ regression/run/cxxlibrary/cxxlibrary.hpp | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/regression/run/clibrary/clibrary.c b/regression/run/clibrary/clibrary.c index edb6168e6..0f8e787b8 100644 --- a/regression/run/clibrary/clibrary.c +++ b/regression/run/clibrary/clibrary.c @@ -443,6 +443,12 @@ void get_values(int *nvalues, int *values) return; } +//---------------------------------------------------------------------- + +void accept_complex(double complex *arg1) +{ +} + //---------------------------------------------------------------------- const char *LastFunctionCalled(void) { diff --git a/regression/run/clibrary/clibrary.h b/regression/run/clibrary/clibrary.h index 5a8e29b08..0fe828645 100644 --- a/regression/run/clibrary/clibrary.h +++ b/regression/run/clibrary/clibrary.h @@ -12,6 +12,7 @@ #define CLIBRARY_HPP #include +#include /* Size of buffer passed from Fortran */ #define LENOUTBUF 40 @@ -109,4 +110,6 @@ void increment(int *array, int size); void get_values(int *nvalues, int *values); +void accept_complex(double complex *arg1); + #endif // CLIBRARY_HPP diff --git a/regression/run/cxxlibrary/cxxlibrary.cpp b/regression/run/cxxlibrary/cxxlibrary.cpp index 7fc4e5799..e48c73e1f 100644 --- a/regression/run/cxxlibrary/cxxlibrary.cpp +++ b/regression/run/cxxlibrary/cxxlibrary.cpp @@ -92,3 +92,9 @@ void defaultArgsInOut(int in1, int *out1, int *out2, bool flag) *out2 = 2; } } + +//---------------------------------------------------------------------- + +void accept_complex(std::complex *arg1) +{ +} diff --git a/regression/run/cxxlibrary/cxxlibrary.hpp b/regression/run/cxxlibrary/cxxlibrary.hpp index c74f27d02..7f0cf0a51 100644 --- a/regression/run/cxxlibrary/cxxlibrary.hpp +++ b/regression/run/cxxlibrary/cxxlibrary.hpp @@ -12,6 +12,8 @@ #ifndef CXXLIBRARY_H #define CXXLIBRARY_H +#include + struct Cstruct1 { int ifield; double dfield; @@ -44,5 +46,9 @@ bool defaultPtrIsNULL(double *data = nullptr); void defaultArgsInOut(int in1, int *out1, int *out2, bool flag = false); +//---------------------------------------------------------------------- + +void accept_complex(std::complex *arg1); + #endif // CXXLIBRARY_H From 0cf89c468d6a18b7363139ddffb4022ffd32723f Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Thu, 30 Jul 2020 23:25:56 -0700 Subject: [PATCH 14/36] Test C double complex intent(INOUT) scalar. --- regression/input/clibrary.yaml | 5 + regression/reference/clibrary/clibrary.json | 89 +++++++ regression/reference/clibrary/clibrary.log | 2 + regression/reference/clibrary/wrapfclibrary.f | 17 ++ regression/reference/none/def_types.yaml | 22 ++ regression/reference/none/helpers.c | 246 ++++++++++++++++++ regression/reference/none/helpers.f | 16 ++ regression/reference/none/none.json | 22 ++ regression/run/clibrary/clibrary.c | 3 +- regression/run/clibrary/clibrary.h | 2 +- regression/run/clibrary/main.f | 12 + shroud/declast.py | 3 + shroud/typemap.py | 18 ++ 13 files changed, 455 insertions(+), 2 deletions(-) diff --git a/regression/input/clibrary.yaml b/regression/input/clibrary.yaml index 941c2d05e..73acdff26 100644 --- a/regression/input/clibrary.yaml +++ b/regression/input/clibrary.yaml @@ -252,6 +252,11 @@ declarations: wrap_lua: False wrap_python: False +###################################################################### +- decl: void accept_double_complex(double complex *arg1) + options: + wrap_python: False + ###################################################################### # XXX - Replace with other code to free memory diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index 08cfd9493..f25748310 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -5111,6 +5111,95 @@ "wrap_lua": false, "wrap_python": false } + }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "double complex", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "c_native_*_inout", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "f_intent": "INOUT", + "f_type": "complex(C_DOUBLE_COMPLEX)", + "f_var": "arg1", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "f_native_*_inout", + "stmt1": "f_default", + "stmtc0": "c_native_*_inout", + "stmtc1": "c_default" + } + } + }, + "ast": { + "declarator": { + "name": "accept_double_complex", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "inout" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "double", + "complex" + ], + "typemap_name": "double_complex" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void accept_double_complex(double complex *arg1)", + "declgen": "void accept_double_complex(double complex * arg1 +intent(inout))", + "fmtdict": { + "C_call_list": "arg1", + "C_name": "accept_double_complex", + "C_prototype": "double complex * arg1", + "C_return_type": "void", + "F_C_call": "c_accept_double_complex", + "F_C_name": "accept_double_complex", + "F_arg_c_call": "arg1", + "F_arguments": "arg1", + "F_name_function": "accept_double_complex", + "F_name_generic": "accept_double_complex", + "F_name_impl": "accept_double_complex", + "F_subprogram": "subroutine", + "function_name": "accept_double_complex", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "accept_double_complex" + }, + "options": { + "wrap_python": false + } } ], "language": "c", diff --git a/regression/reference/clibrary/clibrary.log b/regression/reference/clibrary/clibrary.log index a4b4490b4..b195cc1ed 100644 --- a/regression/reference/clibrary/clibrary.log +++ b/regression/reference/clibrary/clibrary.log @@ -33,6 +33,7 @@ C function void callback2(int type +intent(in)+value, void * in +assumedtype+int C function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)) C function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)+len) C function void callback_set_alloc(int tc +intent(in)+value, array_info * arr +intent(inout), void ( * alloc)(int tc +intent(in)+value, array_info * arr +intent(inout)) +intent(in)+value) +C function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapClibrary.h Close wrapClibrary.c Close typesClibrary.h @@ -70,6 +71,7 @@ C-interface, Fortran function void callback2(int type +intent(in)+value, void * C-interface, Fortran function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)) C-interface function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)+len) C-interface, Fortran function void callback_set_alloc(int tc +intent(in)+value, array_info * arr +intent(inout), void ( * alloc)(int tc +intent(in)+value, array_info * arr +intent(inout)) +intent(in)+value) +C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapfclibrary.f Python function void NoReturnNoArguments() Python function double PassByValue(double arg1 +intent(in)+value, int arg2 +intent(in)+value) diff --git a/regression/reference/clibrary/wrapfclibrary.f b/regression/reference/clibrary/wrapfclibrary.f index 44d84464c..65a3be757 100644 --- a/regression/reference/clibrary/wrapfclibrary.f +++ b/regression/reference/clibrary/wrapfclibrary.f @@ -809,6 +809,23 @@ subroutine callback_set_alloc(tc, arr, alloc) & end subroutine callback_set_alloc end interface + ! ---------------------------------------- + ! Function: void accept_double_complex + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: double complex * arg1 +intent(inout) + ! Requested: c_native_*_inout + ! Match: c_default + interface + subroutine accept_double_complex(arg1) & + bind(C, name="accept_double_complex") + use iso_c_binding, only : C_DOUBLE_COMPLEX + implicit none + complex(C_DOUBLE_COMPLEX), intent(INOUT) :: arg1 + end subroutine accept_double_complex + end interface + interface ! splicer begin additional_interfaces ! splicer end additional_interfaces diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index 831add847..18a83e715 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -102,6 +102,28 @@ typemap: LUA_push: lua_pushnumber({LUA_state_var}, {c_var}) sgroup: native sh_type: SH_TYPE_DOUBLE + - type: double_complex + fields: + flat_name: double_complex + base: unknown + idtor: 0 + cxx_type: double complex + c_type: double complex + f_type: complex(C_DOUBLE_COMPLEX) + f_kind: C_DOUBLE_COMPLEX + f_module: + iso_c_binding: + - C_DOUBLE_COMPLEX + f_cast: cmplx({f_var}, C_DOUBLE_COMPLEX) + PY_format: d + PY_ctor: PyFloat_FromDouble({ctor_expr}) + PY_get: PyFloat_AsDouble({py_var}) + PYN_typenum: NPY_DOUBLE + LUA_type: LUA_TNUMBER + LUA_pop: lua_tonumber({LUA_state_var}, {LUA_index}) + LUA_push: lua_pushnumber({LUA_state_var}, {c_var}) + sgroup: native + sh_type: SH_TYPE_DOUBLE_COMPLEX - type: float fields: flat_name: float diff --git a/regression/reference/none/helpers.c b/regression/reference/none/helpers.c index 5421b2cf1..a2ff9b907 100644 --- a/regression/reference/none/helpers.c +++ b/regression/reference/none/helpers.c @@ -374,6 +374,37 @@ static int SHROUD_create_from_PyObject_vector_double(PyObject *obj, } ##### end create_from_PyObject_vector_double cxx_source +##### start create_from_PyObject_vector_double_complex cxx_source + +// helper create_from_PyObject_vector_double_complex +// Convert obj into an array of type double complex +// Return -1 on error. +static int SHROUD_create_from_PyObject_vector_double_complex + (PyObject *obj, const char *name, std::vector & in) +{ + PyObject *seq = PySequence_Fast(obj, "holder"); + if (seq == NULL) { + PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable", + name); + return -1; + } + Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); + for (Py_ssize_t i = 0; i < size; i++) { + PyObject *item = PySequence_Fast_GET_ITEM(seq, i); + in.push_back(PyFloat_AsDouble(item)); + if (PyErr_Occurred()) { + Py_DECREF(seq); + PyErr_Format(PyExc_ValueError, + "argument '%s', index %d must be double complex", name, + (int) i); + return -1; + } + } + Py_DECREF(seq); + return 0; +} +##### end create_from_PyObject_vector_double_complex cxx_source + ##### start create_from_PyObject_vector_float cxx_source // helper create_from_PyObject_vector_float @@ -953,6 +984,95 @@ static int SHROUD_fill_from_PyObject_char(PyObject *obj, } ##### end fill_from_PyObject_char source +##### start fill_from_PyObject_double_complex_list source + +// helper fill_from_PyObject_double_complex_list +// Fill double complex array from Python sequence object. +// If obj is a scalar, broadcast to array. +// Return 0 on success, -1 on error. +static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, + const char *name, double complex *in, Py_ssize_t insize) +{ + double complex value = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + // Broadcast scalar. + for (Py_ssize_t i = 0; i < insize; ++i) { + in[i] = value; + } + return 0; + } + PyErr_Clear(); + + // Look for sequence. + PyObject *seq = PySequence_Fast(obj, "holder"); + if (seq == NULL) { + PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable", + name); + return -1; + } + Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); + if (size > insize) { + size = insize; + } + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject *item = PySequence_Fast_GET_ITEM(seq, i); + in[i] = PyFloat_AsDouble(item); + if (PyErr_Occurred()) { + Py_DECREF(seq); + PyErr_Format(PyExc_TypeError, + "argument '%s', index %d must be double complex", name, + (int) i); + return -1; + } + } + Py_DECREF(seq); + return 0; +} +##### end fill_from_PyObject_double_complex_list source + +##### start fill_from_PyObject_double_complex_numpy source + +// helper fill_from_PyObject_double_complex_numpy +// Fill double complex array from Python object using NumPy. +// If obj is a scalar, broadcast to array. +// Return 0 on success, -1 on error. +static int SHROUD_fill_from_PyObject_double_complex_numpy(PyObject *obj, + const char *name, double complex *in, Py_ssize_t insize) +{ + double complex value = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + // Broadcast scalar. + for (Py_ssize_t i = 0; i < insize; ++i) { + in[i] = value; + } + return 0; + } + PyErr_Clear(); + + PyObject *array = PyArray_FROM_OTF(obj, NPY_DOUBLE, + NPY_ARRAY_IN_ARRAY); + if (array == nullptr) { + PyErr_Format(PyExc_TypeError, + "argument '%s' must be a 1-D array of double complex", + name); + return -1; + } + PyArrayObject *pyarray = reinterpret_cast(array); + + double complex *data = static_cast + (PyArray_DATA(pyarray)); + npy_intp size = PyArray_SIZE(pyarray); + if (size > insize) { + size = insize; + } + for (Py_ssize_t i = 0; i < size; ++i) { + in[i] = data[i]; + } + Py_DECREF(pyarray); + return 0; +} +##### end fill_from_PyObject_double_complex_numpy source + ##### start fill_from_PyObject_double_list source // helper fill_from_PyObject_double_list @@ -2477,6 +2597,70 @@ static int SHROUD_get_from_object_charptr(PyObject *obj, } ##### end get_from_object_charptr source +##### start get_from_object_double_complex_list source + +// helper get_from_object_double_complex_list +// Convert list of PyObject to array of double complex. +// Return 0 on error, 1 on success. +// Set Python exception on error. +static int SHROUD_get_from_object_double_complex_list(PyObject *obj, + LIB_SHROUD_converter_value *value) +{ + PyObject *seq = PySequence_Fast(obj, "holder"); + if (seq == NULL) { + PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable", + value->name); + return 0; + } + Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); + double complex *in = static_cast + (std::malloc(size * sizeof(double complex))); + for (Py_ssize_t i = 0; i < size; i++) { + PyObject *item = PySequence_Fast_GET_ITEM(seq, i); + in[i] = PyFloat_AsDouble(item); + if (PyErr_Occurred()) { + std::free(in); + Py_DECREF(seq); + PyErr_Format(PyExc_TypeError, + "argument '%s', index %d must be double complex", + value->name, (int) i); + return 0; + } + } + Py_DECREF(seq); + + value->obj = nullptr; // Do not save list object. + value->dataobj = PyCapsule_New(in, nullptr, FREE_py_capsule_dtor); + value->data = static_cast(in); + value->size = size; + return 1; +} +##### end get_from_object_double_complex_list source + +##### start get_from_object_double_complex_numpy source + +// helper get_from_object_double_complex_numpy +// Convert PyObject to double complex pointer. +static int SHROUD_get_from_object_double_complex_numpy(PyObject *obj, + LIB_SHROUD_converter_value *value) +{ + PyObject *array = PyArray_FROM_OTF(obj, NPY_DOUBLE, + NPY_ARRAY_IN_ARRAY); + if (array == nullptr) { + PyErr_SetString(PyExc_ValueError, + "must be a 1-D array of double complex"); + return 0; + } + value->obj = array; + value->dataobj = nullptr; + value->data = PyArray_DATA(reinterpret_cast + (array)); + value->size = PyArray_SIZE(reinterpret_cast + (array)); + return 1; +} +##### end get_from_object_double_complex_numpy source + ##### start get_from_object_double_list source // helper get_from_object_double_list @@ -3609,6 +3793,21 @@ static PyObject *SHROUD_to_PyList_double(const double *in, size_t size) } ##### end to_PyList_double source +##### start to_PyList_double_complex source + +// helper to_PyList_double_complex +// Convert double complex pointer to PyList of PyObjects. +static PyObject *SHROUD_to_PyList_double_complex + (const double complex *in, size_t size) +{ + PyObject *out = PyList_New(size); + for (size_t i = 0; i < size; ++i) { + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } + return out; +} +##### end to_PyList_double_complex source + ##### start to_PyList_float source // helper to_PyList_float @@ -3858,6 +4057,21 @@ static PyObject *SHROUD_to_PyList_vector_double } ##### end to_PyList_vector_double source +##### start to_PyList_vector_double_complex source + +// helper to_PyList_vector_double_complex +static PyObject *SHROUD_to_PyList_vector_double_complex + (std::vector & in) +{ + size_t size = in.size(); + PyObject *out = PyList_New(size); + for (size_t i = 0; i < size; ++i) { + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } + return out; +} +##### end to_PyList_vector_double_complex source + ##### start to_PyList_vector_float source // helper to_PyList_vector_float @@ -4140,6 +4354,22 @@ static void SHROUD_update_PyList_double } ##### end update_PyList_double source +##### start update_PyList_double_complex source + +// helper update_PyList_double_complex +// Replace members of existing list with new values. +// out is known to be a PyList of the correct length. +static void SHROUD_update_PyList_double_complex + (PyObject *out, double complex *in, size_t size) +{ + for (size_t i = 0; i < size; ++i) { + PyObject *item = PyList_GET_ITEM(out, i); + Py_DECREF(item); + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } +} +##### end update_PyList_double_complex source + ##### start update_PyList_float source // helper update_PyList_float @@ -4412,6 +4642,22 @@ static void SHROUD_update_PyList_vector_double } ##### end update_PyList_vector_double source +##### start update_PyList_vector_double_complex source + +// helper update_PyList_vector_double_complex +// Replace members of existing list with new values. +// out is known to be a PyList of the correct length. +static void SHROUD_update_PyList_vector_double_complex + (PyObject *out, double complex *in, size_t size) +{ + for (size_t i = 0; i < size; ++i) { + PyObject *item = PyList_GET_ITEM(out, i); + Py_DECREF(item); + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } +} +##### end update_PyList_vector_double_complex source + ##### start update_PyList_vector_float source // helper update_PyList_vector_float diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index 4bdef3ee4..d7e6a86d4 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -121,6 +121,22 @@ end subroutine LIB_SHROUD_copy_array_double end interface ##### end copy_array_double interface +##### start copy_array_double_complex interface + +interface + ! helper copy_array_double_complex + ! Copy contents of context into c_var. + subroutine LIB_SHROUD_copy_array_double_complex(context, c_var, c_var_size) & + bind(C, name="LIB_ShroudCopyArray") + use iso_c_binding, only : C_DOUBLE_COMPLEX, C_SIZE_T + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context + complex(C_DOUBLE_COMPLEX), intent(OUT) :: c_var(*) + integer(C_SIZE_T), value :: c_var_size + end subroutine LIB_SHROUD_copy_array_double_complex +end interface +##### end copy_array_double_complex interface + ##### start copy_array_float interface interface diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index f3e52b2a5..17dc05fb0 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -309,6 +309,28 @@ "sgroup": "native", "sh_type": "SH_TYPE_DOUBLE" }, + "double_complex": { + "LUA_pop": "lua_tonumber({LUA_state_var}, {LUA_index})", + "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", + "LUA_type": "LUA_TNUMBER", + "PYN_typenum": "NPY_DOUBLE", + "PY_ctor": "PyFloat_FromDouble({ctor_expr})", + "PY_format": "d", + "PY_get": "PyFloat_AsDouble({py_var})", + "c_type": "double complex", + "cxx_type": "double complex", + "f_cast": "cmplx({f_var}, C_DOUBLE_COMPLEX)", + "f_kind": "C_DOUBLE_COMPLEX", + "f_module": { + "iso_c_binding": [ + "C_DOUBLE_COMPLEX" + ] + }, + "f_type": "complex(C_DOUBLE_COMPLEX)", + "flat_name": "double_complex", + "sgroup": "native", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX" + }, "float": { "LUA_pop": "lua_tonumber({LUA_state_var}, {LUA_index})", "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", diff --git a/regression/run/clibrary/clibrary.c b/regression/run/clibrary/clibrary.c index 0f8e787b8..bb265da55 100644 --- a/regression/run/clibrary/clibrary.c +++ b/regression/run/clibrary/clibrary.c @@ -445,8 +445,9 @@ void get_values(int *nvalues, int *values) //---------------------------------------------------------------------- -void accept_complex(double complex *arg1) +void accept_double_complex(double complex *arg1) { + *arg1 = 3.0 + 4.0 * I; } //---------------------------------------------------------------------- diff --git a/regression/run/clibrary/clibrary.h b/regression/run/clibrary/clibrary.h index 0fe828645..409fede6c 100644 --- a/regression/run/clibrary/clibrary.h +++ b/regression/run/clibrary/clibrary.h @@ -110,6 +110,6 @@ void increment(int *array, int size); void get_values(int *nvalues, int *values); -void accept_complex(double complex *arg1); +void accept_double_complex(double complex *arg1); #endif // CLIBRARY_HPP diff --git a/regression/run/clibrary/main.f b/regression/run/clibrary/main.f index 0e7c709db..cebe28001 100644 --- a/regression/run/clibrary/main.f +++ b/regression/run/clibrary/main.f @@ -95,6 +95,7 @@ program tester call test_functions call test_callback + call test_complex ! call test_vector @@ -298,6 +299,17 @@ subroutine test_callback end subroutine test_callback + subroutine test_complex + complex(C_DOUBLE_COMPLEX) c8 + + ! intent(INOUT) argument + c8 = (1.0d0, 2.0d0) + call accept_double_complex(c8) + call assert_equals(3.0d0, real(c8), "accept_double_complex") + call assert_equals(4.0d0, imag(c8), "accept_double_complex") + + end subroutine test_complex + ! subroutine test_vector ! integer(C_INT) intv(5) ! character(10) :: names(3) diff --git a/shroud/declast.py b/shroud/declast.py index 51cd6e0d3..7cccbe792 100644 --- a/shroud/declast.py +++ b/shroud/declast.py @@ -32,6 +32,7 @@ "double", "signed", "unsigned", + "complex", # C _Complex } type_qualifier = {"const", "volatile"} storage_class = {"auto", "register", "static", "extern", "typedef"} @@ -83,6 +84,8 @@ unsigned_long_long_int="unsigned_long_long", # implied 'int' unsigned="unsigned_int", + complex_double="double_complex", + complex_float="float_complex", ) def tokenize(s): diff --git a/shroud/typemap.py b/shroud/typemap.py index e56e1e3cb..7e2b2753a 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -644,6 +644,24 @@ def initialize(): sgroup="native", sh_type="SH_TYPE_DOUBLE", ), + double_complex=Typemap( # _Complex + "double_complex", + c_type="double complex", + cxx_type="double complex", # Used to compute flat_name, but not C++. + f_cast="cmplx({f_var}, C_DOUBLE_COMPLEX)", + f_type="complex(C_DOUBLE_COMPLEX)", + f_kind="C_DOUBLE_COMPLEX", + f_module=dict(iso_c_binding=["C_DOUBLE_COMPLEX"]), + PY_format="d", + PY_ctor="PyFloat_FromDouble({ctor_expr})", + PY_get="PyFloat_AsDouble({py_var})", + PYN_typenum="NPY_DOUBLE", + LUA_type="LUA_TNUMBER", + LUA_pop="lua_tonumber({LUA_state_var}, {LUA_index})", + LUA_push="lua_pushnumber({LUA_state_var}, {c_var})", + sgroup="native", + sh_type="SH_TYPE_DOUBLE_COMPLEX", + ), bool=Typemap( "bool", c_type="bool", From d617c6f0acb5076a36e1a80b320708c6c2e25b13 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Fri, 31 Jul 2020 12:45:18 -0700 Subject: [PATCH 15/36] Test C float complex intent(INOUT) scalar. --- regression/input/clibrary.yaml | 3 + regression/reference/clibrary/clibrary.json | 89 +++++++++++++++++++ regression/reference/clibrary/clibrary.log | 2 + regression/reference/clibrary/wrapfclibrary.f | 17 ++++ regression/run/clibrary/clibrary.c | 4 + regression/run/clibrary/clibrary.h | 1 + regression/run/clibrary/main.f | 8 +- shroud/typemap.py | 18 ++++ 8 files changed, 141 insertions(+), 1 deletion(-) diff --git a/regression/input/clibrary.yaml b/regression/input/clibrary.yaml index 73acdff26..786ce6cdc 100644 --- a/regression/input/clibrary.yaml +++ b/regression/input/clibrary.yaml @@ -253,6 +253,9 @@ declarations: wrap_python: False ###################################################################### +- decl: void accept_float_complex(float complex *arg1) + options: + wrap_python: False - decl: void accept_double_complex(double complex *arg1) options: wrap_python: False diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index f25748310..8f79d6e0f 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -5112,6 +5112,95 @@ "wrap_python": false } }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "float complex", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_FLOAT_COMPLEX", + "stmt0": "c_native_*_inout", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "f_intent": "INOUT", + "f_type": "complex(C_FLOAT_COMPLEX)", + "f_var": "arg1", + "sh_type": "SH_TYPE_FLOAT_COMPLEX", + "stmt0": "f_native_*_inout", + "stmt1": "f_default", + "stmtc0": "c_native_*_inout", + "stmtc1": "c_default" + } + } + }, + "ast": { + "declarator": { + "name": "accept_float_complex", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "inout" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "float", + "complex" + ], + "typemap_name": "float_complex" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void accept_float_complex(float complex *arg1)", + "declgen": "void accept_float_complex(float complex * arg1 +intent(inout))", + "fmtdict": { + "C_call_list": "arg1", + "C_name": "accept_float_complex", + "C_prototype": "float complex * arg1", + "C_return_type": "void", + "F_C_call": "c_accept_float_complex", + "F_C_name": "accept_float_complex", + "F_arg_c_call": "arg1", + "F_arguments": "arg1", + "F_name_function": "accept_float_complex", + "F_name_generic": "accept_float_complex", + "F_name_impl": "accept_float_complex", + "F_subprogram": "subroutine", + "function_name": "accept_float_complex", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "accept_float_complex" + }, + "options": { + "wrap_python": false + } + }, { "_fmtargs": { "arg1": { diff --git a/regression/reference/clibrary/clibrary.log b/regression/reference/clibrary/clibrary.log index b195cc1ed..91441fd7c 100644 --- a/regression/reference/clibrary/clibrary.log +++ b/regression/reference/clibrary/clibrary.log @@ -33,6 +33,7 @@ C function void callback2(int type +intent(in)+value, void * in +assumedtype+int C function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)) C function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)+len) C function void callback_set_alloc(int tc +intent(in)+value, array_info * arr +intent(inout), void ( * alloc)(int tc +intent(in)+value, array_info * arr +intent(inout)) +intent(in)+value) +C function void accept_float_complex(float complex * arg1 +intent(inout)) C function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapClibrary.h Close wrapClibrary.c @@ -71,6 +72,7 @@ C-interface, Fortran function void callback2(int type +intent(in)+value, void * C-interface, Fortran function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)) C-interface function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)+len) C-interface, Fortran function void callback_set_alloc(int tc +intent(in)+value, array_info * arr +intent(inout), void ( * alloc)(int tc +intent(in)+value, array_info * arr +intent(inout)) +intent(in)+value) +C-interface, Fortran function void accept_float_complex(float complex * arg1 +intent(inout)) C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapfclibrary.f Python function void NoReturnNoArguments() diff --git a/regression/reference/clibrary/wrapfclibrary.f b/regression/reference/clibrary/wrapfclibrary.f index 65a3be757..a70469253 100644 --- a/regression/reference/clibrary/wrapfclibrary.f +++ b/regression/reference/clibrary/wrapfclibrary.f @@ -809,6 +809,23 @@ subroutine callback_set_alloc(tc, arr, alloc) & end subroutine callback_set_alloc end interface + ! ---------------------------------------- + ! Function: void accept_float_complex + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: float complex * arg1 +intent(inout) + ! Requested: c_native_*_inout + ! Match: c_default + interface + subroutine accept_float_complex(arg1) & + bind(C, name="accept_float_complex") + use iso_c_binding, only : C_FLOAT_COMPLEX + implicit none + complex(C_FLOAT_COMPLEX), intent(INOUT) :: arg1 + end subroutine accept_float_complex + end interface + ! ---------------------------------------- ! Function: void accept_double_complex ! Requested: c_void_scalar_result diff --git a/regression/run/clibrary/clibrary.c b/regression/run/clibrary/clibrary.c index bb265da55..79c90af70 100644 --- a/regression/run/clibrary/clibrary.c +++ b/regression/run/clibrary/clibrary.c @@ -445,6 +445,10 @@ void get_values(int *nvalues, int *values) //---------------------------------------------------------------------- +void accept_float_complex(float complex *arg1) +{ + *arg1 = 3.0 + 4.0 * I; +} void accept_double_complex(double complex *arg1) { *arg1 = 3.0 + 4.0 * I; diff --git a/regression/run/clibrary/clibrary.h b/regression/run/clibrary/clibrary.h index 409fede6c..990515f2a 100644 --- a/regression/run/clibrary/clibrary.h +++ b/regression/run/clibrary/clibrary.h @@ -110,6 +110,7 @@ void increment(int *array, int size); void get_values(int *nvalues, int *values); +void accept_float_complex(float complex *arg1); void accept_double_complex(double complex *arg1); #endif // CLIBRARY_HPP diff --git a/regression/run/clibrary/main.f b/regression/run/clibrary/main.f index cebe28001..7a33632d3 100644 --- a/regression/run/clibrary/main.f +++ b/regression/run/clibrary/main.f @@ -300,14 +300,20 @@ subroutine test_callback end subroutine test_callback subroutine test_complex + complex(C_FLOAT_COMPLEX) c4 complex(C_DOUBLE_COMPLEX) c8 + ! intent(INOUT) argument + c4 = (1.0, 2.0) + call accept_float_complex(c4) + call assert_equals(3.0, real(c4), "accept_float_complex") + call assert_equals(4.0, imag(c4), "accept_float_complex") + ! intent(INOUT) argument c8 = (1.0d0, 2.0d0) call accept_double_complex(c8) call assert_equals(3.0d0, real(c8), "accept_double_complex") call assert_equals(4.0d0, imag(c8), "accept_double_complex") - end subroutine test_complex ! subroutine test_vector diff --git a/shroud/typemap.py b/shroud/typemap.py index 7e2b2753a..c021b2d7a 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -644,6 +644,24 @@ def initialize(): sgroup="native", sh_type="SH_TYPE_DOUBLE", ), + float_complex=Typemap( # _Complex + "float_complex", + c_type="float complex", + cxx_type="float complex", # Used to compute flat_name, but not C++. + f_cast="cmplx({f_var}, C_FLOAT_COMPLEX)", + f_type="complex(C_FLOAT_COMPLEX)", + f_kind="C_FLOAT_COMPLEX", + f_module=dict(iso_c_binding=["C_FLOAT_COMPLEX"]), + PY_format="d", + PY_ctor="PyFloat_FromDouble({ctor_expr})", + PY_get="PyFloat_AsDouble({py_var})", + PYN_typenum="NPY_DOUBLE", + LUA_type="LUA_TNUMBER", + LUA_pop="lua_tonumber({LUA_state_var}, {LUA_index})", + LUA_push="lua_pushnumber({LUA_state_var}, {c_var})", + sgroup="native", + sh_type="SH_TYPE_FLOAT_COMPLEX", + ), double_complex=Typemap( # _Complex "double_complex", c_type="double complex", From 86be8a60309d9493e13e4e6c3cfcc1784b42f2de Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Fri, 31 Jul 2020 12:56:52 -0700 Subject: [PATCH 16/36] Test C float complex intent(INOUT) scalar. --- regression/reference/none/def_types.yaml | 22 ++ regression/reference/none/helpers.c | 245 +++++++++++++++++++++++ regression/reference/none/helpers.f | 16 ++ regression/reference/none/none.json | 22 ++ 4 files changed, 305 insertions(+) diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index 18a83e715..abb8055ed 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -146,6 +146,28 @@ typemap: LUA_push: lua_pushnumber({LUA_state_var}, {c_var}) sgroup: native sh_type: SH_TYPE_FLOAT + - type: float_complex + fields: + flat_name: float_complex + base: unknown + idtor: 0 + cxx_type: float complex + c_type: float complex + f_type: complex(C_FLOAT_COMPLEX) + f_kind: C_FLOAT_COMPLEX + f_module: + iso_c_binding: + - C_FLOAT_COMPLEX + f_cast: cmplx({f_var}, C_FLOAT_COMPLEX) + PY_format: d + PY_ctor: PyFloat_FromDouble({ctor_expr}) + PY_get: PyFloat_AsDouble({py_var}) + PYN_typenum: NPY_DOUBLE + LUA_type: LUA_TNUMBER + LUA_pop: lua_tonumber({LUA_state_var}, {LUA_index}) + LUA_push: lua_pushnumber({LUA_state_var}, {c_var}) + sgroup: native + sh_type: SH_TYPE_FLOAT_COMPLEX - type: int fields: flat_name: int diff --git a/regression/reference/none/helpers.c b/regression/reference/none/helpers.c index a2ff9b907..3326ec416 100644 --- a/regression/reference/none/helpers.c +++ b/regression/reference/none/helpers.c @@ -435,6 +435,37 @@ static int SHROUD_create_from_PyObject_vector_float(PyObject *obj, } ##### end create_from_PyObject_vector_float cxx_source +##### start create_from_PyObject_vector_float_complex cxx_source + +// helper create_from_PyObject_vector_float_complex +// Convert obj into an array of type float complex +// Return -1 on error. +static int SHROUD_create_from_PyObject_vector_float_complex + (PyObject *obj, const char *name, std::vector & in) +{ + PyObject *seq = PySequence_Fast(obj, "holder"); + if (seq == NULL) { + PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable", + name); + return -1; + } + Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); + for (Py_ssize_t i = 0; i < size; i++) { + PyObject *item = PySequence_Fast_GET_ITEM(seq, i); + in.push_back(PyFloat_AsDouble(item)); + if (PyErr_Occurred()) { + Py_DECREF(seq); + PyErr_Format(PyExc_ValueError, + "argument '%s', index %d must be float complex", name, + (int) i); + return -1; + } + } + Py_DECREF(seq); + return 0; +} +##### end create_from_PyObject_vector_float_complex cxx_source + ##### start create_from_PyObject_vector_int cxx_source // helper create_from_PyObject_vector_int @@ -1160,6 +1191,94 @@ static int SHROUD_fill_from_PyObject_double_numpy(PyObject *obj, } ##### end fill_from_PyObject_double_numpy source +##### start fill_from_PyObject_float_complex_list source + +// helper fill_from_PyObject_float_complex_list +// Fill float complex array from Python sequence object. +// If obj is a scalar, broadcast to array. +// Return 0 on success, -1 on error. +static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, + const char *name, float complex *in, Py_ssize_t insize) +{ + float complex value = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + // Broadcast scalar. + for (Py_ssize_t i = 0; i < insize; ++i) { + in[i] = value; + } + return 0; + } + PyErr_Clear(); + + // Look for sequence. + PyObject *seq = PySequence_Fast(obj, "holder"); + if (seq == NULL) { + PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable", + name); + return -1; + } + Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); + if (size > insize) { + size = insize; + } + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject *item = PySequence_Fast_GET_ITEM(seq, i); + in[i] = PyFloat_AsDouble(item); + if (PyErr_Occurred()) { + Py_DECREF(seq); + PyErr_Format(PyExc_TypeError, + "argument '%s', index %d must be float complex", name, + (int) i); + return -1; + } + } + Py_DECREF(seq); + return 0; +} +##### end fill_from_PyObject_float_complex_list source + +##### start fill_from_PyObject_float_complex_numpy source + +// helper fill_from_PyObject_float_complex_numpy +// Fill float complex array from Python object using NumPy. +// If obj is a scalar, broadcast to array. +// Return 0 on success, -1 on error. +static int SHROUD_fill_from_PyObject_float_complex_numpy(PyObject *obj, + const char *name, float complex *in, Py_ssize_t insize) +{ + float complex value = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + // Broadcast scalar. + for (Py_ssize_t i = 0; i < insize; ++i) { + in[i] = value; + } + return 0; + } + PyErr_Clear(); + + PyObject *array = PyArray_FROM_OTF(obj, NPY_DOUBLE, + NPY_ARRAY_IN_ARRAY); + if (array == nullptr) { + PyErr_Format(PyExc_TypeError, + "argument '%s' must be a 1-D array of float complex", name); + return -1; + } + PyArrayObject *pyarray = reinterpret_cast(array); + + float complex *data = static_cast + (PyArray_DATA(pyarray)); + npy_intp size = PyArray_SIZE(pyarray); + if (size > insize) { + size = insize; + } + for (Py_ssize_t i = 0; i < size; ++i) { + in[i] = data[i]; + } + Py_DECREF(pyarray); + return 0; +} +##### end fill_from_PyObject_float_complex_numpy source + ##### start fill_from_PyObject_float_list source // helper fill_from_PyObject_float_list @@ -2725,6 +2844,70 @@ static int SHROUD_get_from_object_double_numpy(PyObject *obj, } ##### end get_from_object_double_numpy source +##### start get_from_object_float_complex_list source + +// helper get_from_object_float_complex_list +// Convert list of PyObject to array of float complex. +// Return 0 on error, 1 on success. +// Set Python exception on error. +static int SHROUD_get_from_object_float_complex_list(PyObject *obj, + LIB_SHROUD_converter_value *value) +{ + PyObject *seq = PySequence_Fast(obj, "holder"); + if (seq == NULL) { + PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable", + value->name); + return 0; + } + Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); + float complex *in = static_cast + (std::malloc(size * sizeof(float complex))); + for (Py_ssize_t i = 0; i < size; i++) { + PyObject *item = PySequence_Fast_GET_ITEM(seq, i); + in[i] = PyFloat_AsDouble(item); + if (PyErr_Occurred()) { + std::free(in); + Py_DECREF(seq); + PyErr_Format(PyExc_TypeError, + "argument '%s', index %d must be float complex", + value->name, (int) i); + return 0; + } + } + Py_DECREF(seq); + + value->obj = nullptr; // Do not save list object. + value->dataobj = PyCapsule_New(in, nullptr, FREE_py_capsule_dtor); + value->data = static_cast(in); + value->size = size; + return 1; +} +##### end get_from_object_float_complex_list source + +##### start get_from_object_float_complex_numpy source + +// helper get_from_object_float_complex_numpy +// Convert PyObject to float complex pointer. +static int SHROUD_get_from_object_float_complex_numpy(PyObject *obj, + LIB_SHROUD_converter_value *value) +{ + PyObject *array = PyArray_FROM_OTF(obj, NPY_DOUBLE, + NPY_ARRAY_IN_ARRAY); + if (array == nullptr) { + PyErr_SetString(PyExc_ValueError, + "must be a 1-D array of float complex"); + return 0; + } + value->obj = array; + value->dataobj = nullptr; + value->data = PyArray_DATA(reinterpret_cast + (array)); + value->size = PyArray_SIZE(reinterpret_cast + (array)); + return 1; +} +##### end get_from_object_float_complex_numpy source + ##### start get_from_object_float_list source // helper get_from_object_float_list @@ -3822,6 +4005,21 @@ static PyObject *SHROUD_to_PyList_float(const float *in, size_t size) } ##### end to_PyList_float source +##### start to_PyList_float_complex source + +// helper to_PyList_float_complex +// Convert float complex pointer to PyList of PyObjects. +static PyObject *SHROUD_to_PyList_float_complex + (const float complex *in, size_t size) +{ + PyObject *out = PyList_New(size); + for (size_t i = 0; i < size; ++i) { + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } + return out; +} +##### end to_PyList_float_complex source + ##### start to_PyList_int source // helper to_PyList_int @@ -4086,6 +4284,21 @@ static PyObject *SHROUD_to_PyList_vector_float(std::vector & in) } ##### end to_PyList_vector_float source +##### start to_PyList_vector_float_complex source + +// helper to_PyList_vector_float_complex +static PyObject *SHROUD_to_PyList_vector_float_complex + (std::vector & in) +{ + size_t size = in.size(); + PyObject *out = PyList_New(size); + for (size_t i = 0; i < size; ++i) { + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } + return out; +} +##### end to_PyList_vector_float_complex source + ##### start to_PyList_vector_int source // helper to_PyList_vector_int @@ -4386,6 +4599,22 @@ static void SHROUD_update_PyList_float } ##### end update_PyList_float source +##### start update_PyList_float_complex source + +// helper update_PyList_float_complex +// Replace members of existing list with new values. +// out is known to be a PyList of the correct length. +static void SHROUD_update_PyList_float_complex + (PyObject *out, float complex *in, size_t size) +{ + for (size_t i = 0; i < size; ++i) { + PyObject *item = PyList_GET_ITEM(out, i); + Py_DECREF(item); + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } +} +##### end update_PyList_float_complex source + ##### start update_PyList_int source // helper update_PyList_int @@ -4674,6 +4903,22 @@ static void SHROUD_update_PyList_vector_float } ##### end update_PyList_vector_float source +##### start update_PyList_vector_float_complex source + +// helper update_PyList_vector_float_complex +// Replace members of existing list with new values. +// out is known to be a PyList of the correct length. +static void SHROUD_update_PyList_vector_float_complex + (PyObject *out, float complex *in, size_t size) +{ + for (size_t i = 0; i < size; ++i) { + PyObject *item = PyList_GET_ITEM(out, i); + Py_DECREF(item); + PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + } +} +##### end update_PyList_vector_float_complex source + ##### start update_PyList_vector_int source // helper update_PyList_vector_int diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index d7e6a86d4..8184e167e 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -153,6 +153,22 @@ end subroutine LIB_SHROUD_copy_array_float end interface ##### end copy_array_float interface +##### start copy_array_float_complex interface + +interface + ! helper copy_array_float_complex + ! Copy contents of context into c_var. + subroutine LIB_SHROUD_copy_array_float_complex(context, c_var, c_var_size) & + bind(C, name="LIB_ShroudCopyArray") + use iso_c_binding, only : C_FLOAT_COMPLEX, C_SIZE_T + import LIB_SHROUD_array + type(LIB_SHROUD_array), intent(IN) :: context + complex(C_FLOAT_COMPLEX), intent(OUT) :: c_var(*) + integer(C_SIZE_T), value :: c_var_size + end subroutine LIB_SHROUD_copy_array_float_complex +end interface +##### end copy_array_float_complex interface + ##### start copy_array_int interface interface diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index 17dc05fb0..e9dc694ce 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -353,6 +353,28 @@ "sgroup": "native", "sh_type": "SH_TYPE_FLOAT" }, + "float_complex": { + "LUA_pop": "lua_tonumber({LUA_state_var}, {LUA_index})", + "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", + "LUA_type": "LUA_TNUMBER", + "PYN_typenum": "NPY_DOUBLE", + "PY_ctor": "PyFloat_FromDouble({ctor_expr})", + "PY_format": "d", + "PY_get": "PyFloat_AsDouble({py_var})", + "c_type": "float complex", + "cxx_type": "float complex", + "f_cast": "cmplx({f_var}, C_FLOAT_COMPLEX)", + "f_kind": "C_FLOAT_COMPLEX", + "f_module": { + "iso_c_binding": [ + "C_FLOAT_COMPLEX" + ] + }, + "f_type": "complex(C_FLOAT_COMPLEX)", + "flat_name": "float_complex", + "sgroup": "native", + "sh_type": "SH_TYPE_FLOAT_COMPLEX" + }, "int": { "LUA_pop": "lua_tointeger({LUA_state_var}, {LUA_index})", "LUA_push": "lua_pushinteger({LUA_state_var}, {c_var})", From a73a153170a658d3cfc61fcfc574f34b0aeb4b9b Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Fri, 31 Jul 2020 13:31:29 -0700 Subject: [PATCH 17/36] Allow flat_name to be set explicitly Before was based on cxx_type. For complex, set to 'double complex' while cxx_type is 'complex'. Add headers for complex types. --- regression/reference/clibrary/clibrary.json | 4 ++-- regression/reference/none/def_types.yaml | 12 ++++++++++-- regression/reference/none/none.json | 16 ++++++++++++++-- shroud/typemap.py | 15 ++++++++++++--- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index 8f79d6e0f..7f166007c 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -5124,7 +5124,7 @@ "cxx_addr": "", "cxx_member": "->", "cxx_nonconst_ptr": "arg1", - "cxx_type": "float complex", + "cxx_type": "std::complex", "cxx_var": "arg1", "idtor": "0", "sh_type": "SH_TYPE_FLOAT_COMPLEX", @@ -5213,7 +5213,7 @@ "cxx_addr": "", "cxx_member": "->", "cxx_nonconst_ptr": "arg1", - "cxx_type": "double complex", + "cxx_type": "std::complex", "cxx_var": "arg1", "idtor": "0", "sh_type": "SH_TYPE_DOUBLE_COMPLEX", diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index abb8055ed..2a9334ca3 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -107,8 +107,12 @@ typemap: flat_name: double_complex base: unknown idtor: 0 - cxx_type: double complex + cxx_type: std::complex + cxx_header: + - c_type: double complex + c_header: + - f_type: complex(C_DOUBLE_COMPLEX) f_kind: C_DOUBLE_COMPLEX f_module: @@ -151,8 +155,12 @@ typemap: flat_name: float_complex base: unknown idtor: 0 - cxx_type: float complex + cxx_type: std::complex + cxx_header: + - c_type: float complex + c_header: + - f_type: complex(C_FLOAT_COMPLEX) f_kind: C_FLOAT_COMPLEX f_module: diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index e9dc694ce..f645986f1 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -317,8 +317,14 @@ "PY_ctor": "PyFloat_FromDouble({ctor_expr})", "PY_format": "d", "PY_get": "PyFloat_AsDouble({py_var})", + "c_header": [ + "" + ], "c_type": "double complex", - "cxx_type": "double complex", + "cxx_header": [ + "" + ], + "cxx_type": "std::complex", "f_cast": "cmplx({f_var}, C_DOUBLE_COMPLEX)", "f_kind": "C_DOUBLE_COMPLEX", "f_module": { @@ -361,8 +367,14 @@ "PY_ctor": "PyFloat_FromDouble({ctor_expr})", "PY_format": "d", "PY_get": "PyFloat_AsDouble({py_var})", + "c_header": [ + "" + ], "c_type": "float complex", - "cxx_type": "float complex", + "cxx_header": [ + "" + ], + "cxx_type": "std::complex", "f_cast": "cmplx({f_var}, C_FLOAT_COMPLEX)", "f_kind": "C_FLOAT_COMPLEX", "f_module": { diff --git a/shroud/typemap.py b/shroud/typemap.py index c021b2d7a..25867056a 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -177,8 +177,11 @@ def compute_flat_name(self): such as after clone_as. cxx_type will not be set for template arguments. + Only set if None. Complex is set explicitly since + C and C++ have totally different names (double complex vs complex) """ - self.flat_name = flatten_name(self.cxx_type) + if self.flat_name is None: + self.flat_name = flatten_name(self.cxx_type) def _to_dict(self): """Convert instance to a dictionary for json. @@ -647,7 +650,10 @@ def initialize(): float_complex=Typemap( # _Complex "float_complex", c_type="float complex", - cxx_type="float complex", # Used to compute flat_name, but not C++. + cxx_type="std::complex", + flat_name="float_complex", + c_header="", + cxx_header="", f_cast="cmplx({f_var}, C_FLOAT_COMPLEX)", f_type="complex(C_FLOAT_COMPLEX)", f_kind="C_FLOAT_COMPLEX", @@ -665,7 +671,10 @@ def initialize(): double_complex=Typemap( # _Complex "double_complex", c_type="double complex", - cxx_type="double complex", # Used to compute flat_name, but not C++. + cxx_type="std::complex", + flat_name="double_complex", + c_header="", + cxx_header="", f_cast="cmplx({f_var}, C_DOUBLE_COMPLEX)", f_type="complex(C_DOUBLE_COMPLEX)", f_kind="C_DOUBLE_COMPLEX", From b52c6d6dd29e45ab5429b8afe2dba7c58bf546ab Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Fri, 31 Jul 2020 23:13:20 -0700 Subject: [PATCH 18/36] Create intermediate variable after py_ctor in helpers Allows calls to PyErr_Occurred before the value is used. Also makes it easier to implement complex which requires an intermediate variable of type Py_complex. --- regression/reference/none/helpers.c | 315 +++++++++++------- .../pointers-list-c/pypointersmodule.c | 6 +- .../pointers-list-cxx/pypointersmodule.cpp | 6 +- .../reference/strings/pystringsmodule.cpp | 3 +- .../reference/struct-class-c/pystructutil.c | 10 +- .../struct-class-cxx/pystructutil.cpp | 10 +- .../reference/structlist/pystructutil.c | 7 +- .../vectors-list/pyvectorsmodule.cpp | 3 +- shroud/whelpers.py | 20 +- 9 files changed, 226 insertions(+), 154 deletions(-) diff --git a/regression/reference/none/helpers.c b/regression/reference/none/helpers.c index 3326ec416..45d1e4c4f 100644 --- a/regression/reference/none/helpers.c +++ b/regression/reference/none/helpers.c @@ -360,7 +360,7 @@ static int SHROUD_create_from_PyObject_vector_double(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyFloat_AsDouble(item)); + double cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -368,6 +368,7 @@ static int SHROUD_create_from_PyObject_vector_double(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -391,7 +392,7 @@ static int SHROUD_create_from_PyObject_vector_double_complex Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyFloat_AsDouble(item)); + double complex cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -399,6 +400,7 @@ static int SHROUD_create_from_PyObject_vector_double_complex (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -422,13 +424,14 @@ static int SHROUD_create_from_PyObject_vector_float(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyFloat_AsDouble(item)); + float cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, "argument '%s', index %d must be float", name, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -452,7 +455,7 @@ static int SHROUD_create_from_PyObject_vector_float_complex Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyFloat_AsDouble(item)); + float complex cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -460,6 +463,7 @@ static int SHROUD_create_from_PyObject_vector_float_complex (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -483,13 +487,14 @@ static int SHROUD_create_from_PyObject_vector_int(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, "argument '%s', index %d must be int", name, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -513,7 +518,7 @@ static int SHROUD_create_from_PyObject_vector_int16_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + int16_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -521,6 +526,7 @@ static int SHROUD_create_from_PyObject_vector_int16_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -544,7 +550,7 @@ static int SHROUD_create_from_PyObject_vector_int32_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + int32_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -552,6 +558,7 @@ static int SHROUD_create_from_PyObject_vector_int32_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -575,7 +582,7 @@ static int SHROUD_create_from_PyObject_vector_int64_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + int64_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -583,6 +590,7 @@ static int SHROUD_create_from_PyObject_vector_int64_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -606,7 +614,7 @@ static int SHROUD_create_from_PyObject_vector_int8_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + int8_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -614,6 +622,7 @@ static int SHROUD_create_from_PyObject_vector_int8_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -637,13 +646,14 @@ static int SHROUD_create_from_PyObject_vector_long(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + long cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, "argument '%s', index %d must be long", name, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -667,7 +677,7 @@ static int SHROUD_create_from_PyObject_vector_long_long(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(XXXPy_get); + long long cvalue = XXXPy_get; if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -675,6 +685,7 @@ static int SHROUD_create_from_PyObject_vector_long_long(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -698,13 +709,14 @@ static int SHROUD_create_from_PyObject_vector_short(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + short cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, "argument '%s', index %d must be short", name, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -728,7 +740,7 @@ static int SHROUD_create_from_PyObject_vector_size_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(XXXPy_get); + size_t cvalue = XXXPy_get; if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -736,6 +748,7 @@ static int SHROUD_create_from_PyObject_vector_size_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -759,7 +772,7 @@ static int SHROUD_create_from_PyObject_vector_uint16_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + uint16_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -767,6 +780,7 @@ static int SHROUD_create_from_PyObject_vector_uint16_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -790,7 +804,7 @@ static int SHROUD_create_from_PyObject_vector_uint32_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + uint32_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -798,6 +812,7 @@ static int SHROUD_create_from_PyObject_vector_uint32_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -821,7 +836,7 @@ static int SHROUD_create_from_PyObject_vector_uint64_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + uint64_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -829,6 +844,7 @@ static int SHROUD_create_from_PyObject_vector_uint64_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -852,7 +868,7 @@ static int SHROUD_create_from_PyObject_vector_uint8_t(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + uint8_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -860,6 +876,7 @@ static int SHROUD_create_from_PyObject_vector_uint8_t(PyObject *obj, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -883,7 +900,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_int Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + unsigned int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -891,6 +908,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_int (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -914,7 +932,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_long Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + unsigned long cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -922,6 +940,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_long (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -946,7 +965,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_long_long Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(XXXPy_get); + unsigned long long cvalue = XXXPy_get; if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -954,6 +973,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_long_long name, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -977,7 +997,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_short Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + unsigned short cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -985,6 +1005,7 @@ static int SHROUD_create_from_PyObject_vector_unsigned_short (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; @@ -1024,11 +1045,11 @@ static int SHROUD_fill_from_PyObject_char(PyObject *obj, static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, const char *name, double complex *in, Py_ssize_t insize) { - double complex value = PyFloat_AsDouble(obj); + double complex cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1047,7 +1068,7 @@ static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1055,6 +1076,7 @@ static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1070,11 +1092,11 @@ static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, static int SHROUD_fill_from_PyObject_double_complex_numpy(PyObject *obj, const char *name, double complex *in, Py_ssize_t insize) { - double complex value = PyFloat_AsDouble(obj); + double complex cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1113,11 +1135,11 @@ static int SHROUD_fill_from_PyObject_double_complex_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_double_list(PyObject *obj, const char *name, double *in, Py_ssize_t insize) { - double value = PyFloat_AsDouble(obj); + double cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1136,7 +1158,7 @@ static int SHROUD_fill_from_PyObject_double_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1144,6 +1166,7 @@ static int SHROUD_fill_from_PyObject_double_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1159,11 +1182,11 @@ static int SHROUD_fill_from_PyObject_double_list(PyObject *obj, static int SHROUD_fill_from_PyObject_double_numpy(PyObject *obj, const char *name, double *in, Py_ssize_t insize) { - double value = PyFloat_AsDouble(obj); + double cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1200,11 +1223,11 @@ static int SHROUD_fill_from_PyObject_double_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, const char *name, float complex *in, Py_ssize_t insize) { - float complex value = PyFloat_AsDouble(obj); + float complex cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1223,7 +1246,7 @@ static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1231,6 +1254,7 @@ static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1246,11 +1270,11 @@ static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, static int SHROUD_fill_from_PyObject_float_complex_numpy(PyObject *obj, const char *name, float complex *in, Py_ssize_t insize) { - float complex value = PyFloat_AsDouble(obj); + float complex cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1288,11 +1312,11 @@ static int SHROUD_fill_from_PyObject_float_complex_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_float_list(PyObject *obj, const char *name, float *in, Py_ssize_t insize) { - float value = PyFloat_AsDouble(obj); + float cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1311,13 +1335,14 @@ static int SHROUD_fill_from_PyObject_float_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, "argument '%s', index %d must be float", name, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1333,11 +1358,11 @@ static int SHROUD_fill_from_PyObject_float_list(PyObject *obj, static int SHROUD_fill_from_PyObject_float_numpy(PyObject *obj, const char *name, float *in, Py_ssize_t insize) { - float value = PyFloat_AsDouble(obj); + float cvalue = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1374,11 +1399,11 @@ static int SHROUD_fill_from_PyObject_float_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_int16_t_list(PyObject *obj, const char *name, int16_t *in, Py_ssize_t insize) { - int16_t value = PyInt_AsLong(obj); + int16_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1397,7 +1422,7 @@ static int SHROUD_fill_from_PyObject_int16_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1405,6 +1430,7 @@ static int SHROUD_fill_from_PyObject_int16_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1420,11 +1446,11 @@ static int SHROUD_fill_from_PyObject_int16_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_int16_t_numpy(PyObject *obj, const char *name, int16_t *in, Py_ssize_t insize) { - int16_t value = PyInt_AsLong(obj); + int16_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1461,11 +1487,11 @@ static int SHROUD_fill_from_PyObject_int16_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_int32_t_list(PyObject *obj, const char *name, int32_t *in, Py_ssize_t insize) { - int32_t value = PyInt_AsLong(obj); + int32_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1484,7 +1510,7 @@ static int SHROUD_fill_from_PyObject_int32_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1492,6 +1518,7 @@ static int SHROUD_fill_from_PyObject_int32_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1507,11 +1534,11 @@ static int SHROUD_fill_from_PyObject_int32_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_int32_t_numpy(PyObject *obj, const char *name, int32_t *in, Py_ssize_t insize) { - int32_t value = PyInt_AsLong(obj); + int32_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1548,11 +1575,11 @@ static int SHROUD_fill_from_PyObject_int32_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_int64_t_list(PyObject *obj, const char *name, int64_t *in, Py_ssize_t insize) { - int64_t value = PyInt_AsLong(obj); + int64_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1571,7 +1598,7 @@ static int SHROUD_fill_from_PyObject_int64_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1579,6 +1606,7 @@ static int SHROUD_fill_from_PyObject_int64_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1594,11 +1622,11 @@ static int SHROUD_fill_from_PyObject_int64_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_int64_t_numpy(PyObject *obj, const char *name, int64_t *in, Py_ssize_t insize) { - int64_t value = PyInt_AsLong(obj); + int64_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1635,11 +1663,11 @@ static int SHROUD_fill_from_PyObject_int64_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_int8_t_list(PyObject *obj, const char *name, int8_t *in, Py_ssize_t insize) { - int8_t value = PyInt_AsLong(obj); + int8_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1658,7 +1686,7 @@ static int SHROUD_fill_from_PyObject_int8_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1666,6 +1694,7 @@ static int SHROUD_fill_from_PyObject_int8_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1681,11 +1710,11 @@ static int SHROUD_fill_from_PyObject_int8_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_int8_t_numpy(PyObject *obj, const char *name, int8_t *in, Py_ssize_t insize) { - int8_t value = PyInt_AsLong(obj); + int8_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1722,11 +1751,11 @@ static int SHROUD_fill_from_PyObject_int8_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_int_list(PyObject *obj, const char *name, int *in, Py_ssize_t insize) { - int value = PyInt_AsLong(obj); + int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1745,13 +1774,14 @@ static int SHROUD_fill_from_PyObject_int_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, "argument '%s', index %d must be int", name, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1767,11 +1797,11 @@ static int SHROUD_fill_from_PyObject_int_list(PyObject *obj, static int SHROUD_fill_from_PyObject_int_numpy(PyObject *obj, const char *name, int *in, Py_ssize_t insize) { - int value = PyInt_AsLong(obj); + int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1808,11 +1838,11 @@ static int SHROUD_fill_from_PyObject_int_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_long_list(PyObject *obj, const char *name, long *in, Py_ssize_t insize) { - long value = PyInt_AsLong(obj); + long cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1831,13 +1861,14 @@ static int SHROUD_fill_from_PyObject_long_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, "argument '%s', index %d must be long", name, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1853,11 +1884,11 @@ static int SHROUD_fill_from_PyObject_long_list(PyObject *obj, static int SHROUD_fill_from_PyObject_long_numpy(PyObject *obj, const char *name, long *in, Py_ssize_t insize) { - long value = PyInt_AsLong(obj); + long cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1894,11 +1925,11 @@ static int SHROUD_fill_from_PyObject_long_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_short_list(PyObject *obj, const char *name, short *in, Py_ssize_t insize) { - short value = PyInt_AsLong(obj); + short cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1917,13 +1948,14 @@ static int SHROUD_fill_from_PyObject_short_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, "argument '%s', index %d must be short", name, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -1939,11 +1971,11 @@ static int SHROUD_fill_from_PyObject_short_list(PyObject *obj, static int SHROUD_fill_from_PyObject_short_numpy(PyObject *obj, const char *name, short *in, Py_ssize_t insize) { - short value = PyInt_AsLong(obj); + short cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -1980,11 +2012,11 @@ static int SHROUD_fill_from_PyObject_short_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_uint16_t_list(PyObject *obj, const char *name, uint16_t *in, Py_ssize_t insize) { - uint16_t value = PyInt_AsLong(obj); + uint16_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2003,7 +2035,7 @@ static int SHROUD_fill_from_PyObject_uint16_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2011,6 +2043,7 @@ static int SHROUD_fill_from_PyObject_uint16_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2026,11 +2059,11 @@ static int SHROUD_fill_from_PyObject_uint16_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_uint16_t_numpy(PyObject *obj, const char *name, uint16_t *in, Py_ssize_t insize) { - uint16_t value = PyInt_AsLong(obj); + uint16_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2067,11 +2100,11 @@ static int SHROUD_fill_from_PyObject_uint16_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_uint32_t_list(PyObject *obj, const char *name, uint32_t *in, Py_ssize_t insize) { - uint32_t value = PyInt_AsLong(obj); + uint32_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2090,7 +2123,7 @@ static int SHROUD_fill_from_PyObject_uint32_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2098,6 +2131,7 @@ static int SHROUD_fill_from_PyObject_uint32_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2113,11 +2147,11 @@ static int SHROUD_fill_from_PyObject_uint32_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_uint32_t_numpy(PyObject *obj, const char *name, uint32_t *in, Py_ssize_t insize) { - uint32_t value = PyInt_AsLong(obj); + uint32_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2154,11 +2188,11 @@ static int SHROUD_fill_from_PyObject_uint32_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_uint64_t_list(PyObject *obj, const char *name, uint64_t *in, Py_ssize_t insize) { - uint64_t value = PyInt_AsLong(obj); + uint64_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2177,7 +2211,7 @@ static int SHROUD_fill_from_PyObject_uint64_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2185,6 +2219,7 @@ static int SHROUD_fill_from_PyObject_uint64_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2200,11 +2235,11 @@ static int SHROUD_fill_from_PyObject_uint64_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_uint64_t_numpy(PyObject *obj, const char *name, uint64_t *in, Py_ssize_t insize) { - uint64_t value = PyInt_AsLong(obj); + uint64_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2241,11 +2276,11 @@ static int SHROUD_fill_from_PyObject_uint64_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_uint8_t_list(PyObject *obj, const char *name, uint8_t *in, Py_ssize_t insize) { - uint8_t value = PyInt_AsLong(obj); + uint8_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2264,7 +2299,7 @@ static int SHROUD_fill_from_PyObject_uint8_t_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2272,6 +2307,7 @@ static int SHROUD_fill_from_PyObject_uint8_t_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2287,11 +2323,11 @@ static int SHROUD_fill_from_PyObject_uint8_t_list(PyObject *obj, static int SHROUD_fill_from_PyObject_uint8_t_numpy(PyObject *obj, const char *name, uint8_t *in, Py_ssize_t insize) { - uint8_t value = PyInt_AsLong(obj); + uint8_t cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2328,11 +2364,11 @@ static int SHROUD_fill_from_PyObject_uint8_t_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_unsigned_int_list(PyObject *obj, const char *name, unsigned int *in, Py_ssize_t insize) { - unsigned int value = PyInt_AsLong(obj); + unsigned int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2351,7 +2387,7 @@ static int SHROUD_fill_from_PyObject_unsigned_int_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2359,6 +2395,7 @@ static int SHROUD_fill_from_PyObject_unsigned_int_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2374,11 +2411,11 @@ static int SHROUD_fill_from_PyObject_unsigned_int_list(PyObject *obj, static int SHROUD_fill_from_PyObject_unsigned_int_numpy(PyObject *obj, const char *name, unsigned int *in, Py_ssize_t insize) { - unsigned int value = PyInt_AsLong(obj); + unsigned int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2416,11 +2453,11 @@ static int SHROUD_fill_from_PyObject_unsigned_int_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_unsigned_long_list(PyObject *obj, const char *name, unsigned long *in, Py_ssize_t insize) { - unsigned long value = PyInt_AsLong(obj); + unsigned long cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2439,7 +2476,7 @@ static int SHROUD_fill_from_PyObject_unsigned_long_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2447,6 +2484,7 @@ static int SHROUD_fill_from_PyObject_unsigned_long_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2462,11 +2500,11 @@ static int SHROUD_fill_from_PyObject_unsigned_long_list(PyObject *obj, static int SHROUD_fill_from_PyObject_unsigned_long_numpy(PyObject *obj, const char *name, unsigned long *in, Py_ssize_t insize) { - unsigned long value = PyInt_AsLong(obj); + unsigned long cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2504,11 +2542,11 @@ static int SHROUD_fill_from_PyObject_unsigned_long_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_unsigned_short_list(PyObject *obj, const char *name, unsigned short *in, Py_ssize_t insize) { - unsigned short value = PyInt_AsLong(obj); + unsigned short cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2527,7 +2565,7 @@ static int SHROUD_fill_from_PyObject_unsigned_short_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -2535,6 +2573,7 @@ static int SHROUD_fill_from_PyObject_unsigned_short_list(PyObject *obj, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; @@ -2550,11 +2589,11 @@ static int SHROUD_fill_from_PyObject_unsigned_short_list(PyObject *obj, static int SHROUD_fill_from_PyObject_unsigned_short_numpy(PyObject *obj, const char *name, unsigned short *in, Py_ssize_t insize) { - unsigned short value = PyInt_AsLong(obj); + unsigned short cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -2736,7 +2775,7 @@ static int SHROUD_get_from_object_double_complex_list(PyObject *obj, (std::malloc(size * sizeof(double complex))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + double complex cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -2745,6 +2784,7 @@ static int SHROUD_get_from_object_double_complex_list(PyObject *obj, value->name, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -2800,7 +2840,7 @@ static int SHROUD_get_from_object_double_list(PyObject *obj, (std::malloc(size * sizeof(double))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + double cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -2809,6 +2849,7 @@ static int SHROUD_get_from_object_double_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -2864,7 +2905,7 @@ static int SHROUD_get_from_object_float_complex_list(PyObject *obj, (std::malloc(size * sizeof(float complex))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + float complex cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -2873,6 +2914,7 @@ static int SHROUD_get_from_object_float_complex_list(PyObject *obj, value->name, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -2927,7 +2969,7 @@ static int SHROUD_get_from_object_float_list(PyObject *obj, float *in = static_cast(std::malloc(size * sizeof(float))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + float cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -2936,6 +2978,7 @@ static int SHROUD_get_from_object_float_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -2991,7 +3034,7 @@ static int SHROUD_get_from_object_int16_t_list(PyObject *obj, (std::malloc(size * sizeof(int16_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int16_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3000,6 +3043,7 @@ static int SHROUD_get_from_object_int16_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3055,7 +3099,7 @@ static int SHROUD_get_from_object_int32_t_list(PyObject *obj, (std::malloc(size * sizeof(int32_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int32_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3064,6 +3108,7 @@ static int SHROUD_get_from_object_int32_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3119,7 +3164,7 @@ static int SHROUD_get_from_object_int64_t_list(PyObject *obj, (std::malloc(size * sizeof(int64_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int64_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3128,6 +3173,7 @@ static int SHROUD_get_from_object_int64_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3183,7 +3229,7 @@ static int SHROUD_get_from_object_int8_t_list(PyObject *obj, (std::malloc(size * sizeof(int8_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int8_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3192,6 +3238,7 @@ static int SHROUD_get_from_object_int8_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3246,7 +3293,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, int *in = static_cast(std::malloc(size * sizeof(int))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3255,6 +3302,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3308,7 +3356,7 @@ static int SHROUD_get_from_object_long_list(PyObject *obj, long *in = static_cast(std::malloc(size * sizeof(long))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + long cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3317,6 +3365,7 @@ static int SHROUD_get_from_object_long_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3395,7 +3444,7 @@ static int SHROUD_get_from_object_short_list(PyObject *obj, short *in = static_cast(std::malloc(size * sizeof(short))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + short cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3404,6 +3453,7 @@ static int SHROUD_get_from_object_short_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3482,7 +3532,7 @@ static int SHROUD_get_from_object_uint16_t_list(PyObject *obj, (std::malloc(size * sizeof(uint16_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + uint16_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3491,6 +3541,7 @@ static int SHROUD_get_from_object_uint16_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3546,7 +3597,7 @@ static int SHROUD_get_from_object_uint32_t_list(PyObject *obj, (std::malloc(size * sizeof(uint32_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + uint32_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3555,6 +3606,7 @@ static int SHROUD_get_from_object_uint32_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3610,7 +3662,7 @@ static int SHROUD_get_from_object_uint64_t_list(PyObject *obj, (std::malloc(size * sizeof(uint64_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + uint64_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3619,6 +3671,7 @@ static int SHROUD_get_from_object_uint64_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3674,7 +3727,7 @@ static int SHROUD_get_from_object_uint8_t_list(PyObject *obj, (std::malloc(size * sizeof(uint8_t))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + uint8_t cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3683,6 +3736,7 @@ static int SHROUD_get_from_object_uint8_t_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3738,7 +3792,7 @@ static int SHROUD_get_from_object_unsigned_int_list(PyObject *obj, (std::malloc(size * sizeof(unsigned int))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + unsigned int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3747,6 +3801,7 @@ static int SHROUD_get_from_object_unsigned_int_list(PyObject *obj, value->name, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3802,7 +3857,7 @@ static int SHROUD_get_from_object_unsigned_long_list(PyObject *obj, (std::malloc(size * sizeof(unsigned long))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + unsigned long cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3811,6 +3866,7 @@ static int SHROUD_get_from_object_unsigned_long_list(PyObject *obj, value->name, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -3890,7 +3946,7 @@ static int SHROUD_get_from_object_unsigned_short_list(PyObject *obj, (std::malloc(size * sizeof(unsigned short))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + unsigned short cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -3899,6 +3955,7 @@ static int SHROUD_get_from_object_unsigned_short_list(PyObject *obj, value->name, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); diff --git a/regression/reference/pointers-list-c/pypointersmodule.c b/regression/reference/pointers-list-c/pypointersmodule.c index d8c0b0ea7..a0ccbd4b5 100644 --- a/regression/reference/pointers-list-c/pypointersmodule.c +++ b/regression/reference/pointers-list-c/pypointersmodule.c @@ -178,7 +178,7 @@ static int SHROUD_get_from_object_double_list(PyObject *obj, double *in = (double *) malloc(size * sizeof(double)); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + double cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { free(in); Py_DECREF(seq); @@ -187,6 +187,7 @@ static int SHROUD_get_from_object_double_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -214,7 +215,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, int *in = (int *) malloc(size * sizeof(int)); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { free(in); Py_DECREF(seq); @@ -223,6 +224,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); diff --git a/regression/reference/pointers-list-cxx/pypointersmodule.cpp b/regression/reference/pointers-list-cxx/pypointersmodule.cpp index 6aa5151da..0173d3070 100644 --- a/regression/reference/pointers-list-cxx/pypointersmodule.cpp +++ b/regression/reference/pointers-list-cxx/pypointersmodule.cpp @@ -181,7 +181,7 @@ static int SHROUD_get_from_object_double_list(PyObject *obj, (std::malloc(size * sizeof(double))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + double cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -190,6 +190,7 @@ static int SHROUD_get_from_object_double_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -217,7 +218,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, int *in = static_cast(std::malloc(size * sizeof(int))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -226,6 +227,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); diff --git a/regression/reference/strings/pystringsmodule.cpp b/regression/reference/strings/pystringsmodule.cpp index 1eed91570..e46d321de 100644 --- a/regression/reference/strings/pystringsmodule.cpp +++ b/regression/reference/strings/pystringsmodule.cpp @@ -54,7 +54,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, int *in = static_cast(std::malloc(size * sizeof(int))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -63,6 +63,7 @@ static int SHROUD_get_from_object_int_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); diff --git a/regression/reference/struct-class-c/pystructutil.c b/regression/reference/struct-class-c/pystructutil.c index 053fc61d1..fae3ea581 100644 --- a/regression/reference/struct-class-c/pystructutil.c +++ b/regression/reference/struct-class-c/pystructutil.c @@ -116,11 +116,11 @@ int STR_SHROUD_fill_from_PyObject_char(PyObject *obj, const char *name, int STR_SHROUD_fill_from_PyObject_int_numpy(PyObject *obj, const char *name, int *in, Py_ssize_t insize) { - int value = PyInt_AsLong(obj); + int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -239,7 +239,7 @@ int STR_SHROUD_get_from_object_double_list(PyObject *obj, double *in = (double *) malloc(size * sizeof(double)); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + double cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { free(in); Py_DECREF(seq); @@ -248,6 +248,7 @@ int STR_SHROUD_get_from_object_double_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -294,7 +295,7 @@ int STR_SHROUD_get_from_object_int_list(PyObject *obj, int *in = (int *) malloc(size * sizeof(int)); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { free(in); Py_DECREF(seq); @@ -303,6 +304,7 @@ int STR_SHROUD_get_from_object_int_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); diff --git a/regression/reference/struct-class-cxx/pystructutil.cpp b/regression/reference/struct-class-cxx/pystructutil.cpp index 79a73065d..eceda22fa 100644 --- a/regression/reference/struct-class-cxx/pystructutil.cpp +++ b/regression/reference/struct-class-cxx/pystructutil.cpp @@ -116,11 +116,11 @@ int STR_SHROUD_fill_from_PyObject_char(PyObject *obj, const char *name, int STR_SHROUD_fill_from_PyObject_int_numpy(PyObject *obj, const char *name, int *in, Py_ssize_t insize) { - int value = PyInt_AsLong(obj); + int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -242,7 +242,7 @@ int STR_SHROUD_get_from_object_double_list(PyObject *obj, (std::malloc(size * sizeof(double))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyFloat_AsDouble(item); + double cvalue = PyFloat_AsDouble(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -251,6 +251,7 @@ int STR_SHROUD_get_from_object_double_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); @@ -299,7 +300,7 @@ int STR_SHROUD_get_from_object_int_list(PyObject *obj, int *in = static_cast(std::malloc(size * sizeof(int))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -308,6 +309,7 @@ int STR_SHROUD_get_from_object_int_list(PyObject *obj, (int) i); return 0; } + in[i] = cvalue; } Py_DECREF(seq); diff --git a/regression/reference/structlist/pystructutil.c b/regression/reference/structlist/pystructutil.c index 96990ad8b..f9ec4aacd 100644 --- a/regression/reference/structlist/pystructutil.c +++ b/regression/reference/structlist/pystructutil.c @@ -111,11 +111,11 @@ int STR_SHROUD_fill_from_PyObject_char(PyObject *obj, const char *name, int STR_SHROUD_fill_from_PyObject_int_list(PyObject *obj, const char *name, int *in, Py_ssize_t insize) { - int value = PyInt_AsLong(obj); + int cvalue = PyInt_AsLong(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = value; + in[i] = cvalue; } return 0; } @@ -134,13 +134,14 @@ int STR_SHROUD_fill_from_PyObject_int_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in[i] = PyInt_AsLong(item); + cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, "argument '%s', index %d must be int", name, (int) i); return -1; } + in[i] = cvalue; } Py_DECREF(seq); return 0; diff --git a/regression/reference/vectors-list/pyvectorsmodule.cpp b/regression/reference/vectors-list/pyvectorsmodule.cpp index 43423fad4..5828a6c29 100644 --- a/regression/reference/vectors-list/pyvectorsmodule.cpp +++ b/regression/reference/vectors-list/pyvectorsmodule.cpp @@ -40,13 +40,14 @@ static int SHROUD_create_from_PyObject_vector_int(PyObject *obj, Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - in.push_back(PyInt_AsLong(item)); + int cvalue = PyInt_AsLong(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, "argument '%s', index %d must be int", name, (int) i); return -1; } + in.push_back(cvalue); } Py_DECREF(seq); return 0; diff --git a/shroud/whelpers.py b/shroud/whelpers.py index 3138f0f8e..34aa24806 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -823,7 +823,8 @@ def fill_from_PyObject_list(fmt): fmt.hnamefunc = wformat( "{PY_helper_prefix}fill_from_PyObject_{flat_name}_list", fmt) fmt.hnameproto = wformat( - "int {hnamefunc}\t(PyObject *obj,\t const char *name,\t {c_type} *in,\t Py_ssize_t insize)", fmt) + "int {hnamefunc}\t(PyObject *obj,\t const char *name,\t " + "{c_type} *in,\t Py_ssize_t insize)", fmt) helper = dict( name=fmt.hnamefunc, proto=fmt.hnameproto + ";", @@ -835,11 +836,11 @@ def fill_from_PyObject_list(fmt): // Return 0 on success, -1 on error. {PY_helper_static}{hnameproto} {{+ -{c_type} value = {Py_get_obj}; +{c_type} cvalue = {Py_get_obj}; if (!PyErr_Occurred()) {{+ // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) {{+ -in[i] = value; +in[i] = cvalue; -}} return 0; -}} @@ -857,12 +858,13 @@ def fill_from_PyObject_list(fmt): -}} for (Py_ssize_t i = 0; i < size; ++i) {{+ PyObject *item = PySequence_Fast_GET_ITEM(seq, i); -in[i] = {Py_get}; +cvalue = {Py_get}; if (PyErr_Occurred()) {{+ Py_DECREF(seq); PyErr_Format(PyExc_TypeError,\t "argument '%s', index %d must be {fcn_type}",\t name,\t (int) i); return -1; -}} +in[i] = cvalue; -}} Py_DECREF(seq); return 0; @@ -893,11 +895,11 @@ def fill_from_PyObject_numpy(fmt): // Return 0 on success, -1 on error. {PY_helper_static}{hnameproto} {{+ -{c_type} value = {Py_get_obj}; +{c_type} cvalue = {Py_get_obj}; if (!PyErr_Occurred()) {{+ // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) {{+ -in[i] = value; +in[i] = cvalue; -}} return 0; -}} @@ -985,13 +987,14 @@ def create_get_from_object_list(fmt): {c_type} *in = {cast_static}{c_type} *{cast1}{stdlib}malloc(size * sizeof({c_type})){cast2}; for (Py_ssize_t i = 0; i < size; i++) {{+ PyObject *item = PySequence_Fast_GET_ITEM(seq, i); -in[i] = {Py_get}; +{c_type} cvalue = {Py_get}; if (PyErr_Occurred()) {{+ {stdlib}free(in); Py_DECREF(seq); PyErr_Format(PyExc_TypeError,\t "argument '%s', index %d must be {fcn_type}",\t value->name,\t (int) i); return 0; -}} +in[i] = cvalue; -}} Py_DECREF(seq); @@ -1198,12 +1201,13 @@ def add_to_PyList_helper_vector(fmt, ntypemap): Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) {{+ PyObject *item = PySequence_Fast_GET_ITEM(seq, i); -in.push_back({Py_get}); +{c_type} cvalue = {Py_get}; if (PyErr_Occurred()) {{+ Py_DECREF(seq); PyErr_Format(PyExc_ValueError,\t "argument '%s', index %d must be {c_type}",\t name,\t (int) i); return -1; -}} +in.push_back(cvalue); -}} Py_DECREF(seq); return 0; From b27531f9aeb05afe007f1fede818158bec036d22 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Sat, 1 Aug 2020 18:08:29 -0700 Subject: [PATCH 19/36] Add files to Typedef to support complex Python API uses an intermediate type, Py_complex, to store a complex number that is extracted from a complex type. Added py_type, pytype_to_pyctor, and pytype_to_cxx. --- docs/python.rst | 34 +++++++++++ docs/typemaps.rst | 5 ++ regression/reference/none/def_types.yaml | 18 ++++-- regression/reference/none/helpers.c | 74 ++++++++++++++---------- regression/reference/none/none.json | 18 ++++-- shroud/typemap.py | 25 ++++++-- shroud/whelpers.py | 59 ++++++++++++++----- 7 files changed, 167 insertions(+), 66 deletions(-) diff --git a/docs/python.rst b/docs/python.rst index 223dc8fe6..8a3713b8c 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -111,6 +111,40 @@ PY_from_object PyArg_Parse - ``status = converter(object, address)``. Defaults to *None*. +py_type +^^^^^^^ + +The type returned by *PY_get* function. +Defaults to ``None`` which implies it is the same as the typemap. +i.e. ``PyInt_AsLong`` returns a ``long``. + +Defined for complex types because ``PyComplex_AsCComplex`` returns +type ``Py_complex``. +See also *pytype_to_pyctor* and *pytype_to_cxx*. + +pytype_to_pyctor +^^^^^^^^^^^^^^^^ + +Expression to use with *PY_ctor*. +Defaults to ``None`` which indicates no additional processing of the argument +is required. +Only needs to be defined when *py_type* is defined. + +With complex types, it is used to extract the real and imaginary parts from +``Py_complex`` (defined with *py_type*) +with ``creal({ctor_expr}), cimag({ctor_expr})``. +*ctor_expr* is the expression used with *Py_ctor*. + +pytype_to_cxx +^^^^^^^^^^^^^ + +Expression to convert *py_type* into a C++ value. +Only needs to be defined when *py_type* is defined. + +Used with complex to convert ``Py_complex`` (defined with *py_type*) +to C using ``{work_var}.real + {work_var}.imag * I`` +or C++ with ``std::complex(\tcvalue.real, cvalue.imag)``. + PYN_descr ^^^^^^^^^ diff --git a/docs/typemaps.rst b/docs/typemaps.rst index 6025ea9a4..20dc9f8d4 100644 --- a/docs/typemaps.rst +++ b/docs/typemaps.rst @@ -66,6 +66,11 @@ And template arguments are converted to underscores with the trailing ``>`` being replaced i.e. ``std::vector`` becomes ``std_vector_int``. +Complex types set this explicitly since C and C++ have much different +type names. The *flat_name* is always ``double_complex`` while +*c_type* is ``double complex`` and *cxx_type* is ``complex``. + + One use of this name is as the **function_suffix** for templated functions. idtor diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index 2a9334ca3..cbee30612 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -119,9 +119,12 @@ typemap: iso_c_binding: - C_DOUBLE_COMPLEX f_cast: cmplx({f_var}, C_DOUBLE_COMPLEX) - PY_format: d - PY_ctor: PyFloat_FromDouble({ctor_expr}) - PY_get: PyFloat_AsDouble({py_var}) + PY_format: D + PY_ctor: PyComplex_FromDoubles({ctor_expr}) + PY_get: PyComplex_AsCComplex({py_var}) + py_type: Py_complex + pytype_to_pyctor: creal({ctor_expr}), cimag({ctor_expr}) + pytype_to_cxx: "{work_var}.real + {work_var}.imag * I" PYN_typenum: NPY_DOUBLE LUA_type: LUA_TNUMBER LUA_pop: lua_tonumber({LUA_state_var}, {LUA_index}) @@ -167,9 +170,12 @@ typemap: iso_c_binding: - C_FLOAT_COMPLEX f_cast: cmplx({f_var}, C_FLOAT_COMPLEX) - PY_format: d - PY_ctor: PyFloat_FromDouble({ctor_expr}) - PY_get: PyFloat_AsDouble({py_var}) + PY_format: D + PY_ctor: PyComplex_FromDoubles({ctor_expr}) + PY_get: PyComplex_AsCComplex({py_var}) + py_type: Py_complex + pytype_to_pyctor: creal({ctor_expr}), cimag({ctor_expr}) + pytype_to_cxx: "{work_var}.real + {work_var}.imag * I" PYN_typenum: NPY_DOUBLE LUA_type: LUA_TNUMBER LUA_pop: lua_tonumber({LUA_state_var}, {LUA_index}) diff --git a/regression/reference/none/helpers.c b/regression/reference/none/helpers.c index 45d1e4c4f..630e84e52 100644 --- a/regression/reference/none/helpers.c +++ b/regression/reference/none/helpers.c @@ -378,10 +378,11 @@ static int SHROUD_create_from_PyObject_vector_double(PyObject *obj, ##### start create_from_PyObject_vector_double_complex cxx_source // helper create_from_PyObject_vector_double_complex -// Convert obj into an array of type double complex +// Convert obj into an array of type std::complex // Return -1 on error. static int SHROUD_create_from_PyObject_vector_double_complex - (PyObject *obj, const char *name, std::vector & in) + (PyObject *obj, const char *name, + std::vector> & in) { PyObject *seq = PySequence_Fast(obj, "holder"); if (seq == NULL) { @@ -392,7 +393,7 @@ static int SHROUD_create_from_PyObject_vector_double_complex Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - double complex cvalue = PyFloat_AsDouble(item); + Py_complex cvalue = PyComplex_AsCComplex(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -400,7 +401,7 @@ static int SHROUD_create_from_PyObject_vector_double_complex (int) i); return -1; } - in.push_back(cvalue); + in.push_back(cvalue.real + cvalue.imag * I); } Py_DECREF(seq); return 0; @@ -441,10 +442,11 @@ static int SHROUD_create_from_PyObject_vector_float(PyObject *obj, ##### start create_from_PyObject_vector_float_complex cxx_source // helper create_from_PyObject_vector_float_complex -// Convert obj into an array of type float complex +// Convert obj into an array of type std::complex // Return -1 on error. static int SHROUD_create_from_PyObject_vector_float_complex - (PyObject *obj, const char *name, std::vector & in) + (PyObject *obj, const char *name, + std::vector> & in) { PyObject *seq = PySequence_Fast(obj, "holder"); if (seq == NULL) { @@ -455,7 +457,7 @@ static int SHROUD_create_from_PyObject_vector_float_complex Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - float complex cvalue = PyFloat_AsDouble(item); + Py_complex cvalue = PyComplex_AsCComplex(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_ValueError, @@ -463,7 +465,7 @@ static int SHROUD_create_from_PyObject_vector_float_complex (int) i); return -1; } - in.push_back(cvalue); + in.push_back(cvalue.real + cvalue.imag * I); } Py_DECREF(seq); return 0; @@ -1045,11 +1047,11 @@ static int SHROUD_fill_from_PyObject_char(PyObject *obj, static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, const char *name, double complex *in, Py_ssize_t insize) { - double complex cvalue = PyFloat_AsDouble(obj); + Py_complex cvalue = PyComplex_AsCComplex(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } return 0; } @@ -1068,7 +1070,7 @@ static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - cvalue = PyFloat_AsDouble(item); + cvalue = PyComplex_AsCComplex(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1076,7 +1078,7 @@ static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, (int) i); return -1; } - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } Py_DECREF(seq); return 0; @@ -1092,11 +1094,11 @@ static int SHROUD_fill_from_PyObject_double_complex_list(PyObject *obj, static int SHROUD_fill_from_PyObject_double_complex_numpy(PyObject *obj, const char *name, double complex *in, Py_ssize_t insize) { - double complex cvalue = PyFloat_AsDouble(obj); + Py_complex cvalue = PyComplex_AsCComplex(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } return 0; } @@ -1223,11 +1225,11 @@ static int SHROUD_fill_from_PyObject_double_numpy(PyObject *obj, static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, const char *name, float complex *in, Py_ssize_t insize) { - float complex cvalue = PyFloat_AsDouble(obj); + Py_complex cvalue = PyComplex_AsCComplex(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } return 0; } @@ -1246,7 +1248,7 @@ static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, } for (Py_ssize_t i = 0; i < size; ++i) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - cvalue = PyFloat_AsDouble(item); + cvalue = PyComplex_AsCComplex(item); if (PyErr_Occurred()) { Py_DECREF(seq); PyErr_Format(PyExc_TypeError, @@ -1254,7 +1256,7 @@ static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, (int) i); return -1; } - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } Py_DECREF(seq); return 0; @@ -1270,11 +1272,11 @@ static int SHROUD_fill_from_PyObject_float_complex_list(PyObject *obj, static int SHROUD_fill_from_PyObject_float_complex_numpy(PyObject *obj, const char *name, float complex *in, Py_ssize_t insize) { - float complex cvalue = PyFloat_AsDouble(obj); + Py_complex cvalue = PyComplex_AsCComplex(obj); if (!PyErr_Occurred()) { // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) { - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } return 0; } @@ -2775,7 +2777,7 @@ static int SHROUD_get_from_object_double_complex_list(PyObject *obj, (std::malloc(size * sizeof(double complex))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - double complex cvalue = PyFloat_AsDouble(item); + double complex cvalue = PyComplex_AsCComplex(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -2784,7 +2786,7 @@ static int SHROUD_get_from_object_double_complex_list(PyObject *obj, value->name, (int) i); return 0; } - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } Py_DECREF(seq); @@ -2905,7 +2907,7 @@ static int SHROUD_get_from_object_float_complex_list(PyObject *obj, (std::malloc(size * sizeof(float complex))); for (Py_ssize_t i = 0; i < size; i++) { PyObject *item = PySequence_Fast_GET_ITEM(seq, i); - float complex cvalue = PyFloat_AsDouble(item); + float complex cvalue = PyComplex_AsCComplex(item); if (PyErr_Occurred()) { std::free(in); Py_DECREF(seq); @@ -2914,7 +2916,7 @@ static int SHROUD_get_from_object_float_complex_list(PyObject *obj, value->name, (int) i); return 0; } - in[i] = cvalue; + in[i] = cvalue.real + cvalue.imag * I; } Py_DECREF(seq); @@ -4042,7 +4044,8 @@ static PyObject *SHROUD_to_PyList_double_complex { PyObject *out = PyList_New(size); for (size_t i = 0; i < size; ++i) { - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } return out; } @@ -4071,7 +4074,8 @@ static PyObject *SHROUD_to_PyList_float_complex { PyObject *out = PyList_New(size); for (size_t i = 0; i < size; ++i) { - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } return out; } @@ -4321,7 +4325,8 @@ static PyObject *SHROUD_to_PyList_vector_double_complex size_t size = in.size(); PyObject *out = PyList_New(size); for (size_t i = 0; i < size; ++i) { - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } return out; } @@ -4350,7 +4355,8 @@ static PyObject *SHROUD_to_PyList_vector_float_complex size_t size = in.size(); PyObject *out = PyList_New(size); for (size_t i = 0; i < size; ++i) { - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } return out; } @@ -4635,7 +4641,8 @@ static void SHROUD_update_PyList_double_complex for (size_t i = 0; i < size; ++i) { PyObject *item = PyList_GET_ITEM(out, i); Py_DECREF(item); - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } } ##### end update_PyList_double_complex source @@ -4667,7 +4674,8 @@ static void SHROUD_update_PyList_float_complex for (size_t i = 0; i < size; ++i) { PyObject *item = PyList_GET_ITEM(out, i); Py_DECREF(item); - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } } ##### end update_PyList_float_complex source @@ -4939,7 +4947,8 @@ static void SHROUD_update_PyList_vector_double_complex for (size_t i = 0; i < size; ++i) { PyObject *item = PyList_GET_ITEM(out, i); Py_DECREF(item); - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } } ##### end update_PyList_vector_double_complex source @@ -4971,7 +4980,8 @@ static void SHROUD_update_PyList_vector_float_complex for (size_t i = 0; i < size; ++i) { PyObject *item = PyList_GET_ITEM(out, i); Py_DECREF(item); - PyList_SET_ITEM(out, i, PyFloat_FromDouble(in[i])); + PyList_SET_ITEM(out, i, PyComplex_FromDoubles( + creal(in[i]), cimag(in[i]))); } } ##### end update_PyList_vector_float_complex source diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index f645986f1..732733d16 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -314,9 +314,9 @@ "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", "LUA_type": "LUA_TNUMBER", "PYN_typenum": "NPY_DOUBLE", - "PY_ctor": "PyFloat_FromDouble({ctor_expr})", - "PY_format": "d", - "PY_get": "PyFloat_AsDouble({py_var})", + "PY_ctor": "PyComplex_FromDoubles(\t{ctor_expr})", + "PY_format": "D", + "PY_get": "PyComplex_AsCComplex({py_var})", "c_header": [ "" ], @@ -334,6 +334,9 @@ }, "f_type": "complex(C_DOUBLE_COMPLEX)", "flat_name": "double_complex", + "py_type": "Py_complex", + "pytype_to_cxx": "{work_var}.real + {work_var}.imag * I", + "pytype_to_pyctor": "creal({ctor_expr}), cimag({ctor_expr})", "sgroup": "native", "sh_type": "SH_TYPE_DOUBLE_COMPLEX" }, @@ -364,9 +367,9 @@ "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", "LUA_type": "LUA_TNUMBER", "PYN_typenum": "NPY_DOUBLE", - "PY_ctor": "PyFloat_FromDouble({ctor_expr})", - "PY_format": "d", - "PY_get": "PyFloat_AsDouble({py_var})", + "PY_ctor": "PyComplex_FromDoubles(\t{ctor_expr})", + "PY_format": "D", + "PY_get": "PyComplex_AsCComplex({py_var})", "c_header": [ "" ], @@ -384,6 +387,9 @@ }, "f_type": "complex(C_FLOAT_COMPLEX)", "flat_name": "float_complex", + "py_type": "Py_complex", + "pytype_to_cxx": "{work_var}.real + {work_var}.imag * I", + "pytype_to_pyctor": "creal({ctor_expr}), cimag({ctor_expr})", "sgroup": "native", "sh_type": "SH_TYPE_FLOAT_COMPLEX" }, diff --git a/shroud/typemap.py b/shroud/typemap.py index 25867056a..b0f6468e0 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -96,6 +96,9 @@ class Typemap(object): # ex. PyFloat_FromDouble({c_deref}{c_var}) ("PY_get", None), # expression to create type from PyObject. # ex. PyFloat_AsDouble({py_var}) + ("py_type", None), # returned by Py_get ex. "Py_complex" + ("pytype_to_pyctor", None), # Used with py_type, passed to PY_ctor + ("pytype_to_cxx", None), # Used with py_type # Name of converter function with prototype (PyObject *, void *). ("PY_to_object", None), # PyBuild - object=converter(address) ( @@ -658,9 +661,12 @@ def initialize(): f_type="complex(C_FLOAT_COMPLEX)", f_kind="C_FLOAT_COMPLEX", f_module=dict(iso_c_binding=["C_FLOAT_COMPLEX"]), - PY_format="d", - PY_ctor="PyFloat_FromDouble({ctor_expr})", - PY_get="PyFloat_AsDouble({py_var})", + PY_format="D", + py_type="Py_complex", + pytype_to_pyctor="creal({ctor_expr}), cimag({ctor_expr})", + pytype_to_cxx="{work_var}.real + {work_var}.imag * I", + PY_ctor="PyComplex_FromDoubles(\t{ctor_expr})", + PY_get="PyComplex_AsCComplex({py_var})", PYN_typenum="NPY_DOUBLE", LUA_type="LUA_TNUMBER", LUA_pop="lua_tonumber({LUA_state_var}, {LUA_index})", @@ -679,9 +685,16 @@ def initialize(): f_type="complex(C_DOUBLE_COMPLEX)", f_kind="C_DOUBLE_COMPLEX", f_module=dict(iso_c_binding=["C_DOUBLE_COMPLEX"]), - PY_format="d", - PY_ctor="PyFloat_FromDouble({ctor_expr})", - PY_get="PyFloat_AsDouble({py_var})", + PY_format="D", + PY_get="PyComplex_AsCComplex({py_var})", + py_type="Py_complex", + pytype_to_pyctor="creal({ctor_expr}), cimag({ctor_expr})", + pytype_to_cxx="{work_var}.real + {work_var}.imag * I", + # fmt.work_ctor = "std::complex(\tcvalue.real, cvalue.imag)" + # creal(), cimag() + # std::real(), std::imag() + # xx.real(), xx.imag() + PY_ctor="PyComplex_FromDoubles(\t{ctor_expr})", # double real, double imag PYN_typenum="NPY_DOUBLE", LUA_type="LUA_TNUMBER", LUA_pop="lua_tonumber({LUA_state_var}, {LUA_index})", diff --git a/shroud/whelpers.py b/shroud/whelpers.py index 34aa24806..1eced3af7 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -662,6 +662,7 @@ def add_copy_array_helper(fmt, ntypemap): """Create Fortran interface to helper function which copies an array based on c_type. Each interface calls the same C helper. + Used with sgroup="native" types. The function has C_prefix in the name since it is not file static. This allows multiple wrapped libraries to coexist. @@ -705,9 +706,10 @@ def add_copy_array_helper(fmt, ntypemap): def add_to_PyList_helper(fmt, ntypemap): """Add helpers to work with Python lists. Several helpers are created based on the type of arg. + Used with sgroup="native" types. Args: - fmt - util.Scope + fmt - util.Scope, parent is newlibrary ntypemap - typemap.Typemap """ flat_name = ntypemap.flat_name @@ -720,7 +722,10 @@ def add_to_PyList_helper(fmt, ntypemap): if ntypemap.PY_ctor is not None: fmt.hname = name fmt.fcn_suffix = flat_name - fmt.Py_ctor = ntypemap.PY_ctor.format(ctor_expr="in[i]") + ctor_expr = "in[i]" + if ntypemap.py_type is not None: + ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) + fmt.Py_ctor = ntypemap.PY_ctor.format(ctor_expr=ctor_expr) fmt.c_const="const " helper = create_to_PyList(fmt) CHelpers[name] = create_to_PyList(fmt) @@ -729,7 +734,10 @@ def add_to_PyList_helper(fmt, ntypemap): # Used with intent(inout) name = "update_PyList_" + flat_name if ntypemap.PY_ctor is not None: - fmt.Py_ctor = ntypemap.PY_ctor.format(ctor_expr="in[i]") + ctor_expr = "in[i]" + if ntypemap.py_type is not None: + ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) + fmt.Py_ctor = ntypemap.PY_ctor.format(ctor_expr=ctor_expr) fmt.hname = name fmt.hnameproto = wformat( "void {PY_helper_prefix}{hname}\t(PyObject *out, {c_type} *in, size_t size)", fmt) @@ -761,6 +769,11 @@ def add_to_PyList_helper(fmt, ntypemap): fmt.hname = name fmt.flat_name = flat_name fmt.fcn_type = ntypemap.c_type + fmt.work_type = fmt.c_type + fmt.work_ctor = "cvalue" + if ntypemap.py_type is not None: + fmt.work_type = ntypemap.py_type + fmt.work_ctor = ntypemap.pytype_to_cxx.format(work_var=fmt.work_ctor) fmt.Py_get_obj = ntypemap.PY_get.format(py_var="obj") fmt.Py_get = ntypemap.PY_get.format(py_var="item") CHelpers[name] = fill_from_PyObject_list(fmt) @@ -836,11 +849,11 @@ def fill_from_PyObject_list(fmt): // Return 0 on success, -1 on error. {PY_helper_static}{hnameproto} {{+ -{c_type} cvalue = {Py_get_obj}; +{work_type} cvalue = {Py_get_obj}; if (!PyErr_Occurred()) {{+ // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) {{+ -in[i] = cvalue; +in[i] = {work_ctor}; -}} return 0; -}} @@ -864,7 +877,7 @@ def fill_from_PyObject_list(fmt): PyErr_Format(PyExc_TypeError,\t "argument '%s', index %d must be {fcn_type}",\t name,\t (int) i); return -1; -}} -in[i] = cvalue; +in[i] = {work_ctor}; -}} Py_DECREF(seq); return 0; @@ -895,11 +908,11 @@ def fill_from_PyObject_numpy(fmt): // Return 0 on success, -1 on error. {PY_helper_static}{hnameproto} {{+ -{c_type} cvalue = {Py_get_obj}; +{work_type} cvalue = {Py_get_obj}; if (!PyErr_Occurred()) {{+ // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) {{+ -in[i] = cvalue; +in[i] = {work_ctor}; -}} return 0; -}} @@ -994,7 +1007,7 @@ def create_get_from_object_list(fmt): PyErr_Format(PyExc_TypeError,\t "argument '%s', index %d must be {fcn_type}",\t value->name,\t (int) i); return 0; -}} -in[i] = cvalue; +in[i] = {work_ctor}; -}} Py_DECREF(seq); @@ -1098,6 +1111,7 @@ def create_get_from_object_list_charptr(fmt): def add_to_PyList_helper_vector(fmt, ntypemap): """Add helpers to work with Python lists. Several helpers are created based on the type of arg. + Used with sgroup="native" types. Args: fmt - util.Scope @@ -1105,13 +1119,17 @@ def add_to_PyList_helper_vector(fmt, ntypemap): """ flat_name = ntypemap.flat_name fmt.c_type = ntypemap.c_type + fmt.cxx_type = ntypemap.cxx_type # Used with intent(out) name = "to_PyList_vector_" + flat_name ctor = ntypemap.PY_ctor if ctor is None: ctor = "XXXPy_ctor" - fmt.Py_ctor = ctor.format(ctor_expr="in[i]") + ctor_expr = "in[i]" + if ntypemap.py_type is not None: + ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) + fmt.Py_ctor = ctor.format(ctor_expr=ctor_expr) fmt.hname = name fmt.hnamefunc = wformat("{PY_helper_prefix}{hname}", fmt) fmt.hnameproto = wformat("PyObject *{hnamefunc}\t(std::vector<{c_type}> & in)", fmt) @@ -1140,7 +1158,10 @@ def add_to_PyList_helper_vector(fmt, ntypemap): ctor = ntypemap.PY_ctor if ctor is None: ctor = "XXXPy_ctor" - fmt.Py_ctor = ctor.format(ctor_expr="in[i]") + ctor_expr = "in[i]" + if ntypemap.py_type is not None: + ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) + fmt.Py_ctor = ctor.format(ctor_expr=ctor_expr) fmt.hname = name fmt.hnamefunc = wformat( "{PY_helper_prefix}{hname}", fmt) @@ -1176,12 +1197,18 @@ def add_to_PyList_helper_vector(fmt, ntypemap): get = ntypemap.PY_get if get is None: get = "XXXPy_get" - fmt.Py_get = get.format(py_var="item") + py_var = "item" + fmt.Py_get = get.format(py_var=py_var) + fmt.work_type = fmt.c_type; + fmt.work_ctor = "cvalue" + if ntypemap.py_type is not None: + fmt.work_type = ntypemap.py_type + fmt.work_ctor = ntypemap.pytype_to_cxx.format(work_var=fmt.work_ctor) fmt.hname = name fmt.hnamefunc= wformat( "{PY_helper_prefix}{hname}", fmt) fmt.hnameproto = wformat( - "int {hnamefunc}\t(PyObject *obj,\t const char *name,\t std::vector<{c_type}> & in)", fmt) + "int {hnamefunc}\t(PyObject *obj,\t const char *name,\t std::vector<{cxx_type}> & in)", fmt) helper = dict( name=fmt.hnamefunc, ##- cxx_include="", # malloc/free @@ -1189,7 +1216,7 @@ def add_to_PyList_helper_vector(fmt, ntypemap): cxx_source=wformat( """ // helper {hname} -// Convert obj into an array of type {c_type} +// Convert obj into an array of type {cxx_type} // Return -1 on error. {PY_helper_static}{hnameproto} {{+ @@ -1201,13 +1228,13 @@ def add_to_PyList_helper_vector(fmt, ntypemap): Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) {{+ PyObject *item = PySequence_Fast_GET_ITEM(seq, i); -{c_type} cvalue = {Py_get}; +{work_type} cvalue = {Py_get}; if (PyErr_Occurred()) {{+ Py_DECREF(seq); PyErr_Format(PyExc_ValueError,\t "argument '%s', index %d must be {c_type}",\t name,\t (int) i); return -1; -}} -in.push_back(cvalue); +in.push_back({work_ctor}); -}} Py_DECREF(seq); return 0; From 6b664b580021e50e4809190aba58908c3fe1043c Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Sun, 2 Aug 2020 13:17:11 -0700 Subject: [PATCH 20/36] Rename fmt.py_type as py_object Usually 'PyObject'. Avoid confusion with future py_ctype. --- regression/reference/classes/classes.json | 6 +++--- regression/reference/clibrary/clibrary.json | 4 ++-- regression/reference/cxxlibrary/cxxlibrary.json | 8 ++++---- regression/reference/debugfalse/tutorial.json | 2 +- regression/reference/example/example.json | 4 ++-- regression/reference/forward/forward.json | 4 ++-- regression/reference/struct-class-c/struct.json | 10 +++++----- regression/reference/struct-class-cxx/struct.json | 10 +++++----- regression/reference/struct-list-cxx/struct.json | 10 +++++----- regression/reference/struct-py-c/struct-py.json | 2 +- regression/reference/struct-py-cxx/struct-py.json | 2 +- regression/reference/tutorial/tutorial.json | 2 +- regression/reference/types/types.json | 2 +- shroud/wrapp.py | 4 ++-- 14 files changed, 35 insertions(+), 35 deletions(-) diff --git a/regression/reference/classes/classes.json b/regression/reference/classes/classes.json index 30fe343de..796a1846b 100644 --- a/regression/reference/classes/classes.json +++ b/regression/reference/classes/classes.json @@ -515,7 +515,7 @@ "cxx_var": "obj2", "data_var": "SHData_obj2", "numpy_type": null, - "py_type": "PY_Class1", + "py_object": "PY_Class1", "py_var": "SHPy_obj2", "size_var": "SHSize_obj2", "stmt0": "py_shadow_&_in", @@ -2322,7 +2322,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Class1", + "py_object": "PY_Class1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_shadow_scalar_in", @@ -2435,7 +2435,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Class1", + "py_object": "PY_Class1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_shadow_*_in", diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index 7f166007c..7ca397038 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -684,7 +684,7 @@ "cxx_var": "arg1", "data_var": "SHData_arg1", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_arg1", "size_var": "SHSize_arg1", "stmt0": "py_bool_scalar_in", @@ -787,7 +787,7 @@ "cxx_var": "arg3", "data_var": "SHData_arg3", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_arg3", "size_var": "SHSize_arg3", "stmt0": "py_bool_*_inout", diff --git a/regression/reference/cxxlibrary/cxxlibrary.json b/regression/reference/cxxlibrary/cxxlibrary.json index beaf0ef28..e716bf6a5 100644 --- a/regression/reference/cxxlibrary/cxxlibrary.json +++ b/regression/reference/cxxlibrary/cxxlibrary.json @@ -873,7 +873,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1_cls", + "py_object": "PY_Cstruct1_cls", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_&_inout_class", @@ -960,7 +960,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1_cls", + "py_object": "PY_Cstruct1_cls", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_&_in_class", @@ -1051,7 +1051,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1_cls", + "py_object": "PY_Cstruct1_cls", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_&_inout_class", @@ -1632,7 +1632,7 @@ "cxx_var": "flag", "data_var": "SHData_flag", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_flag", "size_var": "SHSize_flag", "stmt0": "py_bool_scalar_in", diff --git a/regression/reference/debugfalse/tutorial.json b/regression/reference/debugfalse/tutorial.json index 6907266f0..e4e8afebc 100644 --- a/regression/reference/debugfalse/tutorial.json +++ b/regression/reference/debugfalse/tutorial.json @@ -1054,7 +1054,7 @@ "cxx_var": "arg2", "data_var": "SHData_arg2", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_arg2", "size_var": "SHSize_arg2", "stmt0": "py_bool_scalar_in", diff --git a/regression/reference/example/example.json b/regression/reference/example/example.json index cf4a4beeb..fb9ad540d 100644 --- a/regression/reference/example/example.json +++ b/regression/reference/example/example.json @@ -1512,7 +1512,7 @@ "cxx_var": "in", "data_var": "SHData_in", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_in", "size_var": "SHSize_in", "stmt0": "py_bool_scalar_in", @@ -3033,7 +3033,7 @@ "cxx_var": "in", "data_var": "SHData_in", "numpy_type": null, - "py_type": "PP_ExClass1", + "py_object": "PP_ExClass1", "py_var": "SHPy_in", "size_var": "SHSize_in", "stmt0": "py_shadow_*_in", diff --git a/regression/reference/forward/forward.json b/regression/reference/forward/forward.json index a4d08b512..355fceaac 100644 --- a/regression/reference/forward/forward.json +++ b/regression/reference/forward/forward.json @@ -266,7 +266,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_shadow_*_in", @@ -394,7 +394,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Class3", + "py_object": "PY_Class3", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_shadow_*_in", diff --git a/regression/reference/struct-class-c/struct.json b/regression/reference/struct-class-c/struct.json index b9246656c..405ce7a3e 100644 --- a/regression/reference/struct-class-c/struct.json +++ b/regression/reference/struct-class-c/struct.json @@ -1602,7 +1602,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_scalar_in_class", @@ -1688,7 +1688,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_in_class", @@ -1801,7 +1801,7 @@ "cxx_var": "s1", "data_var": "SHData_s1", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_s1", "size_var": "SHSize_s1", "stmt0": "py_struct_*_in_class", @@ -1910,7 +1910,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_in_class", @@ -2137,7 +2137,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_inout_class", diff --git a/regression/reference/struct-class-cxx/struct.json b/regression/reference/struct-class-cxx/struct.json index daa90c52c..05a3eb1fe 100644 --- a/regression/reference/struct-class-cxx/struct.json +++ b/regression/reference/struct-class-cxx/struct.json @@ -1602,7 +1602,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_scalar_in_class", @@ -1688,7 +1688,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_in_class", @@ -1801,7 +1801,7 @@ "cxx_var": "s1", "data_var": "SHData_s1", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_s1", "size_var": "SHSize_s1", "stmt0": "py_struct_*_in_class", @@ -1910,7 +1910,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_in_class", @@ -2137,7 +2137,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_inout_class", diff --git a/regression/reference/struct-list-cxx/struct.json b/regression/reference/struct-list-cxx/struct.json index 924e1f234..4e82737e3 100644 --- a/regression/reference/struct-list-cxx/struct.json +++ b/regression/reference/struct-list-cxx/struct.json @@ -588,7 +588,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_scalar_in_list", @@ -674,7 +674,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_in_list", @@ -787,7 +787,7 @@ "cxx_var": "s1", "data_var": "SHData_s1", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_s1", "size_var": "SHSize_s1", "stmt0": "py_struct_*_in_list", @@ -896,7 +896,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_in_list", @@ -1126,7 +1126,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": null, - "py_type": "PY_Cstruct1", + "py_object": "PY_Cstruct1", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_struct_*_inout_list", diff --git a/regression/reference/struct-py-c/struct-py.json b/regression/reference/struct-py-c/struct-py.json index fed7e0260..9730ec495 100644 --- a/regression/reference/struct-py-c/struct-py.json +++ b/regression/reference/struct-py-c/struct-py.json @@ -335,7 +335,7 @@ "cxx_var": "s1", "data_var": "SHData_s1", "numpy_type": null, - "py_type": "PY_Cstruct_as_class", + "py_object": "PY_Cstruct_as_class", "py_var": "SHPy_s1", "size_var": "SHSize_s1", "stmt0": "py_struct_*_in_class", diff --git a/regression/reference/struct-py-cxx/struct-py.json b/regression/reference/struct-py-cxx/struct-py.json index cdba20131..c75e03d1d 100644 --- a/regression/reference/struct-py-cxx/struct-py.json +++ b/regression/reference/struct-py-cxx/struct-py.json @@ -335,7 +335,7 @@ "cxx_var": "s1", "data_var": "SHData_s1", "numpy_type": null, - "py_type": "PY_Cstruct_as_class", + "py_object": "PY_Cstruct_as_class", "py_var": "SHPy_s1", "size_var": "SHSize_s1", "stmt0": "py_struct_*_in_class", diff --git a/regression/reference/tutorial/tutorial.json b/regression/reference/tutorial/tutorial.json index 6907266f0..e4e8afebc 100644 --- a/regression/reference/tutorial/tutorial.json +++ b/regression/reference/tutorial/tutorial.json @@ -1054,7 +1054,7 @@ "cxx_var": "arg2", "data_var": "SHData_arg2", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_arg2", "size_var": "SHSize_arg2", "stmt0": "py_bool_scalar_in", diff --git a/regression/reference/types/types.json b/regression/reference/types/types.json index 6a021f06f..ee5192232 100644 --- a/regression/reference/types/types.json +++ b/regression/reference/types/types.json @@ -3278,7 +3278,7 @@ "cxx_var": "arg", "data_var": "SHData_arg", "numpy_type": "NPY_BOOL", - "py_type": "PyObject", + "py_object": "PyObject", "py_var": "SHPy_arg", "size_var": "SHSize_arg", "stmt0": "py_bool_scalar_in", diff --git a/shroud/wrapp.py b/shroud/wrapp.py index 0b5a8ed6d..138ca3bca 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -1400,8 +1400,8 @@ def wrap_function(self, cls, node, fileinfo): elif arg_typemap.PY_PyTypeObject: # Expect object of given type # cxx_var is declared by py_statements.intent_out.post_parse. - fmt_arg.py_type = arg_typemap.PY_PyObject or "PyObject" - append_format(declare_code, "{py_type} * {py_var};", fmt_arg) + fmt_arg.py_object = arg_typemap.PY_PyObject or "PyObject" + append_format(declare_code, "{py_object} * {py_var};", fmt_arg) pass_var = fmt_arg.cxx_var parse_format.append(arg_typemap.PY_format) parse_format.append("!") From 9c19218f902a0e3e792efaecc4aa0ed3c28220ed Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Sun, 2 Aug 2020 19:43:39 -0700 Subject: [PATCH 21/36] Rename Typemap.py_type as py_ctype The C object returned from a PyObject. If None, c_type is used. --- docs/python.rst | 14 +++++++------- shroud/typemap.py | 10 +++++----- shroud/whelpers.py | 26 +++++++++++++------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/python.rst b/docs/python.rst index 8a3713b8c..cc9dc183c 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -111,8 +111,8 @@ PY_from_object PyArg_Parse - ``status = converter(object, address)``. Defaults to *None*. -py_type -^^^^^^^ +py_ctype +^^^^^^^^ The type returned by *PY_get* function. Defaults to ``None`` which implies it is the same as the typemap. @@ -128,20 +128,20 @@ pytype_to_pyctor Expression to use with *PY_ctor*. Defaults to ``None`` which indicates no additional processing of the argument is required. -Only needs to be defined when *py_type* is defined. +Only needs to be defined when *py_ctype* is defined. With complex types, it is used to extract the real and imaginary parts from -``Py_complex`` (defined with *py_type*) +``Py_complex`` (defined with *py_ctype*) with ``creal({ctor_expr}), cimag({ctor_expr})``. *ctor_expr* is the expression used with *Py_ctor*. pytype_to_cxx ^^^^^^^^^^^^^ -Expression to convert *py_type* into a C++ value. -Only needs to be defined when *py_type* is defined. +Expression to convert *py_ctype* into a C++ value. +Only needs to be defined when *py_ctype* is defined. -Used with complex to convert ``Py_complex`` (defined with *py_type*) +Used with complex to convert ``Py_complex`` (defined with *py_ctype*) to C using ``{work_var}.real + {work_var}.imag * I`` or C++ with ``std::complex(\tcvalue.real, cvalue.imag)``. diff --git a/shroud/typemap.py b/shroud/typemap.py index b0f6468e0..637b3c774 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -96,9 +96,9 @@ class Typemap(object): # ex. PyFloat_FromDouble({c_deref}{c_var}) ("PY_get", None), # expression to create type from PyObject. # ex. PyFloat_AsDouble({py_var}) - ("py_type", None), # returned by Py_get ex. "Py_complex" - ("pytype_to_pyctor", None), # Used with py_type, passed to PY_ctor - ("pytype_to_cxx", None), # Used with py_type + ("py_ctype", None), # returned by Py_get ex. "Py_complex" + ("pytype_to_pyctor", None), # Used with py_ctype, passed to PY_ctor + ("pytype_to_cxx", None), # Used with py_ctype # Name of converter function with prototype (PyObject *, void *). ("PY_to_object", None), # PyBuild - object=converter(address) ( @@ -662,7 +662,7 @@ def initialize(): f_kind="C_FLOAT_COMPLEX", f_module=dict(iso_c_binding=["C_FLOAT_COMPLEX"]), PY_format="D", - py_type="Py_complex", + py_ctype="Py_complex", pytype_to_pyctor="creal({ctor_expr}), cimag({ctor_expr})", pytype_to_cxx="{work_var}.real + {work_var}.imag * I", PY_ctor="PyComplex_FromDoubles(\t{ctor_expr})", @@ -687,7 +687,7 @@ def initialize(): f_module=dict(iso_c_binding=["C_DOUBLE_COMPLEX"]), PY_format="D", PY_get="PyComplex_AsCComplex({py_var})", - py_type="Py_complex", + py_ctype="Py_complex", pytype_to_pyctor="creal({ctor_expr}), cimag({ctor_expr})", pytype_to_cxx="{work_var}.real + {work_var}.imag * I", # fmt.work_ctor = "std::complex(\tcvalue.real, cvalue.imag)" diff --git a/shroud/whelpers.py b/shroud/whelpers.py index 1eced3af7..bba9bc2e7 100644 --- a/shroud/whelpers.py +++ b/shroud/whelpers.py @@ -723,7 +723,7 @@ def add_to_PyList_helper(fmt, ntypemap): fmt.hname = name fmt.fcn_suffix = flat_name ctor_expr = "in[i]" - if ntypemap.py_type is not None: + if ntypemap.py_ctype is not None: ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) fmt.Py_ctor = ntypemap.PY_ctor.format(ctor_expr=ctor_expr) fmt.c_const="const " @@ -735,7 +735,7 @@ def add_to_PyList_helper(fmt, ntypemap): name = "update_PyList_" + flat_name if ntypemap.PY_ctor is not None: ctor_expr = "in[i]" - if ntypemap.py_type is not None: + if ntypemap.py_ctype is not None: ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) fmt.Py_ctor = ntypemap.PY_ctor.format(ctor_expr=ctor_expr) fmt.hname = name @@ -769,10 +769,10 @@ def add_to_PyList_helper(fmt, ntypemap): fmt.hname = name fmt.flat_name = flat_name fmt.fcn_type = ntypemap.c_type - fmt.work_type = fmt.c_type + fmt.py_ctype = fmt.c_type fmt.work_ctor = "cvalue" - if ntypemap.py_type is not None: - fmt.work_type = ntypemap.py_type + if ntypemap.py_ctype is not None: + fmt.py_ctype = ntypemap.py_ctype fmt.work_ctor = ntypemap.pytype_to_cxx.format(work_var=fmt.work_ctor) fmt.Py_get_obj = ntypemap.PY_get.format(py_var="obj") fmt.Py_get = ntypemap.PY_get.format(py_var="item") @@ -849,7 +849,7 @@ def fill_from_PyObject_list(fmt): // Return 0 on success, -1 on error. {PY_helper_static}{hnameproto} {{+ -{work_type} cvalue = {Py_get_obj}; +{py_ctype} cvalue = {Py_get_obj}; if (!PyErr_Occurred()) {{+ // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) {{+ @@ -908,7 +908,7 @@ def fill_from_PyObject_numpy(fmt): // Return 0 on success, -1 on error. {PY_helper_static}{hnameproto} {{+ -{work_type} cvalue = {Py_get_obj}; +{py_ctype} cvalue = {Py_get_obj}; if (!PyErr_Occurred()) {{+ // Broadcast scalar. for (Py_ssize_t i = 0; i < insize; ++i) {{+ @@ -1127,7 +1127,7 @@ def add_to_PyList_helper_vector(fmt, ntypemap): if ctor is None: ctor = "XXXPy_ctor" ctor_expr = "in[i]" - if ntypemap.py_type is not None: + if ntypemap.py_ctype is not None: ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) fmt.Py_ctor = ctor.format(ctor_expr=ctor_expr) fmt.hname = name @@ -1159,7 +1159,7 @@ def add_to_PyList_helper_vector(fmt, ntypemap): if ctor is None: ctor = "XXXPy_ctor" ctor_expr = "in[i]" - if ntypemap.py_type is not None: + if ntypemap.py_ctype is not None: ctor_expr = ntypemap.pytype_to_pyctor.format(ctor_expr=ctor_expr) fmt.Py_ctor = ctor.format(ctor_expr=ctor_expr) fmt.hname = name @@ -1199,10 +1199,10 @@ def add_to_PyList_helper_vector(fmt, ntypemap): get = "XXXPy_get" py_var = "item" fmt.Py_get = get.format(py_var=py_var) - fmt.work_type = fmt.c_type; + fmt.py_ctype = fmt.c_type; fmt.work_ctor = "cvalue" - if ntypemap.py_type is not None: - fmt.work_type = ntypemap.py_type + if ntypemap.py_ctype is not None: + fmt.py_ctype = ntypemap.py_ctype fmt.work_ctor = ntypemap.pytype_to_cxx.format(work_var=fmt.work_ctor) fmt.hname = name fmt.hnamefunc= wformat( @@ -1228,7 +1228,7 @@ def add_to_PyList_helper_vector(fmt, ntypemap): Py_ssize_t size = PySequence_Fast_GET_SIZE(seq); for (Py_ssize_t i = 0; i < size; i++) {{+ PyObject *item = PySequence_Fast_GET_ITEM(seq, i); -{work_type} cvalue = {Py_get}; +{py_ctype} cvalue = {Py_get}; if (PyErr_Occurred()) {{+ Py_DECREF(seq); PyErr_Format(PyExc_ValueError,\t "argument '%s', index %d must be {c_type}",\t name,\t (int) i); From da158d25c53597601622af9a977ce5900d29aa22 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 13:13:49 -0700 Subject: [PATCH 22/36] Rename Typemap.py_type as py_ctype The C object returned from a PyObject. If None, c_type is used. --- regression/reference/none/def_types.yaml | 4 ++-- regression/reference/none/none.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index cbee30612..5be1a8e34 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -122,7 +122,7 @@ typemap: PY_format: D PY_ctor: PyComplex_FromDoubles({ctor_expr}) PY_get: PyComplex_AsCComplex({py_var}) - py_type: Py_complex + py_ctype: Py_complex pytype_to_pyctor: creal({ctor_expr}), cimag({ctor_expr}) pytype_to_cxx: "{work_var}.real + {work_var}.imag * I" PYN_typenum: NPY_DOUBLE @@ -173,7 +173,7 @@ typemap: PY_format: D PY_ctor: PyComplex_FromDoubles({ctor_expr}) PY_get: PyComplex_AsCComplex({py_var}) - py_type: Py_complex + py_ctype: Py_complex pytype_to_pyctor: creal({ctor_expr}), cimag({ctor_expr}) pytype_to_cxx: "{work_var}.real + {work_var}.imag * I" PYN_typenum: NPY_DOUBLE diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index 732733d16..3cdc10e4e 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -334,7 +334,7 @@ }, "f_type": "complex(C_DOUBLE_COMPLEX)", "flat_name": "double_complex", - "py_type": "Py_complex", + "py_ctype": "Py_complex", "pytype_to_cxx": "{work_var}.real + {work_var}.imag * I", "pytype_to_pyctor": "creal({ctor_expr}), cimag({ctor_expr})", "sgroup": "native", @@ -387,7 +387,7 @@ }, "f_type": "complex(C_FLOAT_COMPLEX)", "flat_name": "float_complex", - "py_type": "Py_complex", + "py_ctype": "Py_complex", "pytype_to_cxx": "{work_var}.real + {work_var}.imag * I", "pytype_to_pyctor": "creal({ctor_expr}), cimag({ctor_expr})", "sgroup": "native", From 568dae6eb37150f5b8cc6f0a8d0ee118909ee4c5 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 13:25:27 -0700 Subject: [PATCH 23/36] Explicitly expand PY_ctor in method intent_out This will be necessary with py_ctype. This commit demonstrates that no tests fail with this change. Remove intermediate variable ctorvar. --- shroud/wrapp.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/shroud/wrapp.py b/shroud/wrapp.py index 138ca3bca..b168aedfc 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -986,16 +986,20 @@ def intent_out(self, typemap, intent_blk, fmt): intent_blk - fmt - format dictionary - NumPy intent(OUT) arguments will create a Python object as part of pre-call. + Create code to return out argument as a PyObject. + If there are multiple out arguments, then Py_BuildValue + will be used to create a tuple of values, so the + code in blk may not be used in the wrapper. + Return a BuildTuple instance. """ if intent_blk.object_created: # Explicit code exists to create object. + # For example, NumPy intent(OUT) arguments as part of pre-call. # If post_call is None, the Object has already been created build_format = "O" vargs = fmt.py_var blk = None - ctorvar = fmt.py_var else: # Decide values for Py_BuildValue build_format = typemap.PY_build_format or typemap.PY_format @@ -1006,21 +1010,20 @@ def intent_out(self, typemap, intent_blk, fmt): if typemap.PY_ctor: declare = "{PyObject} * {py_var} = {nullptr};" - post_call = "{py_var} = " + typemap.PY_ctor + ";" - ctorvar = fmt.py_var + ctor = typemap.PY_ctor.format(ctor_expr=fmt.ctor_expr) + post_call = "{py_var} = " + ctor + ";" else: # ex. long long does not define PY_ctor. fmt.PY_build_format = build_format fmt.vargs = vargs declare = "{PyObject} * {py_var} = {nullptr};" post_call = '{py_var} = Py_BuildValue("{PY_build_format}", {vargs});' - ctorvar = fmt.py_var blk = PyStmts( declare=[wformat(declare, fmt)], post_call=[wformat(post_call, fmt)], ) - return BuildTuple(build_format, vargs, blk, ctorvar) + return BuildTuple(build_format, vargs, blk, fmt.py_var) def wrap_functions(self, cls, functions, fileinfo): """Wrap functions for a library or class. From de066d3cd5419d886cf3f55d6481abe2f291041b Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 15:43:32 -0700 Subject: [PATCH 24/36] Add C complex tests Move tests from clibrary.yaml into ccomplex.yaml. There will be lots more complex tests added so put them into their own file. --- regression/do-test.py | 1 + regression/input/ccomplex.yaml | 36 +++ regression/input/clibrary.yaml | 8 - regression/reference/ccomplex/ccomplex.json | 219 ++++++++++++++++++ regression/reference/ccomplex/ccomplex.log | 12 + regression/reference/ccomplex/output | 6 + .../reference/ccomplex/pyccomplexmodule.c | 164 +++++++++++++ .../reference/ccomplex/pyccomplexmodule.h | 27 +++ regression/reference/ccomplex/setup.py | 27 +++ regression/reference/ccomplex/typesccomplex.h | 23 ++ regression/reference/ccomplex/wrapccomplex.c | 23 ++ regression/reference/ccomplex/wrapfccomplex.f | 67 ++++++ regression/reference/clibrary/clibrary.json | 178 -------------- regression/reference/clibrary/clibrary.log | 4 - regression/reference/clibrary/wrapfclibrary.f | 34 --- regression/run/Makefile | 3 + regression/run/ccomplex/Makefile | 34 +++ regression/run/ccomplex/ccomplex.c | 31 +++ regression/run/ccomplex/ccomplex.h | 19 ++ regression/run/ccomplex/main.f | 49 ++++ regression/run/ccomplex/python/Makefile | 44 ++++ regression/run/ccomplex/python/test.py | 50 ++++ regression/run/ccomplex/python/testpython.c | 33 +++ regression/run/clibrary/clibrary.c | 11 - regression/run/clibrary/clibrary.h | 10 +- regression/run/clibrary/main.f | 18 -- 26 files changed, 871 insertions(+), 260 deletions(-) create mode 100644 regression/input/ccomplex.yaml create mode 100644 regression/reference/ccomplex/ccomplex.json create mode 100644 regression/reference/ccomplex/ccomplex.log create mode 100644 regression/reference/ccomplex/output create mode 100644 regression/reference/ccomplex/pyccomplexmodule.c create mode 100644 regression/reference/ccomplex/pyccomplexmodule.h create mode 100644 regression/reference/ccomplex/setup.py create mode 100644 regression/reference/ccomplex/typesccomplex.h create mode 100644 regression/reference/ccomplex/wrapccomplex.c create mode 100644 regression/reference/ccomplex/wrapfccomplex.f create mode 100644 regression/run/ccomplex/Makefile create mode 100644 regression/run/ccomplex/ccomplex.c create mode 100644 regression/run/ccomplex/ccomplex.h create mode 100644 regression/run/ccomplex/main.f create mode 100644 regression/run/ccomplex/python/Makefile create mode 100644 regression/run/ccomplex/python/test.py create mode 100644 regression/run/ccomplex/python/testpython.c diff --git a/regression/do-test.py b/regression/do-test.py index 53b2a8c9f..3abf04997 100644 --- a/regression/do-test.py +++ b/regression/do-test.py @@ -477,6 +477,7 @@ def __init__(self, name, yaml=None, cmdline=None): TestDesc("namespace"), TestDesc("namespacedoc"), TestDesc("strings"), + TestDesc("ccomplex"), TestDesc("clibrary"), TestDesc("cxxlibrary"), TestDesc("interface"), diff --git a/regression/input/ccomplex.yaml b/regression/input/ccomplex.yaml new file mode 100644 index 000000000..40e783349 --- /dev/null +++ b/regression/input/ccomplex.yaml @@ -0,0 +1,36 @@ +copyright: +- Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +- other Shroud Project Developers. +- See the top-level COPYRIGHT file for details. +- +- "SPDX-License-Identifier: (BSD-3-Clause)" +- + +# Wrap complex in a C library +# Many of the same function as Tutorial, but for C. + +# Several tests have a 'char *outbuf+intent(out)' argument +# which will force a C bufferify wrapper to be created. +# The size of this buffer is controlled by lenoutbuf. +# This feature is helpful for the C tests since a C wrapper is not required +# for each function since we do not need to deal with name mangling +# like in C++. + +library: ccomplex +cxx_header: ccomplex.h + +language: c + +options: + debug: True + wrap_python: True + wrap_lua: False + literalinclude2: True + +declarations: + +###################################################################### +- decl: void accept_float_complex(float complex *arg1) + options: + wrap_python: False +- decl: void accept_double_complex(double complex *arg1) diff --git a/regression/input/clibrary.yaml b/regression/input/clibrary.yaml index 786ce6cdc..941c2d05e 100644 --- a/regression/input/clibrary.yaml +++ b/regression/input/clibrary.yaml @@ -252,14 +252,6 @@ declarations: wrap_lua: False wrap_python: False -###################################################################### -- decl: void accept_float_complex(float complex *arg1) - options: - wrap_python: False -- decl: void accept_double_complex(double complex *arg1) - options: - wrap_python: False - ###################################################################### # XXX - Replace with other code to free memory diff --git a/regression/reference/ccomplex/ccomplex.json b/regression/reference/ccomplex/ccomplex.json new file mode 100644 index 000000000..dd14f0c38 --- /dev/null +++ b/regression/reference/ccomplex/ccomplex.json @@ -0,0 +1,219 @@ +{ + "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "library": { + "copyright": [ + "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", + "other Shroud Project Developers.", + "See the top-level COPYRIGHT file for details.", + "", + "SPDX-License-Identifier: (BSD-3-Clause)", + "" + ], + "cxx_header": [ + "ccomplex.h" + ], + "functions": [ + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_FLOAT_COMPLEX", + "stmt0": "c_native_*_inout", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "f_intent": "INOUT", + "f_type": "complex(C_FLOAT_COMPLEX)", + "f_var": "arg1", + "sh_type": "SH_TYPE_FLOAT_COMPLEX", + "stmt0": "f_native_*_inout", + "stmt1": "f_default", + "stmtc0": "c_native_*_inout", + "stmtc1": "c_default" + } + } + }, + "ast": { + "declarator": { + "name": "accept_float_complex", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "inout" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "float", + "complex" + ], + "typemap_name": "float_complex" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void accept_float_complex(float complex *arg1)", + "declgen": "void accept_float_complex(float complex * arg1 +intent(inout))", + "fmtdict": { + "C_call_list": "arg1", + "C_name": "accept_float_complex", + "C_prototype": "float complex * arg1", + "C_return_type": "void", + "F_C_call": "c_accept_float_complex", + "F_C_name": "accept_float_complex", + "F_arg_c_call": "arg1", + "F_arguments": "arg1", + "F_name_function": "accept_float_complex", + "F_name_generic": "accept_float_complex", + "F_name_impl": "accept_float_complex", + "F_subprogram": "subroutine", + "function_name": "accept_float_complex", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "accept_float_complex" + }, + "options": { + "wrap_python": false + } + }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "c_native_*_inout", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "f_intent": "INOUT", + "f_type": "complex(C_DOUBLE_COMPLEX)", + "f_var": "arg1", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "f_native_*_inout", + "stmt1": "f_default", + "stmtc0": "c_native_*_inout", + "stmtc1": "c_default" + }, + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "double complex", + "c_var": "arg1", + "ctor_expr": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "data_var": "SHData_arg1", + "numpy_type": "NPY_DOUBLE", + "py_var": "SHPy_arg1", + "size_var": "SHSize_arg1", + "stmt0": "py_native_*_inout", + "stmt1": "py_native_*_inout", + "value_var": "SHValue_arg1" + } + } + }, + "ast": { + "declarator": { + "name": "accept_double_complex", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "inout" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "double", + "complex" + ], + "typemap_name": "double_complex" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void accept_double_complex(double complex *arg1)", + "declgen": "void accept_double_complex(double complex * arg1 +intent(inout))", + "fmtdict": { + "C_call_list": "arg1", + "C_name": "accept_double_complex", + "C_prototype": "double complex * arg1", + "C_return_type": "void", + "F_C_call": "c_accept_double_complex", + "F_C_name": "accept_double_complex", + "F_arg_c_call": "arg1", + "F_arguments": "arg1", + "F_name_function": "accept_double_complex", + "F_name_generic": "accept_double_complex", + "F_name_impl": "accept_double_complex", + "F_subprogram": "subroutine", + "PY_name_impl": "PY_accept_double_complex", + "function_name": "accept_double_complex", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "accept_double_complex" + }, + "options": {} + } + ], + "language": "c", + "scope_file": [ + "ccomplex" + ] + } +} \ No newline at end of file diff --git a/regression/reference/ccomplex/ccomplex.log b/regression/reference/ccomplex/ccomplex.log new file mode 100644 index 000000000..4e902c8ba --- /dev/null +++ b/regression/reference/ccomplex/ccomplex.log @@ -0,0 +1,12 @@ +Read yaml ccomplex.yaml +C function void accept_float_complex(float complex * arg1 +intent(inout)) +C function void accept_double_complex(double complex * arg1 +intent(inout)) +Close wrapccomplex.c +Close typesccomplex.h +C-interface, Fortran function void accept_float_complex(float complex * arg1 +intent(inout)) +C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) +Close wrapfccomplex.f +Python function void accept_double_complex(double complex * arg1 +intent(inout)) +Close pyccomplexmodule.c +Close pyccomplexmodule.h +Close setup.py diff --git a/regression/reference/ccomplex/output b/regression/reference/ccomplex/output new file mode 100644 index 000000000..68a3ba0d8 --- /dev/null +++ b/regression/reference/ccomplex/output @@ -0,0 +1,6 @@ +Wrote wrapccomplex.c +Wrote typesccomplex.h +Wrote wrapfccomplex.f +Wrote pyccomplexmodule.c +Wrote pyccomplexmodule.h +Wrote setup.py diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c new file mode 100644 index 000000000..de20d1dad --- /dev/null +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -0,0 +1,164 @@ +// pyccomplexmodule.c +// This file is generated by Shroud 0.12.1. Do not edit. +// Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +// other Shroud Project Developers. +// See the top-level COPYRIGHT file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) +// +#include "pyccomplexmodule.h" + +// splicer begin include +// splicer end include + +#ifdef __cplusplus +#define SHROUD_UNUSED(param) +#else +#define SHROUD_UNUSED(param) param +#endif + +#if PY_MAJOR_VERSION >= 3 +#define PyInt_AsLong PyLong_AsLong +#define PyInt_FromLong PyLong_FromLong +#define PyInt_FromSize_t PyLong_FromSize_t +#define PyString_FromString PyUnicode_FromString +#define PyString_FromStringAndSize PyUnicode_FromStringAndSize +#endif + +// splicer begin C_definition +// splicer end C_definition +PyObject *PY_error_obj; +// splicer begin additional_functions +// splicer end additional_functions + +// ---------------------------------------- +// Function: void accept_double_complex +// Exact: py_default +// ---------------------------------------- +// Argument: double complex * arg1 +intent(inout) +// Exact: py_native_*_inout +static char PY_accept_double_complex__doc__[] = +"documentation" +; + +static PyObject * +PY_accept_double_complex( + PyObject *SHROUD_UNUSED(self), + PyObject *args, + PyObject *kwds) +{ +// splicer begin function.accept_double_complex + double complex arg1; + char *SHT_kwlist[] = { + "arg1", + NULL }; + PyObject * SHPy_arg1 = NULL; + + if (!PyArg_ParseTupleAndKeywords(args, kwds, + "D:accept_double_complex", SHT_kwlist, &arg1)) + return NULL; + + accept_double_complex(&arg1); + + // post_call + SHPy_arg1 = PyComplex_FromDoubles(arg1); + + return (PyObject *) SHPy_arg1; +// splicer end function.accept_double_complex +} +static PyMethodDef PY_methods[] = { +{"accept_double_complex", (PyCFunction)PY_accept_double_complex, + METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex__doc__}, +{NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ +}; + +/* + * initccomplex - Initialization function for the module + * *must* be called initccomplex + */ +static char PY__doc__[] = +"library documentation" +; + +struct module_state { + PyObject *error; +}; + +#if PY_MAJOR_VERSION >= 3 +#define GETSTATE(m) ((struct module_state*)PyModule_GetState(m)) +#else +#define GETSTATE(m) (&_state) +static struct module_state _state; +#endif + +#if PY_MAJOR_VERSION >= 3 +static int ccomplex_traverse(PyObject *m, visitproc visit, void *arg) { + Py_VISIT(GETSTATE(m)->error); + return 0; +} + +static int ccomplex_clear(PyObject *m) { + Py_CLEAR(GETSTATE(m)->error); + return 0; +} + +static struct PyModuleDef moduledef = { + PyModuleDef_HEAD_INIT, + "ccomplex", /* m_name */ + PY__doc__, /* m_doc */ + sizeof(struct module_state), /* m_size */ + PY_methods, /* m_methods */ + NULL, /* m_reload */ + ccomplex_traverse, /* m_traverse */ + ccomplex_clear, /* m_clear */ + NULL /* m_free */ +}; + +#define RETVAL m +#define INITERROR return NULL +#else +#define RETVAL +#define INITERROR return +#endif + +PyMODINIT_FUNC +#if PY_MAJOR_VERSION >= 3 +PyInit_ccomplex(void) +#else +initccomplex(void) +#endif +{ + PyObject *m = NULL; + const char * error_name = "ccomplex.Error"; + + // splicer begin C_init_locals + // splicer end C_init_locals + + + /* Create the module and add the functions */ +#if PY_MAJOR_VERSION >= 3 + m = PyModule_Create(&moduledef); +#else + m = Py_InitModule4("ccomplex", PY_methods, + PY__doc__, + (PyObject*)NULL,PYTHON_API_VERSION); +#endif + if (m == NULL) + return RETVAL; + struct module_state *st = GETSTATE(m); + + PY_error_obj = PyErr_NewException((char *) error_name, NULL, NULL); + if (PY_error_obj == NULL) + return RETVAL; + st->error = PY_error_obj; + PyModule_AddObject(m, "Error", st->error); + + // splicer begin C_init_body + // splicer end C_init_body + + /* Check for errors */ + if (PyErr_Occurred()) + Py_FatalError("can't initialize module ccomplex"); + return RETVAL; +} + diff --git a/regression/reference/ccomplex/pyccomplexmodule.h b/regression/reference/ccomplex/pyccomplexmodule.h new file mode 100644 index 000000000..528643ba4 --- /dev/null +++ b/regression/reference/ccomplex/pyccomplexmodule.h @@ -0,0 +1,27 @@ +// pyccomplexmodule.h +// This file is generated by Shroud 0.12.1. Do not edit. +// Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +// other Shroud Project Developers. +// See the top-level COPYRIGHT file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) +// +#ifndef PYCCOMPLEXMODULE_H +#define PYCCOMPLEXMODULE_H +#include +#include "ccomplex.h" +// splicer begin header.include +// splicer end header.include + +// splicer begin header.C_declaration +// splicer end header.C_declaration + +extern PyObject *PY_error_obj; + +#if PY_MAJOR_VERSION >= 3 +PyMODINIT_FUNC PyInit_ccomplex(void); +#else +PyMODINIT_FUNC initccomplex(void); +#endif + +#endif /* PYCCOMPLEXMODULE_H */ diff --git a/regression/reference/ccomplex/setup.py b/regression/reference/ccomplex/setup.py new file mode 100644 index 000000000..045ea55df --- /dev/null +++ b/regression/reference/ccomplex/setup.py @@ -0,0 +1,27 @@ +# setup.py +# This file is generated by Shroud 0.12.1. Do not edit. +# Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +# other Shroud Project Developers. +# See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) +# +from setuptools import setup, Extension + +module = Extension( + 'ccomplex', + sources=[ + 'pyccomplexmodule.c' + ], + language='c', + include_dirs = None, +# libraries = ['tcl83'], +# library_dirs = ['/usr/local/lib'], +# extra_compile_args = [ '-O0', '-g' ], +# extra_link_args = +) + +setup( + name='ccomplex', + ext_modules = [module], +) diff --git a/regression/reference/ccomplex/typesccomplex.h b/regression/reference/ccomplex/typesccomplex.h new file mode 100644 index 000000000..014d738a8 --- /dev/null +++ b/regression/reference/ccomplex/typesccomplex.h @@ -0,0 +1,23 @@ +// typesccomplex.h +// This file is generated by Shroud 0.12.1. Do not edit. +// Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +// other Shroud Project Developers. +// See the top-level COPYRIGHT file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) +// +// For C users and C implementation + +#ifndef TYPESCCOMPLEX_H +#define TYPESCCOMPLEX_H + +// helper capsule_data_helper +struct s_CCO_SHROUD_capsule_data { + void *addr; /* address of C++ memory */ + int idtor; /* index of destructor */ +}; +typedef struct s_CCO_SHROUD_capsule_data CCO_SHROUD_capsule_data; + +void CCO_SHROUD_memory_destructor(CCO_SHROUD_capsule_data *cap); + +#endif // TYPESCCOMPLEX_H diff --git a/regression/reference/ccomplex/wrapccomplex.c b/regression/reference/ccomplex/wrapccomplex.c new file mode 100644 index 000000000..374146b7b --- /dev/null +++ b/regression/reference/ccomplex/wrapccomplex.c @@ -0,0 +1,23 @@ +// wrapccomplex.c +// This file is generated by Shroud 0.12.1. Do not edit. +// Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +// other Shroud Project Developers. +// See the top-level COPYRIGHT file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) +// +#include +#include "ccomplex.h" +#include "typesccomplex.h" + +// splicer begin C_definitions +// splicer end C_definitions + +// start release allocated memory +// Release library allocated memory. +void CCO_SHROUD_memory_destructor(CCO_SHROUD_capsule_data *cap) +{ + cap->addr = NULL; + cap->idtor = 0; // avoid deleting again +} +// end release allocated memory diff --git a/regression/reference/ccomplex/wrapfccomplex.f b/regression/reference/ccomplex/wrapfccomplex.f new file mode 100644 index 000000000..26113fe74 --- /dev/null +++ b/regression/reference/ccomplex/wrapfccomplex.f @@ -0,0 +1,67 @@ +! wrapfccomplex.f +! This file is generated by Shroud 0.12.1. Do not edit. +! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +! other Shroud Project Developers. +! See the top-level COPYRIGHT file for details. +! +! SPDX-License-Identifier: (BSD-3-Clause) +! +!> +!! \file wrapfccomplex.f +!! \brief Shroud generated wrapper for ccomplex library +!< +! splicer begin file_top +! splicer end file_top +module ccomplex_mod + ! splicer begin module_use + ! splicer end module_use + implicit none + + ! splicer begin module_top + ! splicer end module_top + + ! ---------------------------------------- + ! Function: void accept_float_complex + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: float complex * arg1 +intent(inout) + ! Requested: c_native_*_inout + ! Match: c_default + interface + subroutine accept_float_complex(arg1) & + bind(C, name="accept_float_complex") + use iso_c_binding, only : C_FLOAT_COMPLEX + implicit none + complex(C_FLOAT_COMPLEX), intent(INOUT) :: arg1 + end subroutine accept_float_complex + end interface + + ! ---------------------------------------- + ! Function: void accept_double_complex + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: double complex * arg1 +intent(inout) + ! Requested: c_native_*_inout + ! Match: c_default + interface + subroutine accept_double_complex(arg1) & + bind(C, name="accept_double_complex") + use iso_c_binding, only : C_DOUBLE_COMPLEX + implicit none + complex(C_DOUBLE_COMPLEX), intent(INOUT) :: arg1 + end subroutine accept_double_complex + end interface + + interface + ! splicer begin additional_interfaces + ! splicer end additional_interfaces + end interface + +contains + + ! splicer begin additional_functions + ! splicer end additional_functions + +end module ccomplex_mod diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index 7ca397038..b948bd34c 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -5111,184 +5111,6 @@ "wrap_lua": false, "wrap_python": false } - }, - { - "_fmtargs": { - "arg1": { - "fmtc": { - "c_addr": "", - "c_const": "", - "c_deref": "*", - "c_member": "->", - "c_var": "arg1", - "cxx_addr": "", - "cxx_member": "->", - "cxx_nonconst_ptr": "arg1", - "cxx_type": "std::complex", - "cxx_var": "arg1", - "idtor": "0", - "sh_type": "SH_TYPE_FLOAT_COMPLEX", - "stmt0": "c_native_*_inout", - "stmt1": "c_default" - }, - "fmtf": { - "F_pointer": "SHPTR_arg1", - "c_var": "arg1", - "f_intent": "INOUT", - "f_type": "complex(C_FLOAT_COMPLEX)", - "f_var": "arg1", - "sh_type": "SH_TYPE_FLOAT_COMPLEX", - "stmt0": "f_native_*_inout", - "stmt1": "f_default", - "stmtc0": "c_native_*_inout", - "stmtc1": "c_default" - } - } - }, - "ast": { - "declarator": { - "name": "accept_float_complex", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "inout" - }, - "declarator": { - "name": "arg1", - "pointer": [ - { - "ptr": "*" - } - ] - }, - "specifier": [ - "float", - "complex" - ], - "typemap_name": "float_complex" - } - ], - "specifier": [ - "void" - ], - "typemap_name": "void" - }, - "decl": "void accept_float_complex(float complex *arg1)", - "declgen": "void accept_float_complex(float complex * arg1 +intent(inout))", - "fmtdict": { - "C_call_list": "arg1", - "C_name": "accept_float_complex", - "C_prototype": "float complex * arg1", - "C_return_type": "void", - "F_C_call": "c_accept_float_complex", - "F_C_name": "accept_float_complex", - "F_arg_c_call": "arg1", - "F_arguments": "arg1", - "F_name_function": "accept_float_complex", - "F_name_generic": "accept_float_complex", - "F_name_impl": "accept_float_complex", - "F_subprogram": "subroutine", - "function_name": "accept_float_complex", - "stmt0": "f_subroutine", - "stmt1": "f_default", - "stmtc0": "c", - "stmtc1": "c_default", - "underscore_name": "accept_float_complex" - }, - "options": { - "wrap_python": false - } - }, - { - "_fmtargs": { - "arg1": { - "fmtc": { - "c_addr": "", - "c_const": "", - "c_deref": "*", - "c_member": "->", - "c_var": "arg1", - "cxx_addr": "", - "cxx_member": "->", - "cxx_nonconst_ptr": "arg1", - "cxx_type": "std::complex", - "cxx_var": "arg1", - "idtor": "0", - "sh_type": "SH_TYPE_DOUBLE_COMPLEX", - "stmt0": "c_native_*_inout", - "stmt1": "c_default" - }, - "fmtf": { - "F_pointer": "SHPTR_arg1", - "c_var": "arg1", - "f_intent": "INOUT", - "f_type": "complex(C_DOUBLE_COMPLEX)", - "f_var": "arg1", - "sh_type": "SH_TYPE_DOUBLE_COMPLEX", - "stmt0": "f_native_*_inout", - "stmt1": "f_default", - "stmtc0": "c_native_*_inout", - "stmtc1": "c_default" - } - } - }, - "ast": { - "declarator": { - "name": "accept_double_complex", - "pointer": [] - }, - "params": [ - { - "attrs": { - "intent": "inout" - }, - "declarator": { - "name": "arg1", - "pointer": [ - { - "ptr": "*" - } - ] - }, - "specifier": [ - "double", - "complex" - ], - "typemap_name": "double_complex" - } - ], - "specifier": [ - "void" - ], - "typemap_name": "void" - }, - "decl": "void accept_double_complex(double complex *arg1)", - "declgen": "void accept_double_complex(double complex * arg1 +intent(inout))", - "fmtdict": { - "C_call_list": "arg1", - "C_name": "accept_double_complex", - "C_prototype": "double complex * arg1", - "C_return_type": "void", - "F_C_call": "c_accept_double_complex", - "F_C_name": "accept_double_complex", - "F_arg_c_call": "arg1", - "F_arguments": "arg1", - "F_name_function": "accept_double_complex", - "F_name_generic": "accept_double_complex", - "F_name_impl": "accept_double_complex", - "F_subprogram": "subroutine", - "function_name": "accept_double_complex", - "stmt0": "f_subroutine", - "stmt1": "f_default", - "stmtc0": "c", - "stmtc1": "c_default", - "underscore_name": "accept_double_complex" - }, - "options": { - "wrap_python": false - } } ], "language": "c", diff --git a/regression/reference/clibrary/clibrary.log b/regression/reference/clibrary/clibrary.log index 91441fd7c..a4b4490b4 100644 --- a/regression/reference/clibrary/clibrary.log +++ b/regression/reference/clibrary/clibrary.log @@ -33,8 +33,6 @@ C function void callback2(int type +intent(in)+value, void * in +assumedtype+int C function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)) C function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)+len) C function void callback_set_alloc(int tc +intent(in)+value, array_info * arr +intent(inout), void ( * alloc)(int tc +intent(in)+value, array_info * arr +intent(inout)) +intent(in)+value) -C function void accept_float_complex(float complex * arg1 +intent(inout)) -C function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapClibrary.h Close wrapClibrary.c Close typesClibrary.h @@ -72,8 +70,6 @@ C-interface, Fortran function void callback2(int type +intent(in)+value, void * C-interface, Fortran function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)) C-interface function void callback3(const char * type +intent(in), void * in +assumedtype+intent(in), void ( * incr)(int *) +external+intent(in)+value, char * outbuf +intent(out)+len) C-interface, Fortran function void callback_set_alloc(int tc +intent(in)+value, array_info * arr +intent(inout), void ( * alloc)(int tc +intent(in)+value, array_info * arr +intent(inout)) +intent(in)+value) -C-interface, Fortran function void accept_float_complex(float complex * arg1 +intent(inout)) -C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapfclibrary.f Python function void NoReturnNoArguments() Python function double PassByValue(double arg1 +intent(in)+value, int arg2 +intent(in)+value) diff --git a/regression/reference/clibrary/wrapfclibrary.f b/regression/reference/clibrary/wrapfclibrary.f index a70469253..44d84464c 100644 --- a/regression/reference/clibrary/wrapfclibrary.f +++ b/regression/reference/clibrary/wrapfclibrary.f @@ -809,40 +809,6 @@ subroutine callback_set_alloc(tc, arr, alloc) & end subroutine callback_set_alloc end interface - ! ---------------------------------------- - ! Function: void accept_float_complex - ! Requested: c_void_scalar_result - ! Match: c_default - ! ---------------------------------------- - ! Argument: float complex * arg1 +intent(inout) - ! Requested: c_native_*_inout - ! Match: c_default - interface - subroutine accept_float_complex(arg1) & - bind(C, name="accept_float_complex") - use iso_c_binding, only : C_FLOAT_COMPLEX - implicit none - complex(C_FLOAT_COMPLEX), intent(INOUT) :: arg1 - end subroutine accept_float_complex - end interface - - ! ---------------------------------------- - ! Function: void accept_double_complex - ! Requested: c_void_scalar_result - ! Match: c_default - ! ---------------------------------------- - ! Argument: double complex * arg1 +intent(inout) - ! Requested: c_native_*_inout - ! Match: c_default - interface - subroutine accept_double_complex(arg1) & - bind(C, name="accept_double_complex") - use iso_c_binding, only : C_DOUBLE_COMPLEX - implicit none - complex(C_DOUBLE_COMPLEX), intent(INOUT) :: arg1 - end subroutine accept_double_complex - end interface - interface ! splicer begin additional_interfaces ! splicer end additional_interfaces diff --git a/regression/run/Makefile b/regression/run/Makefile index 8e08684cf..1023f071c 100644 --- a/regression/run/Makefile +++ b/regression/run/Makefile @@ -42,6 +42,7 @@ test-fortran : \ test-fortran-cdesc \ test-fortran-preprocess \ test-fortran-strings \ + test-fortran-ccomplex \ test-fortran-clibrary \ test-fortran-cxxlibrary \ test-fortran-ownership \ @@ -190,6 +191,8 @@ phony_explicit: # Avoid deleting directories created to run tests. # They are created via pattern rules. .SECONDARY: \ + $(tempdir)/run/ccomplex/.. \ + $(tempdir)/run/ccomplex/python/.. \ $(tempdir)/run/cdesc/.. \ $(tempdir)/run/classes/.. \ $(tempdir)/run/classes/python/.. \ diff --git a/regression/run/ccomplex/Makefile b/regression/run/ccomplex/Makefile new file mode 100644 index 000000000..132edf076 --- /dev/null +++ b/regression/run/ccomplex/Makefile @@ -0,0 +1,34 @@ +# Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +# other Shroud Project Developers. +# See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) +# +# run/clibrary +# +include $(top)/regression/run/defaults.mk + +INCLUDE = \ + -I$(top)/regression/reference/ccomplex \ + -I$(top)/regression/run/ccomplex \ + -I$(top)/regression/run/fruit + +VPATH = \ + $(top)/regression/reference/ccomplex \ + $(top)/regression/run/ccomplex \ + $(top)/regression/run/fruit + +OBJS = \ + ccomplex.o \ + wrapfccomplex.o \ + wrapccomplex.o \ + fruit.o \ + main.o + +ccomplex : $(OBJS) + $(FC) $(FFLAGS) $^ -o $@ $(CLIBS) + +clean : + rm -f $(OBJS) *.mod ccomplex + +main.o : wrapfccomplex.o diff --git a/regression/run/ccomplex/ccomplex.c b/regression/run/ccomplex/ccomplex.c new file mode 100644 index 000000000..6042395d0 --- /dev/null +++ b/regression/run/ccomplex/ccomplex.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and + * other Shroud Project Developers. + * See the top-level COPYRIGHT file for details. + * + * SPDX-License-Identifier: (BSD-3-Clause) + * + * clibrary.c + */ + +#include + +#define MAXLAST 50 +static char last_function_called[MAXLAST]; + +//---------------------------------------------------------------------- + +void accept_float_complex(float complex *arg1) +{ + *arg1 = 3.0 + 4.0 * I; +} +void accept_double_complex(double complex *arg1) +{ + *arg1 = 3.0 + 4.0 * I; +} + +//---------------------------------------------------------------------- +const char *LastFunctionCalled(void) +{ + return last_function_called; +} diff --git a/regression/run/ccomplex/ccomplex.h b/regression/run/ccomplex/ccomplex.h new file mode 100644 index 000000000..5855e709c --- /dev/null +++ b/regression/run/ccomplex/ccomplex.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and + * other Shroud Project Developers. + * See the top-level COPYRIGHT file for details. + * + * SPDX-License-Identifier: (BSD-3-Clause) + * + * ccomplex.h - wrapped routines + */ + +#ifndef CCOMPLEX_H +#define CCOMPLEX_H + +#include + +void accept_float_complex(float complex *arg1); +void accept_double_complex(double complex *arg1); + +#endif // CCOMPLEX_H diff --git a/regression/run/ccomplex/main.f b/regression/run/ccomplex/main.f new file mode 100644 index 000000000..a9eedf41c --- /dev/null +++ b/regression/run/ccomplex/main.f @@ -0,0 +1,49 @@ +! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +! other Shroud Project Developers. +! See the top-level COPYRIGHT file for details. +! +! SPDX-License-Identifier: (BSD-3-Clause) +! ####################################################################### +! +! Test Fortran API generated from ccomplex.yaml. +! + +program tester + use fruit + use iso_c_binding + use ccomplex_mod + implicit none + logical ok + + call init_fruit + + call test_complex + + call fruit_summary + call fruit_finalize + + call is_all_successful(ok) + if (.not. ok) then + call exit(1) + endif + +contains + + subroutine test_complex + complex(C_FLOAT_COMPLEX) c4 + complex(C_DOUBLE_COMPLEX) c8 + + ! intent(INOUT) argument + c4 = (1.0, 2.0) + call accept_float_complex(c4) + call assert_equals(3.0, real(c4), "accept_float_complex") + call assert_equals(4.0, imag(c4), "accept_float_complex") + + ! intent(INOUT) argument + c8 = (1.0d0, 2.0d0) + call accept_double_complex(c8) + call assert_equals(3.0d0, real(c8), "accept_double_complex") + call assert_equals(4.0d0, imag(c8), "accept_double_complex") + end subroutine test_complex + +end program tester diff --git a/regression/run/ccomplex/python/Makefile b/regression/run/ccomplex/python/Makefile new file mode 100644 index 000000000..d09685542 --- /dev/null +++ b/regression/run/ccomplex/python/Makefile @@ -0,0 +1,44 @@ +# Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +# other Shroud Project Developers. +# See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) +# +# Compile the python ccomplex module +# +include $(top)/regression/run/defaults.mk + +INCLUDE = \ + -I$(top)/regression/reference/ccomplex \ + -I$(top)/regression/run/ccomplex \ + $(PYTHON_INC) + +VPATH = \ + $(top)/regression/reference/ccomplex \ + $(top)/regression/run/ccomplex \ + $(top)/regression/run/ccomplex/python + +OBJS = \ + ccomplex.o \ + pyccomplexmodule.o + +CFLAGS += $(SHARED) + +all : ccomplex.so simple + +ccomplex.so : $(OBJS) + $(CXX) $(LD_SHARED) -o $@ $^ $(LIBS) + +simple : testpython.o $(OBJS) + $(CXX) -pthread -o $@ $^ $(PYTHON_LIB) +# g++ -pthread -o $@ $^ $(PYTHON_LIB) + +clean : + rm -f *.so *.o simple +.PHONY : clean + +print-debug: + @echo PYTHON=$(PYTHON) + @echo PYTHON_PREFIX=$(PYTHON_PREFIX) + @echo PYTHON_VER=$(PYTHON_VER) + diff --git a/regression/run/ccomplex/python/test.py b/regression/run/ccomplex/python/test.py new file mode 100644 index 000000000..218173bba --- /dev/null +++ b/regression/run/ccomplex/python/test.py @@ -0,0 +1,50 @@ +# Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and +# other Shroud Project Developers. +# See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) +# +# ####################################################################### +# +# Test Python API generated from ccomplex.yaml. +# +from __future__ import print_function + +import math +import unittest +import ccomplex + + +class NotTrue: + """Test bool arguments errors""" + def __bool__(self): + raise NotImplementedError + +class CComplex(unittest.TestCase): + """Test tutorial problem""" + + def XXsetUp(self): + """ Setting up for the test """ + print("FooTest:setUp_:begin") + ## do something... + print("FooTest:setUp_:end") + + def XXtearDown(self): + """Cleaning up after the test""" + print("FooTest:tearDown_:begin") + ## do something... + print("FooTest:tearDown_:end") + + def test_complex_inout_scalar(self): + rv = ccomplex.accept_double_complex(complex(1.0, 2.0)) + self.assertEqual(complex(3., 4.), rv) + + +# creating a new test suite +newSuite = unittest.TestSuite() + +# adding a test case +newSuite.addTest(unittest.makeSuite(Ccomplex)) + +if __name__ == "__main__": + unittest.main() diff --git a/regression/run/ccomplex/python/testpython.c b/regression/run/ccomplex/python/testpython.c new file mode 100644 index 000000000..701f62df0 --- /dev/null +++ b/regression/run/ccomplex/python/testpython.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and + * other Shroud Project Developers. + * See the top-level COPYRIGHT file for details. + * + * SPDX-License-Identifier: (BSD-3-Clause) + * ####################################################################### + */ +#include "Python.h" +//#include +#include + +#if PY_MAJOR_VERSION >= 3 +#define MODINIT PyInit_ccomplex +#else +#define MODINIT initccomplex +#endif +PyMODINIT_FUNC MODINIT(void); + +int main(int argc, char** argv) +{ + char filename[] = "test.py"; + FILE* fp; + + Py_Initialize(); + MODINIT(); + + fp = fopen(filename, "r"); + PyRun_SimpleFile(fp, filename); + fclose(fp); + Py_Exit(0); + return 0; +} diff --git a/regression/run/clibrary/clibrary.c b/regression/run/clibrary/clibrary.c index 79c90af70..edb6168e6 100644 --- a/regression/run/clibrary/clibrary.c +++ b/regression/run/clibrary/clibrary.c @@ -443,17 +443,6 @@ void get_values(int *nvalues, int *values) return; } -//---------------------------------------------------------------------- - -void accept_float_complex(float complex *arg1) -{ - *arg1 = 3.0 + 4.0 * I; -} -void accept_double_complex(double complex *arg1) -{ - *arg1 = 3.0 + 4.0 * I; -} - //---------------------------------------------------------------------- const char *LastFunctionCalled(void) { diff --git a/regression/run/clibrary/clibrary.h b/regression/run/clibrary/clibrary.h index 990515f2a..7599ec00c 100644 --- a/regression/run/clibrary/clibrary.h +++ b/regression/run/clibrary/clibrary.h @@ -8,11 +8,10 @@ * clibrary.h - wrapped routines */ -#ifndef CLIBRARY_HPP -#define CLIBRARY_HPP +#ifndef CLIBRARY_H +#define CLIBRARY_H #include -#include /* Size of buffer passed from Fortran */ #define LENOUTBUF 40 @@ -110,7 +109,4 @@ void increment(int *array, int size); void get_values(int *nvalues, int *values); -void accept_float_complex(float complex *arg1); -void accept_double_complex(double complex *arg1); - -#endif // CLIBRARY_HPP +#endif // CLIBRARY_H diff --git a/regression/run/clibrary/main.f b/regression/run/clibrary/main.f index 7a33632d3..0e7c709db 100644 --- a/regression/run/clibrary/main.f +++ b/regression/run/clibrary/main.f @@ -95,7 +95,6 @@ program tester call test_functions call test_callback - call test_complex ! call test_vector @@ -299,23 +298,6 @@ subroutine test_callback end subroutine test_callback - subroutine test_complex - complex(C_FLOAT_COMPLEX) c4 - complex(C_DOUBLE_COMPLEX) c8 - - ! intent(INOUT) argument - c4 = (1.0, 2.0) - call accept_float_complex(c4) - call assert_equals(3.0, real(c4), "accept_float_complex") - call assert_equals(4.0, imag(c4), "accept_float_complex") - - ! intent(INOUT) argument - c8 = (1.0d0, 2.0d0) - call accept_double_complex(c8) - call assert_equals(3.0d0, real(c8), "accept_double_complex") - call assert_equals(4.0d0, imag(c8), "accept_double_complex") - end subroutine test_complex - ! subroutine test_vector ! integer(C_INT) intv(5) ! character(10) :: names(3) From 941352cf44f59986497a9b289e700b27a91ca590 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 16:24:29 -0700 Subject: [PATCH 25/36] Initial Python complex test --- regression/reference/ccomplex/ccomplex.json | 5 ++++- regression/reference/ccomplex/pyccomplexmodule.c | 8 ++++++-- regression/run/Makefile | 1 + regression/run/ccomplex/python/test.py | 3 ++- shroud/wrapp.py | 14 ++++++++++++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/regression/reference/ccomplex/ccomplex.json b/regression/reference/ccomplex/ccomplex.json index dd14f0c38..5e86dde83 100644 --- a/regression/reference/ccomplex/ccomplex.json +++ b/regression/reference/ccomplex/ccomplex.json @@ -139,7 +139,9 @@ "c_deref": "*", "c_type": "double complex", "c_var": "arg1", - "ctor_expr": "arg1", + "ctor_expr": "creal(arg1), cimag(arg1)", + "ctype_expr": "SHCPY_arg1.real + SHCPY_arg1.imag * I", + "ctype_var": "SHCPY_arg1", "cxx_addr": "", "cxx_member": "->", "cxx_nonconst_ptr": "arg1", @@ -147,6 +149,7 @@ "cxx_var": "arg1", "data_var": "SHData_arg1", "numpy_type": "NPY_DOUBLE", + "py_ctype": "Py_complex", "py_var": "SHPy_arg1", "size_var": "SHSize_arg1", "stmt0": "py_native_*_inout", diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c index de20d1dad..5e6a9d6a5 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.c +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -49,19 +49,23 @@ PY_accept_double_complex( { // splicer begin function.accept_double_complex double complex arg1; + Py_complex SHCPY_arg1; char *SHT_kwlist[] = { "arg1", NULL }; PyObject * SHPy_arg1 = NULL; if (!PyArg_ParseTupleAndKeywords(args, kwds, - "D:accept_double_complex", SHT_kwlist, &arg1)) + "D:accept_double_complex", SHT_kwlist, &SHCPY_arg1)) return NULL; + // post_parse + arg1 = SHCPY_arg1.real + SHCPY_arg1.imag * I; + accept_double_complex(&arg1); // post_call - SHPy_arg1 = PyComplex_FromDoubles(arg1); + SHPy_arg1 = PyComplex_FromDoubles(creal(arg1), cimag(arg1)); return (PyObject *) SHPy_arg1; // splicer end function.accept_double_complex diff --git a/regression/run/Makefile b/regression/run/Makefile index 1023f071c..3701fab22 100644 --- a/regression/run/Makefile +++ b/regression/run/Makefile @@ -138,6 +138,7 @@ test-python : \ test-python-struct-py-c \ test-python-struct-py-cxx \ test-python-vectors-numpy \ + test-python-ccomplex \ test-python-clibrary \ test-python-cxxlibrary \ test-python-ownership \ diff --git a/regression/run/ccomplex/python/test.py b/regression/run/ccomplex/python/test.py index 218173bba..4663637be 100644 --- a/regression/run/ccomplex/python/test.py +++ b/regression/run/ccomplex/python/test.py @@ -37,6 +37,7 @@ def XXtearDown(self): def test_complex_inout_scalar(self): rv = ccomplex.accept_double_complex(complex(1.0, 2.0)) + self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) @@ -44,7 +45,7 @@ def test_complex_inout_scalar(self): newSuite = unittest.TestSuite() # adding a test case -newSuite.addTest(unittest.makeSuite(Ccomplex)) +newSuite.addTest(unittest.makeSuite(CComplex)) if __name__ == "__main__": unittest.main() diff --git a/shroud/wrapp.py b/shroud/wrapp.py index b168aedfc..47123ddd4 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -14,6 +14,8 @@ Variables prefixes used by generated code: SH_ C or C++ version of argument SHPy_ Python object which corresponds to the argument {py_var} +SHCPy_ Python API variable which corresponds to the argument's py_ctype {ctype_var} + Used with Py_complex. SHTPy_ A temporary object, usually from PyArg_Parse to be converted to SHPy_ object. {pytmp_var} SHData_ Data of NumPy object (fmt.data_var} - intermediate variable @@ -1010,6 +1012,8 @@ def intent_out(self, typemap, intent_blk, fmt): if typemap.PY_ctor: declare = "{PyObject} * {py_var} = {nullptr};" + if typemap.py_ctype: + fmt.ctor_expr = typemap.pytype_to_pyctor.format(ctor_expr=fmt.ctor_expr) ctor = typemap.PY_ctor.format(ctor_expr=fmt.ctor_expr) post_call = "{py_var} = " + ctor + ";" else: @@ -1422,6 +1426,16 @@ def wrap_function(self, cls, node, fileinfo): parse_format.append("&") parse_vargs.append(arg_typemap.PY_from_object) parse_vargs.append("&" + fmt_arg.cxx_var) + elif arg_typemap.py_ctype: + # Python object uses a API type for contents (ex. Py_complex) + fmt_arg.py_ctype = arg_typemap.py_ctype + fmt_arg.ctype_var = "SHCPY_" + fmt_arg.c_var + append_format(declare_code, "{py_ctype} {ctype_var};", fmt_arg) + parse_format.append(arg_typemap.PY_format) + parse_vargs.append("&" + fmt_arg.ctype_var) + fmt_arg.ctype_expr = arg_typemap.pytype_to_cxx.format( + work_var=fmt_arg.ctype_var) + append_format(post_parse_code, "{c_var} = {ctype_expr};", fmt_arg) else: parse_format.append(arg_typemap.PY_format) parse_vargs.append("&" + fmt_arg.c_var) From 1ebf9f3d31a8404c7d0b905d15aa7afbcd79a606 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 16:54:42 -0700 Subject: [PATCH 26/36] Properly name class --- regression/run/clibrary/python/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression/run/clibrary/python/test.py b/regression/run/clibrary/python/test.py index 823f83f6d..a7d0a9e57 100644 --- a/regression/run/clibrary/python/test.py +++ b/regression/run/clibrary/python/test.py @@ -20,7 +20,7 @@ class NotTrue: def __bool__(self): raise NotImplementedError -class Tutorial(unittest.TestCase): +class Clibrary(unittest.TestCase): """Test tutorial problem""" def XXsetUp(self): @@ -92,7 +92,7 @@ def testImpliedBoolFalse(self): newSuite = unittest.TestSuite() # adding a test case -newSuite.addTest(unittest.makeSuite(Tutorial)) +newSuite.addTest(unittest.makeSuite(Clibrary)) if __name__ == "__main__": unittest.main() From fefa0caa17aac812404f3d98ef5097e75c4af060 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 17:01:16 -0700 Subject: [PATCH 27/36] Test complex with Py_BuildValue test accept_double_complex_flag returns two values so it will use Py_BuildValue. Needs work to pass Py_complex to Py_BuildValue. --- regression/input/ccomplex.yaml | 9 ++ regression/reference/ccomplex/ccomplex.json | 112 ++++++++++++++++++ regression/reference/ccomplex/ccomplex.log | 1 + .../reference/ccomplex/pyccomplexmodule.c | 50 ++++++++ regression/run/ccomplex/ccomplex.c | 7 ++ regression/run/ccomplex/ccomplex.h | 2 + regression/run/ccomplex/python/test.py | 6 + 7 files changed, 187 insertions(+) diff --git a/regression/input/ccomplex.yaml b/regression/input/ccomplex.yaml index 40e783349..ea17b550c 100644 --- a/regression/input/ccomplex.yaml +++ b/regression/input/ccomplex.yaml @@ -34,3 +34,12 @@ declarations: options: wrap_python: False - decl: void accept_double_complex(double complex *arg1) + +- decl: void accept_double_complex_flag(double complex *arg1, int *flag +intent(out)) + options: + wrap_c: False + wrap_fortran: False + doxygen: + description: | + Return two values so Py_BuildValue is used. + diff --git a/regression/reference/ccomplex/ccomplex.json b/regression/reference/ccomplex/ccomplex.json index 5e86dde83..c55fb5a77 100644 --- a/regression/reference/ccomplex/ccomplex.json +++ b/regression/reference/ccomplex/ccomplex.json @@ -212,6 +212,118 @@ "underscore_name": "accept_double_complex" }, "options": {} + }, + { + "_fmtargs": { + "arg1": { + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "double complex", + "c_var": "arg1", + "ctor_expr": "creal(arg1), cimag(arg1)", + "ctype_expr": "SHCPY_arg1.real + SHCPY_arg1.imag * I", + "ctype_var": "SHCPY_arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "data_var": "SHData_arg1", + "numpy_type": "NPY_DOUBLE", + "py_ctype": "Py_complex", + "py_var": "SHPy_arg1", + "size_var": "SHSize_arg1", + "stmt0": "py_native_*_inout", + "stmt1": "py_native_*_inout", + "value_var": "SHValue_arg1" + } + }, + "flag": { + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "int", + "c_var": "flag", + "ctor_expr": "flag", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "flag", + "cxx_type": "int", + "cxx_var": "flag", + "data_var": "SHData_flag", + "numpy_type": "NPY_INT", + "py_var": "SHPy_flag", + "size_var": "SHSize_flag", + "stmt0": "py_native_*_out", + "stmt1": "py_native_*_out", + "value_var": "SHValue_flag" + } + } + }, + "ast": { + "declarator": { + "name": "accept_double_complex_flag", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "inout" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "double", + "complex" + ], + "typemap_name": "double_complex" + }, + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "flag", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void accept_double_complex_flag(double complex *arg1, int *flag +intent(out))", + "declgen": "void accept_double_complex_flag(double complex * arg1 +intent(inout), int * flag +intent(out))", + "doxygen": { + "description": "Return two values so Py_BuildValue is used.\n" + }, + "fmtdict": { + "PY_name_impl": "PY_accept_double_complex_flag", + "function_name": "accept_double_complex_flag", + "underscore_name": "accept_double_complex_flag" + }, + "options": { + "wrap_c": false, + "wrap_fortran": false + } } ], "language": "c", diff --git a/regression/reference/ccomplex/ccomplex.log b/regression/reference/ccomplex/ccomplex.log index 4e902c8ba..e80a46c3c 100644 --- a/regression/reference/ccomplex/ccomplex.log +++ b/regression/reference/ccomplex/ccomplex.log @@ -7,6 +7,7 @@ C-interface, Fortran function void accept_float_complex(float complex * arg1 +in C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) Close wrapfccomplex.f Python function void accept_double_complex(double complex * arg1 +intent(inout)) +Python function void accept_double_complex_flag(double complex * arg1 +intent(inout), int * flag +intent(out)) Close pyccomplexmodule.c Close pyccomplexmodule.h Close setup.py diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c index 5e6a9d6a5..a8508be9d 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.c +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -70,9 +70,59 @@ PY_accept_double_complex( return (PyObject *) SHPy_arg1; // splicer end function.accept_double_complex } + +// ---------------------------------------- +// Function: void accept_double_complex_flag +// Exact: py_default +// ---------------------------------------- +// Argument: double complex * arg1 +intent(inout) +// Exact: py_native_*_inout +// ---------------------------------------- +// Argument: int * flag +intent(out) +// Exact: py_native_*_out +static char PY_accept_double_complex_flag__doc__[] = +"documentation" +; + +/** + * Return two values so Py_BuildValue is used. + */ +static PyObject * +PY_accept_double_complex_flag( + PyObject *SHROUD_UNUSED(self), + PyObject *args, + PyObject *kwds) +{ +// splicer begin function.accept_double_complex_flag + double complex arg1; + Py_complex SHCPY_arg1; + int flag; + char *SHT_kwlist[] = { + "arg1", + NULL }; + PyObject *SHTPy_rv = NULL; // return value object + + if (!PyArg_ParseTupleAndKeywords(args, kwds, + "D:accept_double_complex_flag", SHT_kwlist, &SHCPY_arg1)) + return NULL; + + // post_parse + arg1 = SHCPY_arg1.real + SHCPY_arg1.imag * I; + + accept_double_complex_flag(&arg1, &flag); + + // post_call + SHTPy_rv = Py_BuildValue("Di", arg1, flag); + + return SHTPy_rv; +// splicer end function.accept_double_complex_flag +} static PyMethodDef PY_methods[] = { {"accept_double_complex", (PyCFunction)PY_accept_double_complex, METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex__doc__}, +{"accept_double_complex_flag", + (PyCFunction)PY_accept_double_complex_flag, + METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex_flag__doc__}, {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ }; diff --git a/regression/run/ccomplex/ccomplex.c b/regression/run/ccomplex/ccomplex.c index 6042395d0..427480f8f 100644 --- a/regression/run/ccomplex/ccomplex.c +++ b/regression/run/ccomplex/ccomplex.c @@ -24,6 +24,13 @@ void accept_double_complex(double complex *arg1) *arg1 = 3.0 + 4.0 * I; } +// Return two values so Py_BuildValue is used. +void accept_double_complex_flag(double complex *arg1, int *flag) +{ + *arg1 = 3.0 + 4.0 * I; + *flag = 0; +} + //---------------------------------------------------------------------- const char *LastFunctionCalled(void) { diff --git a/regression/run/ccomplex/ccomplex.h b/regression/run/ccomplex/ccomplex.h index 5855e709c..171f965ca 100644 --- a/regression/run/ccomplex/ccomplex.h +++ b/regression/run/ccomplex/ccomplex.h @@ -16,4 +16,6 @@ void accept_float_complex(float complex *arg1); void accept_double_complex(double complex *arg1); +void accept_double_complex_flag(double complex *arg1, int *flag); + #endif // CCOMPLEX_H diff --git a/regression/run/ccomplex/python/test.py b/regression/run/ccomplex/python/test.py index 4663637be..bbb2734af 100644 --- a/regression/run/ccomplex/python/test.py +++ b/regression/run/ccomplex/python/test.py @@ -40,6 +40,12 @@ def test_complex_inout_scalar(self): self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) + def Xtest_complex_inout_scalar_flag(self): + rv, flag = ccomplex.accept_double_complex_flag(complex(1.0, 2.0)) + self.assertIsInstance(rv, complex) + self.assertEqual(complex(3., 4.), rv) + self.assertEqual(0, flag) + # creating a new test suite newSuite = unittest.TestSuite() From 85c6369e4ecf3f06ae00d77c0f14c4ffd824e34b Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 21:13:33 -0700 Subject: [PATCH 28/36] Rename member of BuildTuple from blk to blk0. Only used when there is one return argument. This uses ctor instead of Py_BuildValue. --- shroud/wrapp.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/shroud/wrapp.py b/shroud/wrapp.py index 47123ddd4..b2e5e11df 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -53,9 +53,11 @@ # The value may be built earlier (bool, array), if so ctor will be None. # format - Format arg to PyBuild_Tuple # vargs - Variable for PyBuild_Tuple -# ctor - Code to construct a Python object -# ctorvar - Variable created by ctor -BuildTuple = collections.namedtuple("BuildTuple", "format vargs blk ctorvar") +# blk0 - PyStmts when there is only one return value +# ctorvar - Variable created by blk0 +# This may not be the function return value but may be +# from a single intent(out) argument. +BuildTuple = collections.namedtuple("BuildTuple", "format vargs blk0 ctorvar") # type_object_creation - code to add variables to module. ModuleTuple = collections.namedtuple( @@ -1001,7 +1003,7 @@ def intent_out(self, typemap, intent_blk, fmt): # If post_call is None, the Object has already been created build_format = "O" vargs = fmt.py_var - blk = None + blk0 = None else: # Decide values for Py_BuildValue build_format = typemap.PY_build_format or typemap.PY_format @@ -1022,12 +1024,12 @@ def intent_out(self, typemap, intent_blk, fmt): fmt.vargs = vargs declare = "{PyObject} * {py_var} = {nullptr};" post_call = '{py_var} = Py_BuildValue("{PY_build_format}", {vargs});' - blk = PyStmts( + blk0 = PyStmts( declare=[wformat(declare, fmt)], post_call=[wformat(post_call, fmt)], ) - return BuildTuple(build_format, vargs, blk, fmt.py_var) + return BuildTuple(build_format, vargs, blk0, fmt.py_var) def wrap_functions(self, cls, functions, fileinfo): """Wrap functions for a library or class. @@ -1671,11 +1673,12 @@ def wrap_function(self, cls, node, fileinfo): elif not build_tuples: return_code = "Py_RETURN_NONE;" elif len(build_tuples) == 1: - # return a single object already created in build_stmts - blk = build_tuples[0].blk - if blk is not None: - declare_code.extend(blk.declare) - post_call_code.extend(blk.post_call) + # Return a single object already created in build_tuples + blk0 = build_tuples[0].blk0 + if blk0 is not None: + # Format variables are already expanded in intent_out. + declare_code.extend(blk0.declare) + post_call_code.extend(blk0.post_call) fmt.py_var = build_tuples[0].ctorvar return_code = wformat("return (PyObject *) {py_var};", fmt) else: From cf7f7cfe64860a51252610a3c28dfb2cacbb92b9 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 21:50:21 -0700 Subject: [PATCH 29/36] Return complex with Py_BuildValue Add Typemap.cxx_to_pytype to fill in Py_complex. --- docs/python.rst | 13 ++++++ .../reference/ccomplex/pyccomplexmodule.c | 4 +- regression/reference/none/def_types.yaml | 6 +++ regression/reference/none/none.json | 4 ++ regression/run/ccomplex/python/test.py | 2 +- shroud/typemap.py | 5 +++ shroud/wrapp.py | 43 +++++++++++++------ 7 files changed, 62 insertions(+), 15 deletions(-) diff --git a/docs/python.rst b/docs/python.rst index cc9dc183c..08b58e342 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -145,6 +145,19 @@ Used with complex to convert ``Py_complex`` (defined with *py_ctype*) to C using ``{work_var}.real + {work_var}.imag * I`` or C++ with ``std::complex(\tcvalue.real, cvalue.imag)``. +cxx_to_pytype +^^^^^^^^^^^^^ + +Statements to convert *cxx_var* to *py_ctype*/ +Only needs to be defined when *py_ctype* is defined. + +.. code-block:: yaml + + cxx_to_pytype: | + {ctype_var}.real = creal({cxx_var}); + {ctype_var}.imag = cimag({cxx_var}); + + PYN_descr ^^^^^^^^^ diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c index a8508be9d..35c935557 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.c +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -112,7 +112,9 @@ PY_accept_double_complex_flag( accept_double_complex_flag(&arg1, &flag); // post_call - SHTPy_rv = Py_BuildValue("Di", arg1, flag); + SHCPY_arg1.real = creal(arg1); + SHCPY_arg1.imag = cimag(arg1); + SHTPy_rv = Py_BuildValue("Di", &SHCPY_arg1, flag); return SHTPy_rv; // splicer end function.accept_double_complex_flag diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index 5be1a8e34..340e8e4f8 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -125,6 +125,9 @@ typemap: py_ctype: Py_complex pytype_to_pyctor: creal({ctor_expr}), cimag({ctor_expr}) pytype_to_cxx: "{work_var}.real + {work_var}.imag * I" + cxx_to_pytype: "{ctype_var}.real = creal({cxx_var}); + {ctype_var}.imag = cimag({cxx_var});" + PY_build_arg: &{ctype_var} PYN_typenum: NPY_DOUBLE LUA_type: LUA_TNUMBER LUA_pop: lua_tonumber({LUA_state_var}, {LUA_index}) @@ -176,6 +179,9 @@ typemap: py_ctype: Py_complex pytype_to_pyctor: creal({ctor_expr}), cimag({ctor_expr}) pytype_to_cxx: "{work_var}.real + {work_var}.imag * I" + cxx_to_pytype: "{py_var}.real = creal({cxx_var}); + {py_var}.imag = cimag({cxx_var});" + PY_build_arg: &{ctype_var} PYN_typenum: NPY_DOUBLE LUA_type: LUA_TNUMBER LUA_pop: lua_tonumber({LUA_state_var}, {LUA_index}) diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index 3cdc10e4e..10968642d 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -314,6 +314,7 @@ "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", "LUA_type": "LUA_TNUMBER", "PYN_typenum": "NPY_DOUBLE", + "PY_build_arg": "&{ctype_var}", "PY_ctor": "PyComplex_FromDoubles(\t{ctor_expr})", "PY_format": "D", "PY_get": "PyComplex_AsCComplex({py_var})", @@ -324,6 +325,7 @@ "cxx_header": [ "" ], + "cxx_to_pytype": "{ctype_var}.real = creal({cxx_var});\n{ctype_var}.imag = cimag({cxx_var});", "cxx_type": "std::complex", "f_cast": "cmplx({f_var}, C_DOUBLE_COMPLEX)", "f_kind": "C_DOUBLE_COMPLEX", @@ -367,6 +369,7 @@ "LUA_push": "lua_pushnumber({LUA_state_var}, {c_var})", "LUA_type": "LUA_TNUMBER", "PYN_typenum": "NPY_DOUBLE", + "PY_build_arg": "&{ctype_var}", "PY_ctor": "PyComplex_FromDoubles(\t{ctor_expr})", "PY_format": "D", "PY_get": "PyComplex_AsCComplex({py_var})", @@ -377,6 +380,7 @@ "cxx_header": [ "" ], + "cxx_to_pytype": "{py_var}.real = creal({cxx_var});\n{py_var}.imag = cimag({cxx_var});", "cxx_type": "std::complex", "f_cast": "cmplx({f_var}, C_FLOAT_COMPLEX)", "f_kind": "C_FLOAT_COMPLEX", diff --git a/regression/run/ccomplex/python/test.py b/regression/run/ccomplex/python/test.py index bbb2734af..20b05d15a 100644 --- a/regression/run/ccomplex/python/test.py +++ b/regression/run/ccomplex/python/test.py @@ -40,7 +40,7 @@ def test_complex_inout_scalar(self): self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) - def Xtest_complex_inout_scalar_flag(self): + def test_complex_inout_scalar_flag(self): rv, flag = ccomplex.accept_double_complex_flag(complex(1.0, 2.0)) self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) diff --git a/shroud/typemap.py b/shroud/typemap.py index 637b3c774..2d5b65626 100644 --- a/shroud/typemap.py +++ b/shroud/typemap.py @@ -99,6 +99,7 @@ class Typemap(object): ("py_ctype", None), # returned by Py_get ex. "Py_complex" ("pytype_to_pyctor", None), # Used with py_ctype, passed to PY_ctor ("pytype_to_cxx", None), # Used with py_ctype + ("cxx_to_pytype", None), # Used with py_ctype # Name of converter function with prototype (PyObject *, void *). ("PY_to_object", None), # PyBuild - object=converter(address) ( @@ -665,8 +666,10 @@ def initialize(): py_ctype="Py_complex", pytype_to_pyctor="creal({ctor_expr}), cimag({ctor_expr})", pytype_to_cxx="{work_var}.real + {work_var}.imag * I", + cxx_to_pytype="{py_var}.real = creal({cxx_var});\n{py_var}.imag = cimag({cxx_var});", PY_ctor="PyComplex_FromDoubles(\t{ctor_expr})", PY_get="PyComplex_AsCComplex({py_var})", + PY_build_arg="&{ctype_var}", PYN_typenum="NPY_DOUBLE", LUA_type="LUA_TNUMBER", LUA_pop="lua_tonumber({LUA_state_var}, {LUA_index})", @@ -690,11 +693,13 @@ def initialize(): py_ctype="Py_complex", pytype_to_pyctor="creal({ctor_expr}), cimag({ctor_expr})", pytype_to_cxx="{work_var}.real + {work_var}.imag * I", + cxx_to_pytype="{ctype_var}.real = creal({cxx_var});\n{ctype_var}.imag = cimag({cxx_var});", # fmt.work_ctor = "std::complex(\tcvalue.real, cvalue.imag)" # creal(), cimag() # std::real(), std::imag() # xx.real(), xx.imag() PY_ctor="PyComplex_FromDoubles(\t{ctor_expr})", # double real, double imag + PY_build_arg="&{ctype_var}", PYN_typenum="NPY_DOUBLE", LUA_type="LUA_TNUMBER", LUA_pop="lua_tonumber({LUA_state_var}, {LUA_index})", diff --git a/shroud/wrapp.py b/shroud/wrapp.py index b2e5e11df..3bddf114e 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -50,14 +50,15 @@ # If multiple values are returned, save up into to build a tuple to return. # else build value from ctor, then return ctorvar. -# The value may be built earlier (bool, array), if so ctor will be None. -# format - Format arg to PyBuild_Tuple -# vargs - Variable for PyBuild_Tuple -# blk0 - PyStmts when there is only one return value -# ctorvar - Variable created by blk0 +# The value may be built earlier (bool, array), if so blk0 will be None. +# format - Format arg to PyBuild_Tuple. +# vargs - Variable for PyBuild_Tuple. +# blk0 - PyStmts when there is only one return value. +# blk - PyStmts when there are more than one return value. +# ctorvar - Variable created by blk0. # This may not be the function return value but may be # from a single intent(out) argument. -BuildTuple = collections.namedtuple("BuildTuple", "format vargs blk0 ctorvar") +BuildTuple = collections.namedtuple("BuildTuple", "format vargs blk0 blk ctorvar") # type_object_creation - code to add variables to module. ModuleTuple = collections.namedtuple( @@ -997,6 +998,8 @@ def intent_out(self, typemap, intent_blk, fmt): Return a BuildTuple instance. """ + blk = None + if intent_blk.object_created: # Explicit code exists to create object. # For example, NumPy intent(OUT) arguments as part of pre-call. @@ -1013,23 +1016,31 @@ def intent_out(self, typemap, intent_blk, fmt): vargs = wformat(vargs, fmt) if typemap.PY_ctor: - declare = "{PyObject} * {py_var} = {nullptr};" + declare0 = "{PyObject} * {py_var} = {nullptr};" if typemap.py_ctype: fmt.ctor_expr = typemap.pytype_to_pyctor.format(ctor_expr=fmt.ctor_expr) + + # pointer to build_value + blk = PyStmts( + post_call=[ + wformat(typemap.cxx_to_pytype, fmt), + ] + ) + # fmt_arg.ctype_var = "SHCPY_" + fmt_arg.c_var ctor = typemap.PY_ctor.format(ctor_expr=fmt.ctor_expr) - post_call = "{py_var} = " + ctor + ";" + post_call0 = "{py_var} = " + ctor + ";" else: # ex. long long does not define PY_ctor. fmt.PY_build_format = build_format fmt.vargs = vargs - declare = "{PyObject} * {py_var} = {nullptr};" - post_call = '{py_var} = Py_BuildValue("{PY_build_format}", {vargs});' + declare0 = "{PyObject} * {py_var} = {nullptr};" + post_call0 = '{py_var} = Py_BuildValue("{PY_build_format}", {vargs});' blk0 = PyStmts( - declare=[wformat(declare, fmt)], - post_call=[wformat(post_call, fmt)], + declare=[wformat(declare0, fmt)], + post_call=[wformat(post_call0, fmt)], ) - return BuildTuple(build_format, vargs, blk0, fmt.py_var) + return BuildTuple(build_format, vargs, blk0, blk, fmt.py_var) def wrap_functions(self, cls, functions, fileinfo): """Wrap functions for a library or class. @@ -1685,6 +1696,12 @@ def wrap_function(self, cls, node, fileinfo): # fmt=format for function. Do not use fmt_result here. # There may be no return value, only intent(OUT) arguments. # create tuple object + for blk in build_tuples: + if blk.blk is None: + continue + # Format variables are already expanded in intent_out. + declare_code.extend(blk.blk.declare) + post_call_code.extend(blk.blk.post_call) fmt.PyBuild_format = "".join([ttt.format for ttt in build_tuples]) fmt.PyBuild_vargs = ",\t ".join([ttt.vargs for ttt in build_tuples]) rv_blk = PyStmts( From 7f07aa566fac74e1acac775b0f461c38df19830f Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 22:33:07 -0700 Subject: [PATCH 30/36] Test intent(out) complex --- regression/input/ccomplex.yaml | 8 + regression/reference/ccomplex/ccomplex.json | 290 ++++++++++++++++++ regression/reference/ccomplex/ccomplex.log | 6 + .../reference/ccomplex/pyccomplexmodule.c | 74 +++++ regression/reference/ccomplex/wrapfccomplex.f | 39 +++ regression/run/ccomplex/ccomplex.c | 10 + regression/run/ccomplex/ccomplex.h | 3 + regression/run/ccomplex/main.f | 11 + regression/run/ccomplex/python/test.py | 10 + shroud/wrapp.py | 17 +- 10 files changed, 463 insertions(+), 5 deletions(-) diff --git a/regression/input/ccomplex.yaml b/regression/input/ccomplex.yaml index ea17b550c..255eeccd5 100644 --- a/regression/input/ccomplex.yaml +++ b/regression/input/ccomplex.yaml @@ -34,6 +34,7 @@ declarations: options: wrap_python: False - decl: void accept_double_complex(double complex *arg1) +- decl: void acceptDoubleComplexOutPtr(double complex *arg1 +intent(out)) - decl: void accept_double_complex_flag(double complex *arg1, int *flag +intent(out)) options: @@ -43,3 +44,10 @@ declarations: description: | Return two values so Py_BuildValue is used. +- decl: void acceptDoubleComplexOutPtrFlag( + double complex *arg1 +intent(out), + int *flag +intent(out)) + doxygen: + description: | + Return two values so Py_BuildValue is used. + Creates a Py_complex for intent(out) diff --git a/regression/reference/ccomplex/ccomplex.json b/regression/reference/ccomplex/ccomplex.json index c55fb5a77..29c6e1ef8 100644 --- a/regression/reference/ccomplex/ccomplex.json +++ b/regression/reference/ccomplex/ccomplex.json @@ -213,6 +213,116 @@ }, "options": {} }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "f_intent": "OUT", + "f_type": "complex(C_DOUBLE_COMPLEX)", + "f_var": "arg1", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + }, + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "double complex", + "c_var": "arg1", + "ctor_expr": "creal(arg1), cimag(arg1)", + "ctype_var": "SHCPY_arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "data_var": "SHData_arg1", + "numpy_type": "NPY_DOUBLE", + "py_ctype": "Py_complex", + "py_var": "SHPy_arg1", + "size_var": "SHSize_arg1", + "stmt0": "py_native_*_out", + "stmt1": "py_native_*_out", + "value_var": "SHValue_arg1" + } + } + }, + "ast": { + "declarator": { + "name": "acceptDoubleComplexOutPtr", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "double", + "complex" + ], + "typemap_name": "double_complex" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void acceptDoubleComplexOutPtr(double complex *arg1 +intent(out))", + "declgen": "void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out))", + "fmtdict": { + "C_call_list": "arg1", + "C_name": "acceptDoubleComplexOutPtr", + "C_prototype": "double complex * arg1", + "C_return_type": "void", + "F_C_call": "c_accept_double_complex_out_ptr", + "F_C_name": "accept_double_complex_out_ptr", + "F_arg_c_call": "arg1", + "F_arguments": "arg1", + "F_name_function": "accept_double_complex_out_ptr", + "F_name_generic": "accept_double_complex_out_ptr", + "F_name_impl": "accept_double_complex_out_ptr", + "F_subprogram": "subroutine", + "PY_name_impl": "PY_acceptDoubleComplexOutPtr", + "function_name": "acceptDoubleComplexOutPtr", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "accept_double_complex_out_ptr" + }, + "options": {} + }, { "_fmtargs": { "arg1": { @@ -324,6 +434,186 @@ "wrap_c": false, "wrap_fortran": false } + }, + { + "_fmtargs": { + "arg1": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "idtor": "0", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_arg1", + "c_var": "arg1", + "f_intent": "OUT", + "f_type": "complex(C_DOUBLE_COMPLEX)", + "f_var": "arg1", + "sh_type": "SH_TYPE_DOUBLE_COMPLEX", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + }, + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "double complex", + "c_var": "arg1", + "ctor_expr": "creal(arg1), cimag(arg1)", + "ctype_var": "SHCPY_arg1", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "arg1", + "cxx_type": "std::complex", + "cxx_var": "arg1", + "data_var": "SHData_arg1", + "numpy_type": "NPY_DOUBLE", + "py_ctype": "Py_complex", + "py_var": "SHPy_arg1", + "size_var": "SHSize_arg1", + "stmt0": "py_native_*_out", + "stmt1": "py_native_*_out", + "value_var": "SHValue_arg1" + } + }, + "flag": { + "fmtc": { + "c_addr": "", + "c_const": "", + "c_deref": "*", + "c_member": "->", + "c_var": "flag", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "flag", + "cxx_type": "int", + "cxx_var": "flag", + "idtor": "0", + "sh_type": "SH_TYPE_INT", + "stmt0": "c_native_*_out", + "stmt1": "c_default" + }, + "fmtf": { + "F_pointer": "SHPTR_flag", + "c_var": "flag", + "f_intent": "OUT", + "f_type": "integer(C_INT)", + "f_var": "flag", + "sh_type": "SH_TYPE_INT", + "stmt0": "f_native_*_out", + "stmt1": "f_default", + "stmtc0": "c_native_*_out", + "stmtc1": "c_default" + }, + "fmtpy": { + "array_size": "1", + "c_const": "", + "c_deref": "*", + "c_type": "int", + "c_var": "flag", + "ctor_expr": "flag", + "cxx_addr": "", + "cxx_member": "->", + "cxx_nonconst_ptr": "flag", + "cxx_type": "int", + "cxx_var": "flag", + "data_var": "SHData_flag", + "numpy_type": "NPY_INT", + "py_var": "SHPy_flag", + "size_var": "SHSize_flag", + "stmt0": "py_native_*_out", + "stmt1": "py_native_*_out", + "value_var": "SHValue_flag" + } + } + }, + "ast": { + "declarator": { + "name": "acceptDoubleComplexOutPtrFlag", + "pointer": [] + }, + "params": [ + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "arg1", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "double", + "complex" + ], + "typemap_name": "double_complex" + }, + { + "attrs": { + "intent": "out" + }, + "declarator": { + "name": "flag", + "pointer": [ + { + "ptr": "*" + } + ] + }, + "specifier": [ + "int" + ], + "typemap_name": "int" + } + ], + "specifier": [ + "void" + ], + "typemap_name": "void" + }, + "decl": "void acceptDoubleComplexOutPtrFlag( double complex *arg1 +intent(out), int *flag +intent(out))", + "declgen": "void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out))", + "doxygen": { + "description": "Return two values so Py_BuildValue is used.\nCreates a Py_complex for intent(out)\n" + }, + "fmtdict": { + "C_call_list": "arg1,\t flag", + "C_name": "acceptDoubleComplexOutPtrFlag", + "C_prototype": "double complex * arg1,\t int * flag", + "C_return_type": "void", + "F_C_call": "c_accept_double_complex_out_ptr_flag", + "F_C_name": "accept_double_complex_out_ptr_flag", + "F_arg_c_call": "arg1,\t flag", + "F_arguments": "arg1,\t flag", + "F_name_function": "accept_double_complex_out_ptr_flag", + "F_name_generic": "accept_double_complex_out_ptr_flag", + "F_name_impl": "accept_double_complex_out_ptr_flag", + "F_subprogram": "subroutine", + "PY_name_impl": "PY_acceptDoubleComplexOutPtrFlag", + "function_name": "acceptDoubleComplexOutPtrFlag", + "stmt0": "f_subroutine", + "stmt1": "f_default", + "stmtc0": "c", + "stmtc1": "c_default", + "underscore_name": "accept_double_complex_out_ptr_flag" + }, + "options": {} } ], "language": "c", diff --git a/regression/reference/ccomplex/ccomplex.log b/regression/reference/ccomplex/ccomplex.log index e80a46c3c..ec170da57 100644 --- a/regression/reference/ccomplex/ccomplex.log +++ b/regression/reference/ccomplex/ccomplex.log @@ -1,13 +1,19 @@ Read yaml ccomplex.yaml C function void accept_float_complex(float complex * arg1 +intent(inout)) C function void accept_double_complex(double complex * arg1 +intent(inout)) +C function void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out)) +C function void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out)) Close wrapccomplex.c Close typesccomplex.h C-interface, Fortran function void accept_float_complex(float complex * arg1 +intent(inout)) C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) +C-interface, Fortran function void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out)) +C-interface, Fortran function void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out)) Close wrapfccomplex.f Python function void accept_double_complex(double complex * arg1 +intent(inout)) +Python function void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out)) Python function void accept_double_complex_flag(double complex * arg1 +intent(inout), int * flag +intent(out)) +Python function void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out)) Close pyccomplexmodule.c Close pyccomplexmodule.h Close setup.py diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c index 35c935557..922db991e 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.c +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -71,6 +71,35 @@ PY_accept_double_complex( // splicer end function.accept_double_complex } +// ---------------------------------------- +// Function: void acceptDoubleComplexOutPtr +// Exact: py_default +// ---------------------------------------- +// Argument: double complex * arg1 +intent(out) +// Exact: py_native_*_out +static char PY_acceptDoubleComplexOutPtr__doc__[] = +"documentation" +; + +static PyObject * +PY_acceptDoubleComplexOutPtr( + PyObject *SHROUD_UNUSED(self), + PyObject *SHROUD_UNUSED(args), + PyObject *SHROUD_UNUSED(kwds)) +{ +// splicer begin function.accept_double_complex_out_ptr + double complex arg1; + PyObject * SHPy_arg1 = NULL; + + acceptDoubleComplexOutPtr(&arg1); + + // post_call + SHPy_arg1 = PyComplex_FromDoubles(creal(arg1), cimag(arg1)); + + return (PyObject *) SHPy_arg1; +// splicer end function.accept_double_complex_out_ptr +} + // ---------------------------------------- // Function: void accept_double_complex_flag // Exact: py_default @@ -119,12 +148,57 @@ PY_accept_double_complex_flag( return SHTPy_rv; // splicer end function.accept_double_complex_flag } + +// ---------------------------------------- +// Function: void acceptDoubleComplexOutPtrFlag +// Exact: py_default +// ---------------------------------------- +// Argument: double complex * arg1 +intent(out) +// Exact: py_native_*_out +// ---------------------------------------- +// Argument: int * flag +intent(out) +// Exact: py_native_*_out +static char PY_acceptDoubleComplexOutPtrFlag__doc__[] = +"documentation" +; + +/** + * Return two values so Py_BuildValue is used. + * Creates a Py_complex for intent(out) + */ +static PyObject * +PY_acceptDoubleComplexOutPtrFlag( + PyObject *SHROUD_UNUSED(self), + PyObject *SHROUD_UNUSED(args), + PyObject *SHROUD_UNUSED(kwds)) +{ +// splicer begin function.accept_double_complex_out_ptr_flag + double complex arg1; + int flag; + Py_complex SHCPY_arg1; + PyObject *SHTPy_rv = NULL; // return value object + + acceptDoubleComplexOutPtrFlag(&arg1, &flag); + + // post_call + SHCPY_arg1.real = creal(arg1); + SHCPY_arg1.imag = cimag(arg1); + SHTPy_rv = Py_BuildValue("Di", &SHCPY_arg1, flag); + + return SHTPy_rv; +// splicer end function.accept_double_complex_out_ptr_flag +} static PyMethodDef PY_methods[] = { {"accept_double_complex", (PyCFunction)PY_accept_double_complex, METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex__doc__}, +{"acceptDoubleComplexOutPtr", (PyCFunction)PY_acceptDoubleComplexOutPtr, + METH_NOARGS, PY_acceptDoubleComplexOutPtr__doc__}, {"accept_double_complex_flag", (PyCFunction)PY_accept_double_complex_flag, METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex_flag__doc__}, +{"acceptDoubleComplexOutPtrFlag", + (PyCFunction)PY_acceptDoubleComplexOutPtrFlag, METH_NOARGS, + PY_acceptDoubleComplexOutPtrFlag__doc__}, {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ }; diff --git a/regression/reference/ccomplex/wrapfccomplex.f b/regression/reference/ccomplex/wrapfccomplex.f index 26113fe74..ec75e71a6 100644 --- a/regression/reference/ccomplex/wrapfccomplex.f +++ b/regression/reference/ccomplex/wrapfccomplex.f @@ -54,6 +54,45 @@ subroutine accept_double_complex(arg1) & end subroutine accept_double_complex end interface + ! ---------------------------------------- + ! Function: void acceptDoubleComplexOutPtr + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: double complex * arg1 +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + interface + subroutine accept_double_complex_out_ptr(arg1) & + bind(C, name="acceptDoubleComplexOutPtr") + use iso_c_binding, only : C_DOUBLE_COMPLEX + implicit none + complex(C_DOUBLE_COMPLEX), intent(OUT) :: arg1 + end subroutine accept_double_complex_out_ptr + end interface + + ! ---------------------------------------- + ! Function: void acceptDoubleComplexOutPtrFlag + ! Requested: c_void_scalar_result + ! Match: c_default + ! ---------------------------------------- + ! Argument: double complex * arg1 +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + ! ---------------------------------------- + ! Argument: int * flag +intent(out) + ! Requested: c_native_*_out + ! Match: c_default + interface + subroutine accept_double_complex_out_ptr_flag(arg1, flag) & + bind(C, name="acceptDoubleComplexOutPtrFlag") + use iso_c_binding, only : C_DOUBLE_COMPLEX, C_INT + implicit none + complex(C_DOUBLE_COMPLEX), intent(OUT) :: arg1 + integer(C_INT), intent(OUT) :: flag + end subroutine accept_double_complex_out_ptr_flag + end interface + interface ! splicer begin additional_interfaces ! splicer end additional_interfaces diff --git a/regression/run/ccomplex/ccomplex.c b/regression/run/ccomplex/ccomplex.c index 427480f8f..596bdd080 100644 --- a/regression/run/ccomplex/ccomplex.c +++ b/regression/run/ccomplex/ccomplex.c @@ -24,12 +24,22 @@ void accept_double_complex(double complex *arg1) *arg1 = 3.0 + 4.0 * I; } +void acceptDoubleComplexOutPtr(double complex *arg1) +{ + *arg1 = 3.0 + 4.0 * I; +} + // Return two values so Py_BuildValue is used. void accept_double_complex_flag(double complex *arg1, int *flag) { *arg1 = 3.0 + 4.0 * I; *flag = 0; } +void acceptDoubleComplexOutPtrFlag(double complex *arg1, int *flag) +{ + *arg1 = 3.0 + 4.0 * I; + *flag = 0; +} //---------------------------------------------------------------------- const char *LastFunctionCalled(void) diff --git a/regression/run/ccomplex/ccomplex.h b/regression/run/ccomplex/ccomplex.h index 171f965ca..26c109ebc 100644 --- a/regression/run/ccomplex/ccomplex.h +++ b/regression/run/ccomplex/ccomplex.h @@ -14,8 +14,11 @@ #include void accept_float_complex(float complex *arg1); + void accept_double_complex(double complex *arg1); +void acceptDoubleComplexOutPtr(double complex *arg1); void accept_double_complex_flag(double complex *arg1, int *flag); +void acceptDoubleComplexOutPtrFlag(double complex *arg1, int *flag); #endif // CCOMPLEX_H diff --git a/regression/run/ccomplex/main.f b/regression/run/ccomplex/main.f index a9eedf41c..ccdad9d49 100644 --- a/regression/run/ccomplex/main.f +++ b/regression/run/ccomplex/main.f @@ -30,6 +30,7 @@ program tester contains subroutine test_complex + integer(C_INT) flag complex(C_FLOAT_COMPLEX) c4 complex(C_DOUBLE_COMPLEX) c8 @@ -44,6 +45,16 @@ subroutine test_complex call accept_double_complex(c8) call assert_equals(3.0d0, real(c8), "accept_double_complex") call assert_equals(4.0d0, imag(c8), "accept_double_complex") + + call accept_double_complex_out_ptr(c8) + call assert_equals(3.0d0, real(c8), "acceptDoubleComplexOutPtr") + call assert_equals(4.0d0, imag(c8), "acceptDoubleComplexOutPtr") + + call accept_double_complex_out_ptr_flag(c8, flag) + call assert_equals(3.0d0, real(c8), "acceptDoubleComplexOutPtr") + call assert_equals(4.0d0, imag(c8), "acceptDoubleComplexOutPtr") + call assert_equals(0, flag, "acceptDoubleComplexOutPtr") + end subroutine test_complex end program tester diff --git a/regression/run/ccomplex/python/test.py b/regression/run/ccomplex/python/test.py index 20b05d15a..004562dcf 100644 --- a/regression/run/ccomplex/python/test.py +++ b/regression/run/ccomplex/python/test.py @@ -40,12 +40,22 @@ def test_complex_inout_scalar(self): self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) + def test_acceptDoubleComplexOutPtr(self): + rv = ccomplex.acceptDoubleComplexOutPtr() + self.assertIsInstance(rv, complex) + self.assertEqual(complex(3., 4.), rv) + def test_complex_inout_scalar_flag(self): rv, flag = ccomplex.accept_double_complex_flag(complex(1.0, 2.0)) self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) self.assertEqual(0, flag) + def test_acceptDoubleComplexOutPtrFlag(self): + rv, flag = ccomplex.acceptDoubleComplexOutPtrFlag() + self.assertIsInstance(rv, complex) + self.assertEqual(complex(3., 4.), rv) + self.assertEqual(0, flag) # creating a new test suite newSuite = unittest.TestSuite() diff --git a/shroud/wrapp.py b/shroud/wrapp.py index 3bddf114e..0d54de882 100644 --- a/shroud/wrapp.py +++ b/shroud/wrapp.py @@ -149,6 +149,7 @@ def wrap_library(self): fmt_library.PY_used_param_kwds = False fmt_library.PY_member_object = "XXXPY_member_object" fmt_library.PY_member_data = "XXXPY_member_data" + fmt_library.py_ctype = None fmt_library.npy_rank = "0" # number of dimensions fmt_library.npy_dims_var = fmt_library.nullptr # shape variable @@ -1013,24 +1014,30 @@ def intent_out(self, typemap, intent_blk, fmt): vargs = typemap.PY_build_arg if not vargs: vargs = "{cxx_var}" - vargs = wformat(vargs, fmt) if typemap.PY_ctor: - declare0 = "{PyObject} * {py_var} = {nullptr};" if typemap.py_ctype: fmt.ctor_expr = typemap.pytype_to_pyctor.format(ctor_expr=fmt.ctor_expr) - - # pointer to build_value + if fmt.py_ctype is None: + # Declare variable unless already declared by intent(inout) + fmt.py_ctype = typemap.py_ctype + fmt.ctype_var = "SHCPY_" + fmt.c_var + declare = [wformat("{py_ctype} {ctype_var};", fmt)] + else: + declare = [] blk = PyStmts( + declare=declare, post_call=[ wformat(typemap.cxx_to_pytype, fmt), ] ) - # fmt_arg.ctype_var = "SHCPY_" + fmt_arg.c_var + vargs = wformat(vargs, fmt) ctor = typemap.PY_ctor.format(ctor_expr=fmt.ctor_expr) + declare0 = "{PyObject} * {py_var} = {nullptr};" post_call0 = "{py_var} = " + ctor + ";" else: # ex. long long does not define PY_ctor. + vargs = wformat(vargs, fmt) fmt.PY_build_format = build_format fmt.vargs = vargs declare0 = "{PyObject} * {py_var} = {nullptr};" From 855b509c4b0ef3ecc193eb6de7e2f8d23e8f133e Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 22:55:24 -0700 Subject: [PATCH 31/36] Rename ccomplex tests to consistent patterns --- regression/input/ccomplex.yaml | 6 +- regression/reference/ccomplex/ccomplex.json | 58 +++++++++---------- regression/reference/ccomplex/ccomplex.log | 12 ++-- .../reference/ccomplex/pyccomplexmodule.c | 40 +++++++------ regression/reference/ccomplex/wrapfccomplex.f | 16 ++--- regression/run/ccomplex/ccomplex.c | 6 +- regression/run/ccomplex/ccomplex.h | 6 +- regression/run/ccomplex/main.f | 12 ++-- regression/run/ccomplex/python/test.py | 8 +-- 9 files changed, 83 insertions(+), 81 deletions(-) diff --git a/regression/input/ccomplex.yaml b/regression/input/ccomplex.yaml index 255eeccd5..374a6a12e 100644 --- a/regression/input/ccomplex.yaml +++ b/regression/input/ccomplex.yaml @@ -30,13 +30,13 @@ options: declarations: ###################################################################### -- decl: void accept_float_complex(float complex *arg1) +- decl: void acceptFloatComplexInoutPtr(float complex *arg1) options: wrap_python: False -- decl: void accept_double_complex(double complex *arg1) +- decl: void acceptDoubleComplexInoutPtr(double complex *arg1) - decl: void acceptDoubleComplexOutPtr(double complex *arg1 +intent(out)) -- decl: void accept_double_complex_flag(double complex *arg1, int *flag +intent(out)) +- decl: void acceptDoubleComplexInoutPtrFlag(double complex *arg1, int *flag +intent(out)) options: wrap_c: False wrap_fortran: False diff --git a/regression/reference/ccomplex/ccomplex.json b/regression/reference/ccomplex/ccomplex.json index 29c6e1ef8..7539de164 100644 --- a/regression/reference/ccomplex/ccomplex.json +++ b/regression/reference/ccomplex/ccomplex.json @@ -48,7 +48,7 @@ }, "ast": { "declarator": { - "name": "accept_float_complex", + "name": "acceptFloatComplexInoutPtr", "pointer": [] }, "params": [ @@ -76,27 +76,27 @@ ], "typemap_name": "void" }, - "decl": "void accept_float_complex(float complex *arg1)", - "declgen": "void accept_float_complex(float complex * arg1 +intent(inout))", + "decl": "void acceptFloatComplexInoutPtr(float complex *arg1)", + "declgen": "void acceptFloatComplexInoutPtr(float complex * arg1 +intent(inout))", "fmtdict": { "C_call_list": "arg1", - "C_name": "accept_float_complex", + "C_name": "acceptFloatComplexInoutPtr", "C_prototype": "float complex * arg1", "C_return_type": "void", - "F_C_call": "c_accept_float_complex", - "F_C_name": "accept_float_complex", + "F_C_call": "c_accept_float_complex_inout_ptr", + "F_C_name": "accept_float_complex_inout_ptr", "F_arg_c_call": "arg1", "F_arguments": "arg1", - "F_name_function": "accept_float_complex", - "F_name_generic": "accept_float_complex", - "F_name_impl": "accept_float_complex", + "F_name_function": "accept_float_complex_inout_ptr", + "F_name_generic": "accept_float_complex_inout_ptr", + "F_name_impl": "accept_float_complex_inout_ptr", "F_subprogram": "subroutine", - "function_name": "accept_float_complex", + "function_name": "acceptFloatComplexInoutPtr", "stmt0": "f_subroutine", "stmt1": "f_default", "stmtc0": "c", "stmtc1": "c_default", - "underscore_name": "accept_float_complex" + "underscore_name": "accept_float_complex_inout_ptr" }, "options": { "wrap_python": false @@ -160,7 +160,7 @@ }, "ast": { "declarator": { - "name": "accept_double_complex", + "name": "acceptDoubleComplexInoutPtr", "pointer": [] }, "params": [ @@ -188,28 +188,28 @@ ], "typemap_name": "void" }, - "decl": "void accept_double_complex(double complex *arg1)", - "declgen": "void accept_double_complex(double complex * arg1 +intent(inout))", + "decl": "void acceptDoubleComplexInoutPtr(double complex *arg1)", + "declgen": "void acceptDoubleComplexInoutPtr(double complex * arg1 +intent(inout))", "fmtdict": { "C_call_list": "arg1", - "C_name": "accept_double_complex", + "C_name": "acceptDoubleComplexInoutPtr", "C_prototype": "double complex * arg1", "C_return_type": "void", - "F_C_call": "c_accept_double_complex", - "F_C_name": "accept_double_complex", + "F_C_call": "c_accept_double_complex_inout_ptr", + "F_C_name": "accept_double_complex_inout_ptr", "F_arg_c_call": "arg1", "F_arguments": "arg1", - "F_name_function": "accept_double_complex", - "F_name_generic": "accept_double_complex", - "F_name_impl": "accept_double_complex", + "F_name_function": "accept_double_complex_inout_ptr", + "F_name_generic": "accept_double_complex_inout_ptr", + "F_name_impl": "accept_double_complex_inout_ptr", "F_subprogram": "subroutine", - "PY_name_impl": "PY_accept_double_complex", - "function_name": "accept_double_complex", + "PY_name_impl": "PY_acceptDoubleComplexInoutPtr", + "function_name": "acceptDoubleComplexInoutPtr", "stmt0": "f_subroutine", "stmt1": "f_default", "stmtc0": "c", "stmtc1": "c_default", - "underscore_name": "accept_double_complex" + "underscore_name": "accept_double_complex_inout_ptr" }, "options": {} }, @@ -375,7 +375,7 @@ }, "ast": { "declarator": { - "name": "accept_double_complex_flag", + "name": "acceptDoubleComplexInoutPtrFlag", "pointer": [] }, "params": [ @@ -420,15 +420,15 @@ ], "typemap_name": "void" }, - "decl": "void accept_double_complex_flag(double complex *arg1, int *flag +intent(out))", - "declgen": "void accept_double_complex_flag(double complex * arg1 +intent(inout), int * flag +intent(out))", + "decl": "void acceptDoubleComplexInoutPtrFlag(double complex *arg1, int *flag +intent(out))", + "declgen": "void acceptDoubleComplexInoutPtrFlag(double complex * arg1 +intent(inout), int * flag +intent(out))", "doxygen": { "description": "Return two values so Py_BuildValue is used.\n" }, "fmtdict": { - "PY_name_impl": "PY_accept_double_complex_flag", - "function_name": "accept_double_complex_flag", - "underscore_name": "accept_double_complex_flag" + "PY_name_impl": "PY_acceptDoubleComplexInoutPtrFlag", + "function_name": "acceptDoubleComplexInoutPtrFlag", + "underscore_name": "accept_double_complex_inout_ptr_flag" }, "options": { "wrap_c": false, diff --git a/regression/reference/ccomplex/ccomplex.log b/regression/reference/ccomplex/ccomplex.log index ec170da57..9ed6ace2c 100644 --- a/regression/reference/ccomplex/ccomplex.log +++ b/regression/reference/ccomplex/ccomplex.log @@ -1,18 +1,18 @@ Read yaml ccomplex.yaml -C function void accept_float_complex(float complex * arg1 +intent(inout)) -C function void accept_double_complex(double complex * arg1 +intent(inout)) +C function void acceptFloatComplexInoutPtr(float complex * arg1 +intent(inout)) +C function void acceptDoubleComplexInoutPtr(double complex * arg1 +intent(inout)) C function void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out)) C function void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out)) Close wrapccomplex.c Close typesccomplex.h -C-interface, Fortran function void accept_float_complex(float complex * arg1 +intent(inout)) -C-interface, Fortran function void accept_double_complex(double complex * arg1 +intent(inout)) +C-interface, Fortran function void acceptFloatComplexInoutPtr(float complex * arg1 +intent(inout)) +C-interface, Fortran function void acceptDoubleComplexInoutPtr(double complex * arg1 +intent(inout)) C-interface, Fortran function void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out)) C-interface, Fortran function void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out)) Close wrapfccomplex.f -Python function void accept_double_complex(double complex * arg1 +intent(inout)) +Python function void acceptDoubleComplexInoutPtr(double complex * arg1 +intent(inout)) Python function void acceptDoubleComplexOutPtr(double complex * arg1 +intent(out)) -Python function void accept_double_complex_flag(double complex * arg1 +intent(inout), int * flag +intent(out)) +Python function void acceptDoubleComplexInoutPtrFlag(double complex * arg1 +intent(inout), int * flag +intent(out)) Python function void acceptDoubleComplexOutPtrFlag(double complex * arg1 +intent(out), int * flag +intent(out)) Close pyccomplexmodule.c Close pyccomplexmodule.h diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c index 922db991e..c40cb802c 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.c +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -32,22 +32,22 @@ PyObject *PY_error_obj; // splicer end additional_functions // ---------------------------------------- -// Function: void accept_double_complex +// Function: void acceptDoubleComplexInoutPtr // Exact: py_default // ---------------------------------------- // Argument: double complex * arg1 +intent(inout) // Exact: py_native_*_inout -static char PY_accept_double_complex__doc__[] = +static char PY_acceptDoubleComplexInoutPtr__doc__[] = "documentation" ; static PyObject * -PY_accept_double_complex( +PY_acceptDoubleComplexInoutPtr( PyObject *SHROUD_UNUSED(self), PyObject *args, PyObject *kwds) { -// splicer begin function.accept_double_complex +// splicer begin function.accept_double_complex_inout_ptr double complex arg1; Py_complex SHCPY_arg1; char *SHT_kwlist[] = { @@ -56,19 +56,19 @@ PY_accept_double_complex( PyObject * SHPy_arg1 = NULL; if (!PyArg_ParseTupleAndKeywords(args, kwds, - "D:accept_double_complex", SHT_kwlist, &SHCPY_arg1)) + "D:acceptDoubleComplexInoutPtr", SHT_kwlist, &SHCPY_arg1)) return NULL; // post_parse arg1 = SHCPY_arg1.real + SHCPY_arg1.imag * I; - accept_double_complex(&arg1); + acceptDoubleComplexInoutPtr(&arg1); // post_call SHPy_arg1 = PyComplex_FromDoubles(creal(arg1), cimag(arg1)); return (PyObject *) SHPy_arg1; -// splicer end function.accept_double_complex +// splicer end function.accept_double_complex_inout_ptr } // ---------------------------------------- @@ -101,7 +101,7 @@ PY_acceptDoubleComplexOutPtr( } // ---------------------------------------- -// Function: void accept_double_complex_flag +// Function: void acceptDoubleComplexInoutPtrFlag // Exact: py_default // ---------------------------------------- // Argument: double complex * arg1 +intent(inout) @@ -109,7 +109,7 @@ PY_acceptDoubleComplexOutPtr( // ---------------------------------------- // Argument: int * flag +intent(out) // Exact: py_native_*_out -static char PY_accept_double_complex_flag__doc__[] = +static char PY_acceptDoubleComplexInoutPtrFlag__doc__[] = "documentation" ; @@ -117,12 +117,12 @@ static char PY_accept_double_complex_flag__doc__[] = * Return two values so Py_BuildValue is used. */ static PyObject * -PY_accept_double_complex_flag( +PY_acceptDoubleComplexInoutPtrFlag( PyObject *SHROUD_UNUSED(self), PyObject *args, PyObject *kwds) { -// splicer begin function.accept_double_complex_flag +// splicer begin function.accept_double_complex_inout_ptr_flag double complex arg1; Py_complex SHCPY_arg1; int flag; @@ -132,13 +132,13 @@ PY_accept_double_complex_flag( PyObject *SHTPy_rv = NULL; // return value object if (!PyArg_ParseTupleAndKeywords(args, kwds, - "D:accept_double_complex_flag", SHT_kwlist, &SHCPY_arg1)) + "D:acceptDoubleComplexInoutPtrFlag", SHT_kwlist, &SHCPY_arg1)) return NULL; // post_parse arg1 = SHCPY_arg1.real + SHCPY_arg1.imag * I; - accept_double_complex_flag(&arg1, &flag); + acceptDoubleComplexInoutPtrFlag(&arg1, &flag); // post_call SHCPY_arg1.real = creal(arg1); @@ -146,7 +146,7 @@ PY_accept_double_complex_flag( SHTPy_rv = Py_BuildValue("Di", &SHCPY_arg1, flag); return SHTPy_rv; -// splicer end function.accept_double_complex_flag +// splicer end function.accept_double_complex_inout_ptr_flag } // ---------------------------------------- @@ -189,13 +189,15 @@ PY_acceptDoubleComplexOutPtrFlag( // splicer end function.accept_double_complex_out_ptr_flag } static PyMethodDef PY_methods[] = { -{"accept_double_complex", (PyCFunction)PY_accept_double_complex, - METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex__doc__}, +{"acceptDoubleComplexInoutPtr", + (PyCFunction)PY_acceptDoubleComplexInoutPtr, + METH_VARARGS|METH_KEYWORDS, PY_acceptDoubleComplexInoutPtr__doc__}, {"acceptDoubleComplexOutPtr", (PyCFunction)PY_acceptDoubleComplexOutPtr, METH_NOARGS, PY_acceptDoubleComplexOutPtr__doc__}, -{"accept_double_complex_flag", - (PyCFunction)PY_accept_double_complex_flag, - METH_VARARGS|METH_KEYWORDS, PY_accept_double_complex_flag__doc__}, +{"acceptDoubleComplexInoutPtrFlag", + (PyCFunction)PY_acceptDoubleComplexInoutPtrFlag, + METH_VARARGS|METH_KEYWORDS, + PY_acceptDoubleComplexInoutPtrFlag__doc__}, {"acceptDoubleComplexOutPtrFlag", (PyCFunction)PY_acceptDoubleComplexOutPtrFlag, METH_NOARGS, PY_acceptDoubleComplexOutPtrFlag__doc__}, diff --git a/regression/reference/ccomplex/wrapfccomplex.f b/regression/reference/ccomplex/wrapfccomplex.f index ec75e71a6..e95f40f96 100644 --- a/regression/reference/ccomplex/wrapfccomplex.f +++ b/regression/reference/ccomplex/wrapfccomplex.f @@ -21,7 +21,7 @@ module ccomplex_mod ! splicer end module_top ! ---------------------------------------- - ! Function: void accept_float_complex + ! Function: void acceptFloatComplexInoutPtr ! Requested: c_void_scalar_result ! Match: c_default ! ---------------------------------------- @@ -29,16 +29,16 @@ module ccomplex_mod ! Requested: c_native_*_inout ! Match: c_default interface - subroutine accept_float_complex(arg1) & - bind(C, name="accept_float_complex") + subroutine accept_float_complex_inout_ptr(arg1) & + bind(C, name="acceptFloatComplexInoutPtr") use iso_c_binding, only : C_FLOAT_COMPLEX implicit none complex(C_FLOAT_COMPLEX), intent(INOUT) :: arg1 - end subroutine accept_float_complex + end subroutine accept_float_complex_inout_ptr end interface ! ---------------------------------------- - ! Function: void accept_double_complex + ! Function: void acceptDoubleComplexInoutPtr ! Requested: c_void_scalar_result ! Match: c_default ! ---------------------------------------- @@ -46,12 +46,12 @@ end subroutine accept_float_complex ! Requested: c_native_*_inout ! Match: c_default interface - subroutine accept_double_complex(arg1) & - bind(C, name="accept_double_complex") + subroutine accept_double_complex_inout_ptr(arg1) & + bind(C, name="acceptDoubleComplexInoutPtr") use iso_c_binding, only : C_DOUBLE_COMPLEX implicit none complex(C_DOUBLE_COMPLEX), intent(INOUT) :: arg1 - end subroutine accept_double_complex + end subroutine accept_double_complex_inout_ptr end interface ! ---------------------------------------- diff --git a/regression/run/ccomplex/ccomplex.c b/regression/run/ccomplex/ccomplex.c index 596bdd080..a7fba798a 100644 --- a/regression/run/ccomplex/ccomplex.c +++ b/regression/run/ccomplex/ccomplex.c @@ -15,11 +15,11 @@ static char last_function_called[MAXLAST]; //---------------------------------------------------------------------- -void accept_float_complex(float complex *arg1) +void acceptFloatComplexInoutPtr(float complex *arg1) { *arg1 = 3.0 + 4.0 * I; } -void accept_double_complex(double complex *arg1) +void acceptDoubleComplexInoutPtr(double complex *arg1) { *arg1 = 3.0 + 4.0 * I; } @@ -30,7 +30,7 @@ void acceptDoubleComplexOutPtr(double complex *arg1) } // Return two values so Py_BuildValue is used. -void accept_double_complex_flag(double complex *arg1, int *flag) +void acceptDoubleComplexInoutPtrFlag(double complex *arg1, int *flag) { *arg1 = 3.0 + 4.0 * I; *flag = 0; diff --git a/regression/run/ccomplex/ccomplex.h b/regression/run/ccomplex/ccomplex.h index 26c109ebc..6ebb9ff7e 100644 --- a/regression/run/ccomplex/ccomplex.h +++ b/regression/run/ccomplex/ccomplex.h @@ -13,12 +13,12 @@ #include -void accept_float_complex(float complex *arg1); +void acceptFloatComplexInoutPtr(float complex *arg1); -void accept_double_complex(double complex *arg1); +void acceptDoubleComplexInoutPtr(double complex *arg1); void acceptDoubleComplexOutPtr(double complex *arg1); -void accept_double_complex_flag(double complex *arg1, int *flag); +void acceptDoubleComplexInoutPtrFlag(double complex *arg1, int *flag); void acceptDoubleComplexOutPtrFlag(double complex *arg1, int *flag); #endif // CCOMPLEX_H diff --git a/regression/run/ccomplex/main.f b/regression/run/ccomplex/main.f index ccdad9d49..82caa4b24 100644 --- a/regression/run/ccomplex/main.f +++ b/regression/run/ccomplex/main.f @@ -36,15 +36,15 @@ subroutine test_complex ! intent(INOUT) argument c4 = (1.0, 2.0) - call accept_float_complex(c4) - call assert_equals(3.0, real(c4), "accept_float_complex") - call assert_equals(4.0, imag(c4), "accept_float_complex") + call accept_float_complex_inout_ptr(c4) + call assert_equals(3.0, real(c4), "acceptFloatComplexInoutPtr") + call assert_equals(4.0, imag(c4), "acceptFloatComplexInoutPtr") ! intent(INOUT) argument c8 = (1.0d0, 2.0d0) - call accept_double_complex(c8) - call assert_equals(3.0d0, real(c8), "accept_double_complex") - call assert_equals(4.0d0, imag(c8), "accept_double_complex") + call accept_double_complex_inout_ptr(c8) + call assert_equals(3.0d0, real(c8), "acceptDoubleComplexInoutPtr") + call assert_equals(4.0d0, imag(c8), "acceptDoubleComplexInoutPtr") call accept_double_complex_out_ptr(c8) call assert_equals(3.0d0, real(c8), "acceptDoubleComplexOutPtr") diff --git a/regression/run/ccomplex/python/test.py b/regression/run/ccomplex/python/test.py index 004562dcf..a965ab495 100644 --- a/regression/run/ccomplex/python/test.py +++ b/regression/run/ccomplex/python/test.py @@ -35,8 +35,8 @@ def XXtearDown(self): ## do something... print("FooTest:tearDown_:end") - def test_complex_inout_scalar(self): - rv = ccomplex.accept_double_complex(complex(1.0, 2.0)) + def test_acceptDoubleComplexInoutPtr(self): + rv = ccomplex.acceptDoubleComplexInoutPtr(complex(1.0, 2.0)) self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) @@ -45,8 +45,8 @@ def test_acceptDoubleComplexOutPtr(self): self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) - def test_complex_inout_scalar_flag(self): - rv, flag = ccomplex.accept_double_complex_flag(complex(1.0, 2.0)) + def test_acceptDoubleComplexInoutPtrFlag(self): + rv, flag = ccomplex.acceptDoubleComplexInoutPtrFlag(complex(1.0, 2.0)) self.assertIsInstance(rv, complex) self.assertEqual(complex(3., 4.), rv) self.assertEqual(0, flag) From 03ba0c63de1d35f6648561c2e12b6b296c37728f Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 22:57:45 -0700 Subject: [PATCH 32/36] Properly name test class --- regression/run/strings/python/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression/run/strings/python/test.py b/regression/run/strings/python/test.py index 0a50d44c8..a32100f5a 100644 --- a/regression/run/strings/python/test.py +++ b/regression/run/strings/python/test.py @@ -21,7 +21,7 @@ class NotTrue: def __bool__(self): raise NotImplementedError -class Tutorial(unittest.TestCase): +class Strings(unittest.TestCase): """Test tutorial problem""" def XXsetUp(self): @@ -132,7 +132,7 @@ def testCreturnChar(self): newSuite = unittest.TestSuite() # adding a test case -newSuite.addTest(unittest.makeSuite(Tutorial)) +newSuite.addTest(unittest.makeSuite(Strings)) if __name__ == "__main__": unittest.main() From 3d6a3fc3562b6f38813dc9d49d977dd6b4e2bac2 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Mon, 3 Aug 2020 23:13:32 -0700 Subject: [PATCH 33/36] Setup to add complex array --- regression/input/ccomplex.yaml | 8 ++++++++ regression/run/ccomplex/ccomplex.c | 7 +++++++ regression/run/ccomplex/ccomplex.h | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/regression/input/ccomplex.yaml b/regression/input/ccomplex.yaml index 374a6a12e..56425ae73 100644 --- a/regression/input/ccomplex.yaml +++ b/regression/input/ccomplex.yaml @@ -51,3 +51,11 @@ declarations: description: | Return two values so Py_BuildValue is used. Creates a Py_complex for intent(out) + +###################################################################### + +#- decl: void acceptDoubleComplexInoutArrayList( +# double complex *arg1 +rank(1), +# int narg +implied(size(arg1))) +# options: +# PY_array_arg: list diff --git a/regression/run/ccomplex/ccomplex.c b/regression/run/ccomplex/ccomplex.c index a7fba798a..d1842c69e 100644 --- a/regression/run/ccomplex/ccomplex.c +++ b/regression/run/ccomplex/ccomplex.c @@ -41,6 +41,13 @@ void acceptDoubleComplexOutPtrFlag(double complex *arg1, int *flag) *flag = 0; } +//---------------------------------------------------------------------- + +void acceptDoubleComplexInoutArrayList(double complex *arg1, int narg) +{ + *arg1 = 3.0 + 4.0 * I; +} + //---------------------------------------------------------------------- const char *LastFunctionCalled(void) { diff --git a/regression/run/ccomplex/ccomplex.h b/regression/run/ccomplex/ccomplex.h index 6ebb9ff7e..fe3e095b0 100644 --- a/regression/run/ccomplex/ccomplex.h +++ b/regression/run/ccomplex/ccomplex.h @@ -21,4 +21,8 @@ void acceptDoubleComplexOutPtr(double complex *arg1); void acceptDoubleComplexInoutPtrFlag(double complex *arg1, int *flag); void acceptDoubleComplexOutPtrFlag(double complex *arg1, int *flag); +//---------------------------------------------------------------------- + +void acceptDoubleComplexInoutArrayList(double complex *arg1, int narg) + #endif // CCOMPLEX_H From e892c1160d6caed5d01c8958b74f1e45ad083b39 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Tue, 4 Aug 2020 12:49:17 -0700 Subject: [PATCH 34/36] Add command line option --write-version and corresponding --nowrite-version. Do not write the version into every generated reference file to avoid updating 100's of files when the version changes. none.yaml test still prints the version to make it still works. --- docs/reference.rst | 6 +++++ regression/do-test.py | 3 +++ .../reference/arrayclass/arrayclass.json | 2 +- .../arrayclass/arrayclass_types.yaml | 2 +- .../arrayclass/pyArrayWrappertype.cpp | 2 +- .../arrayclass/pyarrayclassmodule.cpp | 2 +- .../arrayclass/pyarrayclassmodule.hpp | 2 +- .../reference/arrayclass/pyarrayclassutil.cpp | 2 +- regression/reference/arrayclass/setup.py | 2 +- .../reference/arrayclass/typesarrayclass.h | 2 +- .../reference/arrayclass/wrapArrayWrapper.cpp | 2 +- .../reference/arrayclass/wrapArrayWrapper.h | 2 +- .../reference/arrayclass/wraparrayclass.cpp | 2 +- .../reference/arrayclass/wrapfarrayclass.f | 2 +- regression/reference/ccomplex/ccomplex.json | 2 +- .../reference/ccomplex/pyccomplexmodule.c | 2 +- .../reference/ccomplex/pyccomplexmodule.h | 2 +- regression/reference/ccomplex/setup.py | 2 +- regression/reference/ccomplex/typesccomplex.h | 2 +- regression/reference/ccomplex/wrapccomplex.c | 2 +- regression/reference/ccomplex/wrapfccomplex.f | 2 +- regression/reference/cdesc/cdesc.json | 2 +- regression/reference/cdesc/typescdesc.h | 2 +- regression/reference/cdesc/wrapcdesc.cpp | 2 +- regression/reference/cdesc/wrapcdesc.h | 2 +- regression/reference/cdesc/wrapfcdesc.f | 2 +- regression/reference/classes/classes.json | 2 +- .../reference/classes/classes_types.yaml | 2 +- regression/reference/classes/pyClass1type.cpp | 2 +- regression/reference/classes/pyClass2type.cpp | 2 +- .../reference/classes/pySingletontype.cpp | 2 +- .../reference/classes/pyclassesmodule.cpp | 2 +- .../reference/classes/pyclassesmodule.hpp | 2 +- .../reference/classes/pyclassesutil.cpp | 2 +- regression/reference/classes/setup.py | 2 +- regression/reference/classes/typesclasses.h | 2 +- regression/reference/classes/utilclasses.cpp | 2 +- regression/reference/classes/wrapClass1.cpp | 2 +- regression/reference/classes/wrapClass1.h | 2 +- regression/reference/classes/wrapClass2.cpp | 2 +- regression/reference/classes/wrapClass2.h | 2 +- .../reference/classes/wrapSingleton.cpp | 2 +- regression/reference/classes/wrapSingleton.h | 2 +- regression/reference/classes/wrapclasses.cpp | 2 +- regression/reference/classes/wrapclasses.h | 2 +- regression/reference/classes/wrapfclasses.f | 2 +- regression/reference/clibrary/clibrary.json | 2 +- .../reference/clibrary/clibrary_types.yaml | 2 +- .../reference/clibrary/pyClibrarymodule.c | 2 +- .../reference/clibrary/pyClibrarymodule.h | 2 +- regression/reference/clibrary/setup.py | 2 +- regression/reference/clibrary/typesClibrary.h | 2 +- regression/reference/clibrary/wrapClibrary.c | 2 +- regression/reference/clibrary/wrapClibrary.h | 2 +- regression/reference/clibrary/wrapfclibrary.f | 2 +- .../reference/cxxlibrary/cxxlibrary.json | 2 +- .../cxxlibrary/cxxlibrary_types.yaml | 2 +- .../cxxlibrary/pyCstruct1_clstype.cpp | 2 +- .../cxxlibrary/pycxxlibrarymodule.cpp | 2 +- .../cxxlibrary/pycxxlibrarymodule.hpp | 2 +- .../reference/cxxlibrary/pycxxlibraryutil.cpp | 2 +- regression/reference/cxxlibrary/setup.py | 2 +- .../reference/cxxlibrary/typescxxlibrary.h | 2 +- .../reference/cxxlibrary/wrapcxxlibrary.cpp | 2 +- .../reference/cxxlibrary/wrapcxxlibrary.h | 2 +- .../reference/cxxlibrary/wrapfcxxlibrary.f | 2 +- .../debugfalse/luaTutorialmodule.cpp | 2 +- .../debugfalse/luaTutorialmodule.hpp | 2 +- .../reference/debugfalse/pyTutorialmodule.cpp | 2 +- .../reference/debugfalse/pyTutorialmodule.hpp | 2 +- regression/reference/debugfalse/setup.py | 2 +- regression/reference/debugfalse/tutorial.json | 2 +- .../reference/debugfalse/typesTutorial.h | 2 +- .../reference/debugfalse/utilTutorial.cpp | 2 +- .../reference/debugfalse/wrapTutorial.cpp | 2 +- .../reference/debugfalse/wrapTutorial.h | 2 +- .../reference/debugfalse/wrapftutorial.f | 2 +- regression/reference/enum-c/enum.json | 2 +- regression/reference/enum-c/pyenummodule.c | 2 +- regression/reference/enum-c/pyenummodule.h | 2 +- regression/reference/enum-c/setup.py | 2 +- regression/reference/enum-c/typesenum.h | 2 +- regression/reference/enum-c/wrapenum.c | 2 +- regression/reference/enum-c/wrapenum.h | 2 +- regression/reference/enum-c/wrapfenum.f | 2 +- regression/reference/enum-cxx/enum.json | 2 +- .../reference/enum-cxx/pyenummodule.cpp | 2 +- .../reference/enum-cxx/pyenummodule.hpp | 2 +- regression/reference/enum-cxx/setup.py | 2 +- regression/reference/enum-cxx/typesenum.h | 2 +- regression/reference/enum-cxx/wrapenum.cpp | 2 +- regression/reference/enum-cxx/wrapenum.h | 2 +- regression/reference/enum-cxx/wrapfenum.f | 2 +- regression/reference/example/example.json | 2 +- .../example/luaUserLibrarymodule.cpp | 2 +- .../example/luaUserLibrarymodule.hpp | 2 +- .../pyUserLibrary_example_nestedmodule.cpp | 2 +- .../example/pyUserLibrary_examplemodule.cpp | 2 +- .../reference/example/pyUserLibrarymodule.cpp | 2 +- .../reference/example/pyUserLibrarymodule.hpp | 2 +- .../reference/example/pyUserLibraryutil.cpp | 2 +- .../example/pyexample_nested_ExClass1type.cpp | 2 +- .../example/pyexample_nested_ExClass2type.cpp | 2 +- regression/reference/example/setup.py | 2 +- .../reference/example/typesUserLibrary.h | 2 +- .../reference/example/userlibrary_types.yaml | 2 +- .../reference/example/utilUserLibrary.cpp | 2 +- .../reference/example/wrapUserLibrary.cpp | 2 +- .../wrapUserLibrary_example_nested.cpp | 2 +- .../example/wrapUserLibrary_example_nested.h | 2 +- .../example/wrapexample_nested_ExClass1.cpp | 2 +- .../example/wrapexample_nested_ExClass1.h | 2 +- .../example/wrapexample_nested_ExClass2.cpp | 2 +- .../example/wrapexample_nested_ExClass2.h | 2 +- .../example/wrapfUserLibrary_example.f | 2 +- .../example/wrapfUserLibrary_example_nested.f | 2 +- .../reference/example/wrapfuserlibrary.f | 2 +- regression/reference/forward/forward.json | 2 +- .../reference/forward/forward_types.yaml | 2 +- .../reference/forward/luaforwardmodule.cpp | 2 +- .../reference/forward/luaforwardmodule.hpp | 2 +- regression/reference/forward/pyClass2type.cpp | 2 +- regression/reference/forward/pyClass3type.cpp | 2 +- .../reference/forward/pyforwardmodule.cpp | 2 +- .../reference/forward/pyforwardmodule.hpp | 2 +- .../reference/forward/pyforwardutil.cpp | 2 +- regression/reference/forward/setup.py | 2 +- regression/reference/forward/typesforward.h | 2 +- regression/reference/forward/wrapClass2.cpp | 2 +- regression/reference/forward/wrapClass2.h | 2 +- regression/reference/forward/wrapfforward.f | 2 +- regression/reference/forward/wrapforward.cpp | 2 +- regression/reference/generic/generic.json | 2 +- regression/reference/generic/typesgeneric.h | 2 +- regression/reference/generic/wrapfgeneric.f | 2 +- regression/reference/generic/wrapgeneric.c | 2 +- regression/reference/generic/wrapgeneric.h | 2 +- regression/reference/include/include.json | 2 +- .../reference/include/library_types.yaml | 2 +- regression/reference/include/typeslibrary.h | 2 +- regression/reference/include/wrapClass2.cpp | 2 +- regression/reference/include/wrapClass2.h | 2 +- regression/reference/include/wrapflibrary.f | 2 +- .../reference/include/wrapflibrary_one.f | 2 +- .../reference/include/wrapflibrary_one_two.f | 2 +- .../reference/include/wrapflibrary_outer1.f | 2 +- .../reference/include/wrapflibrary_outer2.f | 2 +- .../reference/include/wrapflibrary_three.f | 2 +- regression/reference/include/wraplibrary.cpp | 2 +- .../reference/include/wraplibrary_one_two.cpp | 2 +- .../reference/include/wraplibrary_one_two.h | 2 +- .../reference/include/wraplibrary_outer1.cpp | 2 +- .../reference/include/wraplibrary_outer1.h | 2 +- .../reference/include/wraplibrary_outer2.cpp | 2 +- .../reference/include/wraplibrary_outer2.h | 2 +- .../reference/include/wrapouter1_class0.cpp | 2 +- .../reference/include/wrapouter1_class0.h | 2 +- .../reference/include/wrapouter2_class0.cpp | 2 +- .../reference/include/wrapouter2_class0.h | 2 +- .../reference/include/wrapthree_Class1.cpp | 2 +- .../reference/include/wrapthree_Class1.h | 2 +- regression/reference/interface/interface.json | 2 +- .../reference/interface/typesInterface.h | 2 +- .../reference/interface/wrapInterface.c | 2 +- .../reference/interface/wrapfinterface.f | 2 +- regression/reference/memdoc/memdoc.json | 2 +- regression/reference/memdoc/typesmemdoc.h | 2 +- regression/reference/memdoc/utilmemdoc.cpp | 2 +- regression/reference/memdoc/wrapfmemdoc.f | 2 +- regression/reference/memdoc/wrapmemdoc.cpp | 2 +- regression/reference/memdoc/wrapmemdoc.h | 2 +- regression/reference/names/foo.cpp | 2 +- regression/reference/names/foo.f | 2 +- regression/reference/names/foo.h | 2 +- regression/reference/names/foons0.cpp | 2 +- regression/reference/names/names.json | 2 +- regression/reference/names/pyNames2type.cpp | 2 +- .../reference/names/pyns0_Namestype.cpp | 2 +- .../names/pystd_vector_doubletype.cpp | 2 +- .../names/pystd_vector_instantiation3type.cpp | 2 +- .../names/pystd_vector_instantiation5type.cpp | 2 +- .../reference/names/pystd_vector_inttype.cpp | 2 +- .../names/pytestnames_internalmodule.cpp | 2 +- .../names/pytestnames_ns0_innermodule.cpp | 2 +- .../reference/names/pytestnames_ns0module.cpp | 2 +- .../reference/names/pytestnames_ns1module.cpp | 2 +- .../reference/names/pytestnames_stdmodule.cpp | 2 +- .../reference/names/pytestnamesmodule.cpp | 2 +- .../reference/names/pytestnamesmodule.hpp | 2 +- .../reference/names/pytestnamesutil.cpp | 2 +- regression/reference/names/pytwoTs_0type.cpp | 2 +- .../names/pytwoTs_instantiation4type.cpp | 2 +- regression/reference/names/setup.py | 2 +- .../reference/names/testnames_types.yaml | 2 +- regression/reference/names/top.cpp | 2 +- regression/reference/names/top.f | 2 +- regression/reference/names/top.h | 2 +- regression/reference/names/typestestnames.hh | 2 +- regression/reference/names/wrapCAPI_Class1.cc | 2 +- regression/reference/names/wrapCAPI_Class1.hh | 2 +- regression/reference/names/wrapNames2.cc | 2 +- .../reference/names/wrapftestnames_CAPI.F | 2 +- .../reference/names/wrapftestnames_internal.F | 2 +- .../names/wrapftestnames_ns0_inner.F | 2 +- .../reference/names/wrapftestnames_ns1.F | 2 +- .../reference/names/wrapftestnames_std.F | 2 +- .../reference/names/wraptestnames_CAPI.cc | 2 +- .../reference/names/wraptestnames_CAPI.hh | 2 +- .../names/wraptestnames_ns0_inner.cc | 2 +- .../reference/names/wraptestnames_ns1.cc | 2 +- .../reference/names/wraptestnames_ns1.hh | 2 +- regression/reference/names2/names2.json | 2 +- regression/reference/names2/names_types.yaml | 2 +- regression/reference/names2/typesNames.h | 2 +- regression/reference/names2/wrapNames.cpp | 2 +- regression/reference/names2/wrapNames.h | 2 +- regression/reference/names2/wrapfnames.f | 2 +- regression/reference/namespace/namespace.json | 2 +- regression/reference/namespace/ns_types.yaml | 2 +- .../reference/namespace/pyns_nsworkmodule.cpp | 2 +- .../reference/namespace/pyns_outermodule.cpp | 2 +- regression/reference/namespace/pynsmodule.cpp | 2 +- regression/reference/namespace/pynsmodule.hpp | 2 +- regression/reference/namespace/pynsutil.cpp | 2 +- .../namespace/pynswork_ClassWorktype.cpp | 2 +- .../namespace/pyouter_Cstruct1type.cpp | 2 +- regression/reference/namespace/setup.py | 2 +- regression/reference/namespace/typesns.h | 2 +- regression/reference/namespace/utilns.cpp | 2 +- regression/reference/namespace/wrapfns.f | 2 +- .../reference/namespace/wrapfns_outer.f | 2 +- regression/reference/namespace/wrapns.cpp | 2 +- regression/reference/namespace/wrapns.h | 2 +- .../reference/namespace/wrapns_outer.cpp | 2 +- regression/reference/namespace/wrapns_outer.h | 2 +- regression/reference/namespace/wrapns_upper.h | 2 +- .../reference/namespacedoc/namespacedoc.json | 2 +- .../namespacedoc/pywrapped_inner1module.cpp | 2 +- .../namespacedoc/pywrapped_inner2module.cpp | 2 +- .../namespacedoc/pywrapped_inner4module.cpp | 2 +- .../namespacedoc/pywrappedmodule.cpp | 2 +- .../namespacedoc/pywrappedmodule.hpp | 2 +- regression/reference/namespacedoc/setup.py | 2 +- .../reference/namespacedoc/typeswrapped.h | 2 +- .../reference/namespacedoc/wrapfwrapped.f | 2 +- .../namespacedoc/wrapfwrapped_inner1.f | 2 +- .../namespacedoc/wrapfwrapped_inner2.f | 2 +- .../reference/namespacedoc/wrapped_types.yaml | 2 +- .../reference/namespacedoc/wrapwrapped.cpp | 2 +- .../reference/namespacedoc/wrapwrapped.h | 2 +- .../namespacedoc/wrapwrapped_inner1.cpp | 2 +- .../namespacedoc/wrapwrapped_inner1.h | 2 +- .../namespacedoc/wrapwrapped_inner2.cpp | 2 +- .../namespacedoc/wrapwrapped_inner2.h | 2 +- .../namespacedoc/wrapwrapped_inner4.cpp | 2 +- .../namespacedoc/wrapwrapped_inner4.h | 2 +- .../ownership/luaownershipmodule.cpp | 2 +- .../ownership/luaownershipmodule.hpp | 2 +- regression/reference/ownership/ownership.json | 2 +- .../reference/ownership/ownership_types.yaml | 2 +- .../reference/ownership/pyClass1type.cpp | 2 +- .../reference/ownership/pyownershipmodule.cpp | 2 +- .../reference/ownership/pyownershipmodule.hpp | 2 +- .../reference/ownership/pyownershiputil.cpp | 2 +- regression/reference/ownership/setup.py | 2 +- .../reference/ownership/typesownership.h | 2 +- .../reference/ownership/utilownership.cpp | 2 +- regression/reference/ownership/wrapClass1.cpp | 2 +- regression/reference/ownership/wrapClass1.h | 2 +- .../reference/ownership/wrapfownership.f | 2 +- .../reference/ownership/wrapownership.cpp | 2 +- .../reference/ownership/wrapownership.h | 2 +- regression/reference/pointers-c/pointers.json | 2 +- .../reference/pointers-c/typespointers.h | 2 +- .../reference/pointers-c/wrapfpointers.f | 2 +- .../reference/pointers-c/wrappointers.c | 2 +- .../reference/pointers-c/wrappointers.h | 2 +- .../reference/pointers-cxx/pointers.json | 2 +- .../reference/pointers-cxx/typespointers.h | 2 +- .../reference/pointers-cxx/wrapfpointers.f | 2 +- .../reference/pointers-cxx/wrappointers.cpp | 2 +- .../reference/pointers-cxx/wrappointers.h | 2 +- .../reference/pointers-list-c/pointers.json | 2 +- .../pointers-list-c/pypointersmodule.c | 2 +- .../pointers-list-c/pypointersmodule.h | 2 +- regression/reference/pointers-list-c/setup.py | 2 +- .../reference/pointers-list-cxx/pointers.json | 2 +- .../pointers-list-cxx/pypointersmodule.cpp | 2 +- .../pointers-list-cxx/pypointersmodule.hpp | 2 +- .../reference/pointers-list-cxx/setup.py | 2 +- .../reference/pointers-numpy-c/pointers.json | 2 +- .../pointers-numpy-c/pypointersmodule.c | 2 +- .../pointers-numpy-c/pypointersmodule.h | 2 +- .../reference/pointers-numpy-c/setup.py | 2 +- .../pointers-numpy-cxx/pointers.json | 2 +- .../pointers-numpy-cxx/pypointersmodule.cpp | 2 +- .../pointers-numpy-cxx/pypointersmodule.hpp | 2 +- .../reference/pointers-numpy-cxx/setup.py | 2 +- .../reference/preprocess/preprocess.json | 2 +- .../preprocess/preprocess_types.yaml | 2 +- .../reference/preprocess/pyUser1type.cpp | 2 +- .../reference/preprocess/pyUser2type.cpp | 2 +- .../preprocess/pypreprocessmodule.cpp | 2 +- .../preprocess/pypreprocessmodule.hpp | 2 +- .../reference/preprocess/pypreprocessutil.cpp | 2 +- regression/reference/preprocess/setup.py | 2 +- .../reference/preprocess/typespreprocess.h | 2 +- regression/reference/preprocess/wrapUser1.cpp | 2 +- regression/reference/preprocess/wrapUser1.h | 2 +- regression/reference/preprocess/wrapUser2.cpp | 2 +- regression/reference/preprocess/wrapUser2.h | 2 +- .../reference/preprocess/wrapfpreprocess.f | 2 +- .../reference/preprocess/wrappreprocess.cpp | 2 +- regression/reference/scope/scope.json | 2 +- regression/reference/scope/scope_types.yaml | 2 +- regression/reference/scope/typesscope.h | 2 +- regression/reference/scope/wrapClass1.h | 2 +- regression/reference/scope/wrapClass2.h | 2 +- regression/reference/scope/wrapfscope.f | 2 +- regression/reference/scope/wrapfscope_ns1.f | 2 +- regression/reference/scope/wrapfscope_ns2.f | 2 +- regression/reference/scope/wrapscope.cpp | 2 +- regression/reference/scope/wrapscope.h | 2 +- regression/reference/scope/wrapscope_ns1.h | 2 +- regression/reference/scope/wrapscope_ns2.h | 2 +- regression/reference/statement/statement.json | 2 +- .../reference/statement/typesstatement.h | 2 +- .../reference/statement/wrapfstatement.f | 2 +- .../reference/statement/wrapstatement.cpp | 2 +- .../reference/statement/wrapstatement.h | 2 +- .../reference/strings/pystringsmodule.cpp | 2 +- .../reference/strings/pystringsmodule.hpp | 2 +- regression/reference/strings/setup.py | 2 +- regression/reference/strings/strings.json | 2 +- regression/reference/strings/typesstrings.h | 2 +- regression/reference/strings/utilstrings.cpp | 2 +- regression/reference/strings/wrapfstrings.f | 2 +- regression/reference/strings/wrapstrings.cpp | 2 +- regression/reference/strings/wrapstrings.h | 2 +- regression/reference/struct-c/struct.json | 2 +- .../reference/struct-c/struct_types.yaml | 2 +- regression/reference/struct-c/typesstruct.h | 2 +- regression/reference/struct-c/wrapfstruct.f | 2 +- regression/reference/struct-c/wrapstruct.c | 2 +- regression/reference/struct-c/wrapstruct.h | 2 +- .../reference/struct-class-c/pyArrays1type.c | 2 +- .../reference/struct-class-c/pyCstruct1type.c | 2 +- .../struct-class-c/pyCstruct_listtype.c | 2 +- .../struct-class-c/pyCstruct_numpytype.c | 2 +- .../struct-class-c/pyCstruct_ptrtype.c | 2 +- .../reference/struct-class-c/pystructmodule.c | 2 +- .../reference/struct-class-c/pystructmodule.h | 2 +- .../reference/struct-class-c/pystructutil.c | 2 +- regression/reference/struct-class-c/setup.py | 2 +- .../reference/struct-class-c/struct.json | 2 +- .../struct-class-c/struct_types.yaml | 2 +- .../struct-class-cxx/pyArrays1type.cpp | 2 +- .../struct-class-cxx/pyCstruct1type.cpp | 2 +- .../struct-class-cxx/pyCstruct_listtype.cpp | 2 +- .../struct-class-cxx/pyCstruct_numpytype.cpp | 2 +- .../struct-class-cxx/pyCstruct_ptrtype.cpp | 2 +- .../struct-class-cxx/pystructmodule.cpp | 2 +- .../struct-class-cxx/pystructmodule.hpp | 2 +- .../struct-class-cxx/pystructutil.cpp | 2 +- .../reference/struct-class-cxx/setup.py | 2 +- .../reference/struct-class-cxx/struct.json | 2 +- .../struct-class-cxx/struct_types.yaml | 2 +- regression/reference/struct-cxx/struct.json | 2 +- .../reference/struct-cxx/struct_types.yaml | 2 +- regression/reference/struct-cxx/typesstruct.h | 2 +- regression/reference/struct-cxx/wrapfstruct.f | 2 +- .../reference/struct-cxx/wrapstruct.cpp | 2 +- regression/reference/struct-cxx/wrapstruct.h | 2 +- .../struct-list-cxx/pystructmodule.cpp | 2 +- .../struct-list-cxx/pystructmodule.hpp | 2 +- regression/reference/struct-list-cxx/setup.py | 2 +- .../reference/struct-list-cxx/struct.json | 2 +- .../struct-list-cxx/struct_types.yaml | 2 +- .../reference/struct-numpy-c/pystructmodule.c | 2 +- .../reference/struct-numpy-c/pystructmodule.h | 2 +- .../reference/struct-numpy-c/pystructutil.c | 2 +- regression/reference/struct-numpy-c/setup.py | 2 +- .../reference/struct-numpy-c/struct.json | 2 +- .../struct-numpy-c/struct_types.yaml | 2 +- .../struct-numpy-cxx/pystructmodule.cpp | 2 +- .../struct-numpy-cxx/pystructmodule.hpp | 2 +- .../struct-numpy-cxx/pystructutil.cpp | 2 +- .../reference/struct-numpy-cxx/setup.py | 2 +- .../reference/struct-numpy-cxx/struct.json | 2 +- .../struct-numpy-cxx/struct_types.yaml | 2 +- .../struct-py-c/pyCstruct_as_classtype.c | 2 +- .../reference/struct-py-c/pystructmodule.c | 2 +- .../reference/struct-py-c/pystructmodule.h | 2 +- .../reference/struct-py-c/pystructutil.c | 2 +- regression/reference/struct-py-c/setup.py | 2 +- .../reference/struct-py-c/struct-py.json | 2 +- .../reference/struct-py-c/struct_types.yaml | 2 +- .../struct-py-cxx/pyCstruct_as_classtype.cpp | 2 +- .../struct-py-cxx/pystructmodule.cpp | 2 +- .../struct-py-cxx/pystructmodule.hpp | 2 +- .../reference/struct-py-cxx/pystructutil.cpp | 2 +- regression/reference/struct-py-cxx/setup.py | 2 +- .../reference/struct-py-cxx/struct-py.json | 2 +- .../reference/struct-py-cxx/struct_types.yaml | 2 +- .../reference/structlist/pyArrays1type.c | 2 +- .../reference/structlist/pystructmodule.c | 2 +- .../reference/structlist/pystructmodule.h | 2 +- .../reference/structlist/pystructutil.c | 2 +- regression/reference/structlist/setup.py | 2 +- .../reference/structlist/struct_types.yaml | 2 +- .../reference/structlist/structlist.json | 2 +- .../reference/templates/pyWorkertype.cpp | 2 +- .../templates/pyinternal_ImplWorker1type.cpp | 2 +- .../templates/pyinternal_ImplWorker2type.cpp | 2 +- .../templates/pystd_vector_doubletype.cpp | 2 +- .../templates/pystd_vector_inttype.cpp | 2 +- .../templates/pytemplates_internalmodule.cpp | 2 +- .../templates/pytemplates_stdmodule.cpp | 2 +- .../reference/templates/pytemplatesmodule.cpp | 2 +- .../reference/templates/pytemplatesmodule.hpp | 2 +- .../reference/templates/pytemplatesutil.cpp | 2 +- .../reference/templates/pyuser_inttype.cpp | 2 +- regression/reference/templates/setup.py | 2 +- regression/reference/templates/templates.json | 2 +- .../reference/templates/templates_types.yaml | 2 +- .../reference/templates/typestemplates.h | 2 +- .../reference/templates/wrapftemplates.f | 2 +- .../templates/wrapftemplates_internal.f | 2 +- .../reference/templates/wrapftemplates_std.f | 2 +- .../templates/wrapstd_vector_double.cpp | 2 +- .../templates/wrapstd_vector_double.h | 2 +- .../reference/templates/wrapstd_vector_int.h | 2 +- .../reference/templates/wraptemplates.cpp | 2 +- .../reference/templates/wraptemplates.h | 2 +- .../reference/templates/wrapuser_int.cpp | 2 +- regression/reference/templates/wrapuser_int.h | 2 +- .../reference/templates/wrapvectorforint.cpp | 2 +- .../reference/tutorial/luaTutorialmodule.cpp | 2 +- .../reference/tutorial/luaTutorialmodule.hpp | 2 +- .../reference/tutorial/pyTutorialmodule.cpp | 2 +- .../reference/tutorial/pyTutorialmodule.hpp | 2 +- regression/reference/tutorial/setup.py | 2 +- regression/reference/tutorial/tutorial.json | 2 +- regression/reference/tutorial/typesTutorial.h | 2 +- .../reference/tutorial/utilTutorial.cpp | 2 +- .../reference/tutorial/wrapTutorial.cpp | 2 +- regression/reference/tutorial/wrapTutorial.h | 2 +- regression/reference/tutorial/wrapftutorial.f | 2 +- regression/reference/types/pytypesmodule.cpp | 2 +- regression/reference/types/pytypesmodule.hpp | 2 +- regression/reference/types/setup.py | 2 +- regression/reference/types/types.json | 2 +- regression/reference/types/typestypes.h | 2 +- regression/reference/types/wrapftypes.f | 2 +- regression/reference/types/wraptypes.cpp | 2 +- regression/reference/types/wraptypes.h | 2 +- .../vectors-list/pyvectorsmodule.cpp | 2 +- .../vectors-list/pyvectorsmodule.hpp | 2 +- regression/reference/vectors-list/setup.py | 2 +- .../reference/vectors-list/vectors.json | 2 +- .../vectors-numpy/pyvectorsmodule.cpp | 2 +- .../vectors-numpy/pyvectorsmodule.hpp | 2 +- .../reference/vectors-numpy/pyvectorsutil.cpp | 2 +- regression/reference/vectors-numpy/setup.py | 2 +- .../reference/vectors-numpy/vectors.json | 2 +- regression/reference/vectors/typesvectors.h | 2 +- regression/reference/vectors/utilvectors.cpp | 2 +- regression/reference/vectors/vectors.json | 2 +- regression/reference/vectors/wrapfvectors.f | 2 +- regression/reference/vectors/wrapvectors.cpp | 2 +- regression/reference/vectors/wrapvectors.h | 2 +- shroud/main.py | 24 ++++++++++++++++++- shroud/util.py | 4 +--- 473 files changed, 502 insertions(+), 473 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index 277f349a4..541bdc5a9 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -54,6 +54,12 @@ write-helpers BASE Write files which contain the available helper functions into the files BASE.c and BASE.f. +write-version + Write Shroud version into generated files. + ``--nowrite-version`` will not write the version and is used + by the testsuite to avoid changing every reference file when + the version changes. + yaml-types FILE Write a YAML file with the default types. diff --git a/regression/do-test.py b/regression/do-test.py index 3abf04997..cc1e010f7 100644 --- a/regression/do-test.py +++ b/regression/do-test.py @@ -187,6 +187,8 @@ def do_test(self): # Avoid printing things which may vary (path, date, time). "--option", "debug_testsuite=true", + # Avoid printing version number in reference files + "--nowrite-version", ] # test specific flags @@ -320,6 +322,7 @@ def __init__(self, name, yaml=None, cmdline=None): cmdline=[ "--write-helpers", "helpers", "--yaml-types", "def_types.yaml", + "--write-version", # Test writing vesion ]), TestDesc("tutorial"), TestDesc("debugfalse", yaml="tutorial", diff --git a/regression/reference/arrayclass/arrayclass.json b/regression/reference/arrayclass/arrayclass.json index abcd70e68..538e503d7 100644 --- a/regression/reference/arrayclass/arrayclass.json +++ b/regression/reference/arrayclass/arrayclass.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/arrayclass/arrayclass_types.yaml b/regression/reference/arrayclass/arrayclass_types.yaml index f091e8a44..f869fa8df 100644 --- a/regression/reference/arrayclass/arrayclass_types.yaml +++ b/regression/reference/arrayclass/arrayclass_types.yaml @@ -1,5 +1,5 @@ # arrayclass_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/pyArrayWrappertype.cpp b/regression/reference/arrayclass/pyArrayWrappertype.cpp index f82cae1f1..3bce0ec18 100644 --- a/regression/reference/arrayclass/pyArrayWrappertype.cpp +++ b/regression/reference/arrayclass/pyArrayWrappertype.cpp @@ -1,5 +1,5 @@ // pyArrayWrappertype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/pyarrayclassmodule.cpp b/regression/reference/arrayclass/pyarrayclassmodule.cpp index dea715230..2988b60ed 100644 --- a/regression/reference/arrayclass/pyarrayclassmodule.cpp +++ b/regression/reference/arrayclass/pyarrayclassmodule.cpp @@ -1,5 +1,5 @@ // pyarrayclassmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/pyarrayclassmodule.hpp b/regression/reference/arrayclass/pyarrayclassmodule.hpp index d6ff46122..574aba3b6 100644 --- a/regression/reference/arrayclass/pyarrayclassmodule.hpp +++ b/regression/reference/arrayclass/pyarrayclassmodule.hpp @@ -1,5 +1,5 @@ // pyarrayclassmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/pyarrayclassutil.cpp b/regression/reference/arrayclass/pyarrayclassutil.cpp index c9678fa30..4b15fb528 100644 --- a/regression/reference/arrayclass/pyarrayclassutil.cpp +++ b/regression/reference/arrayclass/pyarrayclassutil.cpp @@ -1,5 +1,5 @@ // pyarrayclassutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/setup.py b/regression/reference/arrayclass/setup.py index d992816b7..c3281f3c4 100644 --- a/regression/reference/arrayclass/setup.py +++ b/regression/reference/arrayclass/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/typesarrayclass.h b/regression/reference/arrayclass/typesarrayclass.h index fe5cc6e15..f368eabd6 100644 --- a/regression/reference/arrayclass/typesarrayclass.h +++ b/regression/reference/arrayclass/typesarrayclass.h @@ -1,5 +1,5 @@ // typesarrayclass.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/wrapArrayWrapper.cpp b/regression/reference/arrayclass/wrapArrayWrapper.cpp index 3fcc37865..7b6a7f3c4 100644 --- a/regression/reference/arrayclass/wrapArrayWrapper.cpp +++ b/regression/reference/arrayclass/wrapArrayWrapper.cpp @@ -1,5 +1,5 @@ // wrapArrayWrapper.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/wrapArrayWrapper.h b/regression/reference/arrayclass/wrapArrayWrapper.h index d1f627d63..612fadac3 100644 --- a/regression/reference/arrayclass/wrapArrayWrapper.h +++ b/regression/reference/arrayclass/wrapArrayWrapper.h @@ -1,5 +1,5 @@ // wrapArrayWrapper.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/wraparrayclass.cpp b/regression/reference/arrayclass/wraparrayclass.cpp index 4c1169c72..c37bfb601 100644 --- a/regression/reference/arrayclass/wraparrayclass.cpp +++ b/regression/reference/arrayclass/wraparrayclass.cpp @@ -1,5 +1,5 @@ // wraparrayclass.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/arrayclass/wrapfarrayclass.f b/regression/reference/arrayclass/wrapfarrayclass.f index 724037504..8cfbc69cc 100644 --- a/regression/reference/arrayclass/wrapfarrayclass.f +++ b/regression/reference/arrayclass/wrapfarrayclass.f @@ -1,5 +1,5 @@ ! wrapfarrayclass.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ccomplex/ccomplex.json b/regression/reference/ccomplex/ccomplex.json index 7539de164..4d069316e 100644 --- a/regression/reference/ccomplex/ccomplex.json +++ b/regression/reference/ccomplex/ccomplex.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/ccomplex/pyccomplexmodule.c b/regression/reference/ccomplex/pyccomplexmodule.c index c40cb802c..2d0ade871 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.c +++ b/regression/reference/ccomplex/pyccomplexmodule.c @@ -1,5 +1,5 @@ // pyccomplexmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ccomplex/pyccomplexmodule.h b/regression/reference/ccomplex/pyccomplexmodule.h index 528643ba4..882f33e3b 100644 --- a/regression/reference/ccomplex/pyccomplexmodule.h +++ b/regression/reference/ccomplex/pyccomplexmodule.h @@ -1,5 +1,5 @@ // pyccomplexmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ccomplex/setup.py b/regression/reference/ccomplex/setup.py index 045ea55df..bcfe2d121 100644 --- a/regression/reference/ccomplex/setup.py +++ b/regression/reference/ccomplex/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ccomplex/typesccomplex.h b/regression/reference/ccomplex/typesccomplex.h index 014d738a8..3a7cbee05 100644 --- a/regression/reference/ccomplex/typesccomplex.h +++ b/regression/reference/ccomplex/typesccomplex.h @@ -1,5 +1,5 @@ // typesccomplex.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ccomplex/wrapccomplex.c b/regression/reference/ccomplex/wrapccomplex.c index 374146b7b..96bf9954f 100644 --- a/regression/reference/ccomplex/wrapccomplex.c +++ b/regression/reference/ccomplex/wrapccomplex.c @@ -1,5 +1,5 @@ // wrapccomplex.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ccomplex/wrapfccomplex.f b/regression/reference/ccomplex/wrapfccomplex.f index e95f40f96..927ff5f80 100644 --- a/regression/reference/ccomplex/wrapfccomplex.f +++ b/regression/reference/ccomplex/wrapfccomplex.f @@ -1,5 +1,5 @@ ! wrapfccomplex.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cdesc/cdesc.json b/regression/reference/cdesc/cdesc.json index 4f9e4de75..1c10d4a42 100644 --- a/regression/reference/cdesc/cdesc.json +++ b/regression/reference/cdesc/cdesc.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/cdesc/typescdesc.h b/regression/reference/cdesc/typescdesc.h index 8d49ff173..64c2104e3 100644 --- a/regression/reference/cdesc/typescdesc.h +++ b/regression/reference/cdesc/typescdesc.h @@ -1,5 +1,5 @@ // typescdesc.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cdesc/wrapcdesc.cpp b/regression/reference/cdesc/wrapcdesc.cpp index a5a8c5fc4..42fb0c79c 100644 --- a/regression/reference/cdesc/wrapcdesc.cpp +++ b/regression/reference/cdesc/wrapcdesc.cpp @@ -1,5 +1,5 @@ // wrapcdesc.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cdesc/wrapcdesc.h b/regression/reference/cdesc/wrapcdesc.h index 111635f84..e143ea5f1 100644 --- a/regression/reference/cdesc/wrapcdesc.h +++ b/regression/reference/cdesc/wrapcdesc.h @@ -1,5 +1,5 @@ // wrapcdesc.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cdesc/wrapfcdesc.f b/regression/reference/cdesc/wrapfcdesc.f index e4aae6ff8..8fdbd04a8 100644 --- a/regression/reference/cdesc/wrapfcdesc.f +++ b/regression/reference/cdesc/wrapfcdesc.f @@ -1,5 +1,5 @@ ! wrapfcdesc.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/classes.json b/regression/reference/classes/classes.json index 796a1846b..d4ecae488 100644 --- a/regression/reference/classes/classes.json +++ b/regression/reference/classes/classes.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/classes/classes_types.yaml b/regression/reference/classes/classes_types.yaml index cd9a7432a..dcb0cb054 100644 --- a/regression/reference/classes/classes_types.yaml +++ b/regression/reference/classes/classes_types.yaml @@ -1,5 +1,5 @@ # classes_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/pyClass1type.cpp b/regression/reference/classes/pyClass1type.cpp index 627c6865c..006c370b4 100644 --- a/regression/reference/classes/pyClass1type.cpp +++ b/regression/reference/classes/pyClass1type.cpp @@ -1,5 +1,5 @@ // pyClass1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/pyClass2type.cpp b/regression/reference/classes/pyClass2type.cpp index 4a1baa911..58d07fbef 100644 --- a/regression/reference/classes/pyClass2type.cpp +++ b/regression/reference/classes/pyClass2type.cpp @@ -1,5 +1,5 @@ // pyClass2type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/pySingletontype.cpp b/regression/reference/classes/pySingletontype.cpp index 710e55a21..19256a32e 100644 --- a/regression/reference/classes/pySingletontype.cpp +++ b/regression/reference/classes/pySingletontype.cpp @@ -1,5 +1,5 @@ // pySingletontype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/pyclassesmodule.cpp b/regression/reference/classes/pyclassesmodule.cpp index 3f5e70024..c7bec709c 100644 --- a/regression/reference/classes/pyclassesmodule.cpp +++ b/regression/reference/classes/pyclassesmodule.cpp @@ -1,5 +1,5 @@ // pyclassesmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/pyclassesmodule.hpp b/regression/reference/classes/pyclassesmodule.hpp index 8547b2edd..90a5428f6 100644 --- a/regression/reference/classes/pyclassesmodule.hpp +++ b/regression/reference/classes/pyclassesmodule.hpp @@ -1,5 +1,5 @@ // pyclassesmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/pyclassesutil.cpp b/regression/reference/classes/pyclassesutil.cpp index 117dd7265..ff6a9a3e3 100644 --- a/regression/reference/classes/pyclassesutil.cpp +++ b/regression/reference/classes/pyclassesutil.cpp @@ -1,5 +1,5 @@ // pyclassesutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/setup.py b/regression/reference/classes/setup.py index d6beefb76..8869b7020 100644 --- a/regression/reference/classes/setup.py +++ b/regression/reference/classes/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/typesclasses.h b/regression/reference/classes/typesclasses.h index 3533834a1..22dfefa64 100644 --- a/regression/reference/classes/typesclasses.h +++ b/regression/reference/classes/typesclasses.h @@ -1,5 +1,5 @@ // typesclasses.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/utilclasses.cpp b/regression/reference/classes/utilclasses.cpp index 39403a672..c285b0ba7 100644 --- a/regression/reference/classes/utilclasses.cpp +++ b/regression/reference/classes/utilclasses.cpp @@ -1,5 +1,5 @@ // utilclasses.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapClass1.cpp b/regression/reference/classes/wrapClass1.cpp index 39d551662..9bc838f88 100644 --- a/regression/reference/classes/wrapClass1.cpp +++ b/regression/reference/classes/wrapClass1.cpp @@ -1,5 +1,5 @@ // wrapClass1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapClass1.h b/regression/reference/classes/wrapClass1.h index e37f9c38a..241d06345 100644 --- a/regression/reference/classes/wrapClass1.h +++ b/regression/reference/classes/wrapClass1.h @@ -1,5 +1,5 @@ // wrapClass1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapClass2.cpp b/regression/reference/classes/wrapClass2.cpp index 67d48069a..3bdd55b7b 100644 --- a/regression/reference/classes/wrapClass2.cpp +++ b/regression/reference/classes/wrapClass2.cpp @@ -1,5 +1,5 @@ // wrapClass2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapClass2.h b/regression/reference/classes/wrapClass2.h index cbf66596e..4211365e6 100644 --- a/regression/reference/classes/wrapClass2.h +++ b/regression/reference/classes/wrapClass2.h @@ -1,5 +1,5 @@ // wrapClass2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapSingleton.cpp b/regression/reference/classes/wrapSingleton.cpp index 9525d5a17..c339925fe 100644 --- a/regression/reference/classes/wrapSingleton.cpp +++ b/regression/reference/classes/wrapSingleton.cpp @@ -1,5 +1,5 @@ // wrapSingleton.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapSingleton.h b/regression/reference/classes/wrapSingleton.h index 3643ccabf..ade9473ac 100644 --- a/regression/reference/classes/wrapSingleton.h +++ b/regression/reference/classes/wrapSingleton.h @@ -1,5 +1,5 @@ // wrapSingleton.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapclasses.cpp b/regression/reference/classes/wrapclasses.cpp index ace67535a..00c014dea 100644 --- a/regression/reference/classes/wrapclasses.cpp +++ b/regression/reference/classes/wrapclasses.cpp @@ -1,5 +1,5 @@ // wrapclasses.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapclasses.h b/regression/reference/classes/wrapclasses.h index da21bc159..045d78ad3 100644 --- a/regression/reference/classes/wrapclasses.h +++ b/regression/reference/classes/wrapclasses.h @@ -1,5 +1,5 @@ // wrapclasses.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/classes/wrapfclasses.f b/regression/reference/classes/wrapfclasses.f index c0ea67f94..578819c6c 100644 --- a/regression/reference/classes/wrapfclasses.f +++ b/regression/reference/classes/wrapfclasses.f @@ -1,5 +1,5 @@ ! wrapfclasses.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/clibrary.json b/regression/reference/clibrary/clibrary.json index b948bd34c..e9c23e322 100644 --- a/regression/reference/clibrary/clibrary.json +++ b/regression/reference/clibrary/clibrary.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/clibrary/clibrary_types.yaml b/regression/reference/clibrary/clibrary_types.yaml index 49f398db6..423c3045c 100644 --- a/regression/reference/clibrary/clibrary_types.yaml +++ b/regression/reference/clibrary/clibrary_types.yaml @@ -1,5 +1,5 @@ # clibrary_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/pyClibrarymodule.c b/regression/reference/clibrary/pyClibrarymodule.c index 412668445..70f50590c 100644 --- a/regression/reference/clibrary/pyClibrarymodule.c +++ b/regression/reference/clibrary/pyClibrarymodule.c @@ -1,5 +1,5 @@ // pyClibrarymodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/pyClibrarymodule.h b/regression/reference/clibrary/pyClibrarymodule.h index 46d95dfac..f2db9b3ad 100644 --- a/regression/reference/clibrary/pyClibrarymodule.h +++ b/regression/reference/clibrary/pyClibrarymodule.h @@ -1,5 +1,5 @@ // pyClibrarymodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/setup.py b/regression/reference/clibrary/setup.py index 8c5823342..8653028a0 100644 --- a/regression/reference/clibrary/setup.py +++ b/regression/reference/clibrary/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/typesClibrary.h b/regression/reference/clibrary/typesClibrary.h index 5d989cf6e..673d075e0 100644 --- a/regression/reference/clibrary/typesClibrary.h +++ b/regression/reference/clibrary/typesClibrary.h @@ -1,5 +1,5 @@ // typesClibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/wrapClibrary.c b/regression/reference/clibrary/wrapClibrary.c index 27a8942b1..a1024bafc 100644 --- a/regression/reference/clibrary/wrapClibrary.c +++ b/regression/reference/clibrary/wrapClibrary.c @@ -1,5 +1,5 @@ // wrapClibrary.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/wrapClibrary.h b/regression/reference/clibrary/wrapClibrary.h index 9dc94a406..d876a2e5a 100644 --- a/regression/reference/clibrary/wrapClibrary.h +++ b/regression/reference/clibrary/wrapClibrary.h @@ -1,5 +1,5 @@ // wrapClibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/clibrary/wrapfclibrary.f b/regression/reference/clibrary/wrapfclibrary.f index 44d84464c..8dc941626 100644 --- a/regression/reference/clibrary/wrapfclibrary.f +++ b/regression/reference/clibrary/wrapfclibrary.f @@ -1,5 +1,5 @@ ! wrapfclibrary.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/cxxlibrary.json b/regression/reference/cxxlibrary/cxxlibrary.json index e716bf6a5..a045e0458 100644 --- a/regression/reference/cxxlibrary/cxxlibrary.json +++ b/regression/reference/cxxlibrary/cxxlibrary.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/cxxlibrary/cxxlibrary_types.yaml b/regression/reference/cxxlibrary/cxxlibrary_types.yaml index 7b65c5271..63980d0c5 100644 --- a/regression/reference/cxxlibrary/cxxlibrary_types.yaml +++ b/regression/reference/cxxlibrary/cxxlibrary_types.yaml @@ -1,5 +1,5 @@ # cxxlibrary_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/pyCstruct1_clstype.cpp b/regression/reference/cxxlibrary/pyCstruct1_clstype.cpp index cd728c784..cdfcb8c6a 100644 --- a/regression/reference/cxxlibrary/pyCstruct1_clstype.cpp +++ b/regression/reference/cxxlibrary/pyCstruct1_clstype.cpp @@ -1,5 +1,5 @@ // pyCstruct1_clstype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp b/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp index ab8c84b79..0f3f9c746 100644 --- a/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp +++ b/regression/reference/cxxlibrary/pycxxlibrarymodule.cpp @@ -1,5 +1,5 @@ // pycxxlibrarymodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/pycxxlibrarymodule.hpp b/regression/reference/cxxlibrary/pycxxlibrarymodule.hpp index 4602911b9..1f49b8369 100644 --- a/regression/reference/cxxlibrary/pycxxlibrarymodule.hpp +++ b/regression/reference/cxxlibrary/pycxxlibrarymodule.hpp @@ -1,5 +1,5 @@ // pycxxlibrarymodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/pycxxlibraryutil.cpp b/regression/reference/cxxlibrary/pycxxlibraryutil.cpp index 0cf85789d..ec69e147e 100644 --- a/regression/reference/cxxlibrary/pycxxlibraryutil.cpp +++ b/regression/reference/cxxlibrary/pycxxlibraryutil.cpp @@ -1,5 +1,5 @@ // pycxxlibraryutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/setup.py b/regression/reference/cxxlibrary/setup.py index fca7d1edf..0e7711bd2 100644 --- a/regression/reference/cxxlibrary/setup.py +++ b/regression/reference/cxxlibrary/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/typescxxlibrary.h b/regression/reference/cxxlibrary/typescxxlibrary.h index f7fccb1be..939f35c8e 100644 --- a/regression/reference/cxxlibrary/typescxxlibrary.h +++ b/regression/reference/cxxlibrary/typescxxlibrary.h @@ -1,5 +1,5 @@ // typescxxlibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/wrapcxxlibrary.cpp b/regression/reference/cxxlibrary/wrapcxxlibrary.cpp index c6b9a966a..4caa8c8f7 100644 --- a/regression/reference/cxxlibrary/wrapcxxlibrary.cpp +++ b/regression/reference/cxxlibrary/wrapcxxlibrary.cpp @@ -1,5 +1,5 @@ // wrapcxxlibrary.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/wrapcxxlibrary.h b/regression/reference/cxxlibrary/wrapcxxlibrary.h index c024ff171..58cca3d7d 100644 --- a/regression/reference/cxxlibrary/wrapcxxlibrary.h +++ b/regression/reference/cxxlibrary/wrapcxxlibrary.h @@ -1,5 +1,5 @@ // wrapcxxlibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/cxxlibrary/wrapfcxxlibrary.f b/regression/reference/cxxlibrary/wrapfcxxlibrary.f index 9977e77c4..89001db6b 100644 --- a/regression/reference/cxxlibrary/wrapfcxxlibrary.f +++ b/regression/reference/cxxlibrary/wrapfcxxlibrary.f @@ -1,5 +1,5 @@ ! wrapfcxxlibrary.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/luaTutorialmodule.cpp b/regression/reference/debugfalse/luaTutorialmodule.cpp index c869b8687..9f977212b 100644 --- a/regression/reference/debugfalse/luaTutorialmodule.cpp +++ b/regression/reference/debugfalse/luaTutorialmodule.cpp @@ -1,5 +1,5 @@ // luaTutorialmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/luaTutorialmodule.hpp b/regression/reference/debugfalse/luaTutorialmodule.hpp index 160f1788e..a2279747f 100644 --- a/regression/reference/debugfalse/luaTutorialmodule.hpp +++ b/regression/reference/debugfalse/luaTutorialmodule.hpp @@ -1,5 +1,5 @@ // luaTutorialmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/pyTutorialmodule.cpp b/regression/reference/debugfalse/pyTutorialmodule.cpp index 14431131d..3e4d8fa3d 100644 --- a/regression/reference/debugfalse/pyTutorialmodule.cpp +++ b/regression/reference/debugfalse/pyTutorialmodule.cpp @@ -1,5 +1,5 @@ // pyTutorialmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/pyTutorialmodule.hpp b/regression/reference/debugfalse/pyTutorialmodule.hpp index d43a9e375..d04928034 100644 --- a/regression/reference/debugfalse/pyTutorialmodule.hpp +++ b/regression/reference/debugfalse/pyTutorialmodule.hpp @@ -1,5 +1,5 @@ // pyTutorialmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/setup.py b/regression/reference/debugfalse/setup.py index 565608948..71cc4d33e 100644 --- a/regression/reference/debugfalse/setup.py +++ b/regression/reference/debugfalse/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/tutorial.json b/regression/reference/debugfalse/tutorial.json index e4e8afebc..cdafdba03 100644 --- a/regression/reference/debugfalse/tutorial.json +++ b/regression/reference/debugfalse/tutorial.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/debugfalse/typesTutorial.h b/regression/reference/debugfalse/typesTutorial.h index 5deafff17..7a9515e36 100644 --- a/regression/reference/debugfalse/typesTutorial.h +++ b/regression/reference/debugfalse/typesTutorial.h @@ -1,5 +1,5 @@ // typesTutorial.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/utilTutorial.cpp b/regression/reference/debugfalse/utilTutorial.cpp index cf1930e2f..0ef1a0cc4 100644 --- a/regression/reference/debugfalse/utilTutorial.cpp +++ b/regression/reference/debugfalse/utilTutorial.cpp @@ -1,5 +1,5 @@ // utilTutorial.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/wrapTutorial.cpp b/regression/reference/debugfalse/wrapTutorial.cpp index 369da4aac..8456638f1 100644 --- a/regression/reference/debugfalse/wrapTutorial.cpp +++ b/regression/reference/debugfalse/wrapTutorial.cpp @@ -1,5 +1,5 @@ // wrapTutorial.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/wrapTutorial.h b/regression/reference/debugfalse/wrapTutorial.h index 4e26c2f34..caf782cef 100644 --- a/regression/reference/debugfalse/wrapTutorial.h +++ b/regression/reference/debugfalse/wrapTutorial.h @@ -1,5 +1,5 @@ // wrapTutorial.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/debugfalse/wrapftutorial.f b/regression/reference/debugfalse/wrapftutorial.f index fe22c509f..e802bc0ce 100644 --- a/regression/reference/debugfalse/wrapftutorial.f +++ b/regression/reference/debugfalse/wrapftutorial.f @@ -1,5 +1,5 @@ ! wrapftutorial.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/enum.json b/regression/reference/enum-c/enum.json index 7012df724..e274af0ba 100644 --- a/regression/reference/enum-c/enum.json +++ b/regression/reference/enum-c/enum.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/enum-c/pyenummodule.c b/regression/reference/enum-c/pyenummodule.c index 6cbfa4305..bf0573042 100644 --- a/regression/reference/enum-c/pyenummodule.c +++ b/regression/reference/enum-c/pyenummodule.c @@ -1,5 +1,5 @@ // pyenummodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/pyenummodule.h b/regression/reference/enum-c/pyenummodule.h index bff23c902..a73c14678 100644 --- a/regression/reference/enum-c/pyenummodule.h +++ b/regression/reference/enum-c/pyenummodule.h @@ -1,5 +1,5 @@ // pyenummodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/setup.py b/regression/reference/enum-c/setup.py index 03bf2fa9c..15fb9564e 100644 --- a/regression/reference/enum-c/setup.py +++ b/regression/reference/enum-c/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/typesenum.h b/regression/reference/enum-c/typesenum.h index 85e40825e..88e3cfb30 100644 --- a/regression/reference/enum-c/typesenum.h +++ b/regression/reference/enum-c/typesenum.h @@ -1,5 +1,5 @@ // typesenum.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/wrapenum.c b/regression/reference/enum-c/wrapenum.c index 6abde1cf2..e11a10af2 100644 --- a/regression/reference/enum-c/wrapenum.c +++ b/regression/reference/enum-c/wrapenum.c @@ -1,5 +1,5 @@ // wrapenum.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/wrapenum.h b/regression/reference/enum-c/wrapenum.h index df7af02ed..20b3fbb9d 100644 --- a/regression/reference/enum-c/wrapenum.h +++ b/regression/reference/enum-c/wrapenum.h @@ -1,5 +1,5 @@ // wrapenum.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-c/wrapfenum.f b/regression/reference/enum-c/wrapfenum.f index 36bca7ed7..38548ced4 100644 --- a/regression/reference/enum-c/wrapfenum.f +++ b/regression/reference/enum-c/wrapfenum.f @@ -1,5 +1,5 @@ ! wrapfenum.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/enum.json b/regression/reference/enum-cxx/enum.json index 24a583a8a..a81312ec0 100644 --- a/regression/reference/enum-cxx/enum.json +++ b/regression/reference/enum-cxx/enum.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/enum-cxx/pyenummodule.cpp b/regression/reference/enum-cxx/pyenummodule.cpp index e26ecd5c7..63e612cc3 100644 --- a/regression/reference/enum-cxx/pyenummodule.cpp +++ b/regression/reference/enum-cxx/pyenummodule.cpp @@ -1,5 +1,5 @@ // pyenummodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/pyenummodule.hpp b/regression/reference/enum-cxx/pyenummodule.hpp index a4cf446a9..675024507 100644 --- a/regression/reference/enum-cxx/pyenummodule.hpp +++ b/regression/reference/enum-cxx/pyenummodule.hpp @@ -1,5 +1,5 @@ // pyenummodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/setup.py b/regression/reference/enum-cxx/setup.py index 7c444273f..8bc0c15ac 100644 --- a/regression/reference/enum-cxx/setup.py +++ b/regression/reference/enum-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/typesenum.h b/regression/reference/enum-cxx/typesenum.h index 9ced9604c..fee4e843b 100644 --- a/regression/reference/enum-cxx/typesenum.h +++ b/regression/reference/enum-cxx/typesenum.h @@ -1,5 +1,5 @@ // typesenum.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/wrapenum.cpp b/regression/reference/enum-cxx/wrapenum.cpp index ddaf1153d..d79dc1b6c 100644 --- a/regression/reference/enum-cxx/wrapenum.cpp +++ b/regression/reference/enum-cxx/wrapenum.cpp @@ -1,5 +1,5 @@ // wrapenum.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/wrapenum.h b/regression/reference/enum-cxx/wrapenum.h index 940576d95..cd6c36657 100644 --- a/regression/reference/enum-cxx/wrapenum.h +++ b/regression/reference/enum-cxx/wrapenum.h @@ -1,5 +1,5 @@ // wrapenum.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/enum-cxx/wrapfenum.f b/regression/reference/enum-cxx/wrapfenum.f index 36bca7ed7..38548ced4 100644 --- a/regression/reference/enum-cxx/wrapfenum.f +++ b/regression/reference/enum-cxx/wrapfenum.f @@ -1,5 +1,5 @@ ! wrapfenum.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/example.json b/regression/reference/example/example.json index fb9ad540d..95600cc6e 100644 --- a/regression/reference/example/example.json +++ b/regression/reference/example/example.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/example/luaUserLibrarymodule.cpp b/regression/reference/example/luaUserLibrarymodule.cpp index 839bbe457..0ba0eefd9 100644 --- a/regression/reference/example/luaUserLibrarymodule.cpp +++ b/regression/reference/example/luaUserLibrarymodule.cpp @@ -1,5 +1,5 @@ // luaUserLibrarymodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/luaUserLibrarymodule.hpp b/regression/reference/example/luaUserLibrarymodule.hpp index 07a8e3499..762dedb5f 100644 --- a/regression/reference/example/luaUserLibrarymodule.hpp +++ b/regression/reference/example/luaUserLibrarymodule.hpp @@ -1,5 +1,5 @@ // luaUserLibrarymodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyUserLibrary_example_nestedmodule.cpp b/regression/reference/example/pyUserLibrary_example_nestedmodule.cpp index 8a0ed8c8d..6d119f3d7 100644 --- a/regression/reference/example/pyUserLibrary_example_nestedmodule.cpp +++ b/regression/reference/example/pyUserLibrary_example_nestedmodule.cpp @@ -1,5 +1,5 @@ // pyUserLibrary_example_nestedmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyUserLibrary_examplemodule.cpp b/regression/reference/example/pyUserLibrary_examplemodule.cpp index a414631f5..9c71d8df2 100644 --- a/regression/reference/example/pyUserLibrary_examplemodule.cpp +++ b/regression/reference/example/pyUserLibrary_examplemodule.cpp @@ -1,5 +1,5 @@ // pyUserLibrary_examplemodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyUserLibrarymodule.cpp b/regression/reference/example/pyUserLibrarymodule.cpp index 38c743273..b83591fa6 100644 --- a/regression/reference/example/pyUserLibrarymodule.cpp +++ b/regression/reference/example/pyUserLibrarymodule.cpp @@ -1,5 +1,5 @@ // pyUserLibrarymodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyUserLibrarymodule.hpp b/regression/reference/example/pyUserLibrarymodule.hpp index 43c8450ae..97f6b686e 100644 --- a/regression/reference/example/pyUserLibrarymodule.hpp +++ b/regression/reference/example/pyUserLibrarymodule.hpp @@ -1,5 +1,5 @@ // pyUserLibrarymodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyUserLibraryutil.cpp b/regression/reference/example/pyUserLibraryutil.cpp index f588878bd..f510ed2cf 100644 --- a/regression/reference/example/pyUserLibraryutil.cpp +++ b/regression/reference/example/pyUserLibraryutil.cpp @@ -1,5 +1,5 @@ // pyUserLibraryutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyexample_nested_ExClass1type.cpp b/regression/reference/example/pyexample_nested_ExClass1type.cpp index ab62c594e..eec4cb0a0 100644 --- a/regression/reference/example/pyexample_nested_ExClass1type.cpp +++ b/regression/reference/example/pyexample_nested_ExClass1type.cpp @@ -1,5 +1,5 @@ // pyexample_nested_ExClass1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/pyexample_nested_ExClass2type.cpp b/regression/reference/example/pyexample_nested_ExClass2type.cpp index b4b8817eb..cebea32bc 100644 --- a/regression/reference/example/pyexample_nested_ExClass2type.cpp +++ b/regression/reference/example/pyexample_nested_ExClass2type.cpp @@ -1,5 +1,5 @@ // pyexample_nested_ExClass2type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/setup.py b/regression/reference/example/setup.py index d6d71bb1c..6d245f7a4 100644 --- a/regression/reference/example/setup.py +++ b/regression/reference/example/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/typesUserLibrary.h b/regression/reference/example/typesUserLibrary.h index a88f8765d..9fba333fa 100644 --- a/regression/reference/example/typesUserLibrary.h +++ b/regression/reference/example/typesUserLibrary.h @@ -1,5 +1,5 @@ // typesUserLibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/userlibrary_types.yaml b/regression/reference/example/userlibrary_types.yaml index d0533b3f4..c9b309618 100644 --- a/regression/reference/example/userlibrary_types.yaml +++ b/regression/reference/example/userlibrary_types.yaml @@ -1,5 +1,5 @@ # userlibrary_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/utilUserLibrary.cpp b/regression/reference/example/utilUserLibrary.cpp index de9e022dd..caf8d9182 100644 --- a/regression/reference/example/utilUserLibrary.cpp +++ b/regression/reference/example/utilUserLibrary.cpp @@ -1,5 +1,5 @@ // utilUserLibrary.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapUserLibrary.cpp b/regression/reference/example/wrapUserLibrary.cpp index d12d610e0..53ccc3f29 100644 --- a/regression/reference/example/wrapUserLibrary.cpp +++ b/regression/reference/example/wrapUserLibrary.cpp @@ -1,5 +1,5 @@ // wrapUserLibrary.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapUserLibrary_example_nested.cpp b/regression/reference/example/wrapUserLibrary_example_nested.cpp index 3c5c80305..bacee8a6f 100644 --- a/regression/reference/example/wrapUserLibrary_example_nested.cpp +++ b/regression/reference/example/wrapUserLibrary_example_nested.cpp @@ -1,5 +1,5 @@ // wrapUserLibrary_example_nested.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapUserLibrary_example_nested.h b/regression/reference/example/wrapUserLibrary_example_nested.h index 63ef00bd0..8390bf2c4 100644 --- a/regression/reference/example/wrapUserLibrary_example_nested.h +++ b/regression/reference/example/wrapUserLibrary_example_nested.h @@ -1,5 +1,5 @@ // wrapUserLibrary_example_nested.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapexample_nested_ExClass1.cpp b/regression/reference/example/wrapexample_nested_ExClass1.cpp index 268177503..3ee04d3fb 100644 --- a/regression/reference/example/wrapexample_nested_ExClass1.cpp +++ b/regression/reference/example/wrapexample_nested_ExClass1.cpp @@ -1,5 +1,5 @@ // wrapexample_nested_ExClass1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapexample_nested_ExClass1.h b/regression/reference/example/wrapexample_nested_ExClass1.h index 4e9b12f48..9fbc35530 100644 --- a/regression/reference/example/wrapexample_nested_ExClass1.h +++ b/regression/reference/example/wrapexample_nested_ExClass1.h @@ -1,5 +1,5 @@ // wrapexample_nested_ExClass1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapexample_nested_ExClass2.cpp b/regression/reference/example/wrapexample_nested_ExClass2.cpp index d761f1cce..d0e517241 100644 --- a/regression/reference/example/wrapexample_nested_ExClass2.cpp +++ b/regression/reference/example/wrapexample_nested_ExClass2.cpp @@ -1,5 +1,5 @@ // wrapexample_nested_ExClass2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapexample_nested_ExClass2.h b/regression/reference/example/wrapexample_nested_ExClass2.h index 006661d6e..f1de45172 100644 --- a/regression/reference/example/wrapexample_nested_ExClass2.h +++ b/regression/reference/example/wrapexample_nested_ExClass2.h @@ -1,5 +1,5 @@ // wrapexample_nested_ExClass2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapfUserLibrary_example.f b/regression/reference/example/wrapfUserLibrary_example.f index bacab3c3f..6cefcc4b2 100644 --- a/regression/reference/example/wrapfUserLibrary_example.f +++ b/regression/reference/example/wrapfUserLibrary_example.f @@ -1,5 +1,5 @@ ! wrapfUserLibrary_example.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapfUserLibrary_example_nested.f b/regression/reference/example/wrapfUserLibrary_example_nested.f index 566b4ce0f..5113253cf 100644 --- a/regression/reference/example/wrapfUserLibrary_example_nested.f +++ b/regression/reference/example/wrapfUserLibrary_example_nested.f @@ -1,5 +1,5 @@ ! wrapfUserLibrary_example_nested.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/example/wrapfuserlibrary.f b/regression/reference/example/wrapfuserlibrary.f index 343dfec76..f78af06a2 100644 --- a/regression/reference/example/wrapfuserlibrary.f +++ b/regression/reference/example/wrapfuserlibrary.f @@ -1,5 +1,5 @@ ! wrapfuserlibrary.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/forward.json b/regression/reference/forward/forward.json index 355fceaac..3e2d7080a 100644 --- a/regression/reference/forward/forward.json +++ b/regression/reference/forward/forward.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/forward/forward_types.yaml b/regression/reference/forward/forward_types.yaml index 92e8b355e..ed9cf1dc5 100644 --- a/regression/reference/forward/forward_types.yaml +++ b/regression/reference/forward/forward_types.yaml @@ -1,5 +1,5 @@ # forward_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/luaforwardmodule.cpp b/regression/reference/forward/luaforwardmodule.cpp index 6208759cb..8b7ce50c5 100644 --- a/regression/reference/forward/luaforwardmodule.cpp +++ b/regression/reference/forward/luaforwardmodule.cpp @@ -1,5 +1,5 @@ // luaforwardmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/luaforwardmodule.hpp b/regression/reference/forward/luaforwardmodule.hpp index 3e605e95f..ccbef52f7 100644 --- a/regression/reference/forward/luaforwardmodule.hpp +++ b/regression/reference/forward/luaforwardmodule.hpp @@ -1,5 +1,5 @@ // luaforwardmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/pyClass2type.cpp b/regression/reference/forward/pyClass2type.cpp index 3acb0f1f4..43bb9a8d7 100644 --- a/regression/reference/forward/pyClass2type.cpp +++ b/regression/reference/forward/pyClass2type.cpp @@ -1,5 +1,5 @@ // pyClass2type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/pyClass3type.cpp b/regression/reference/forward/pyClass3type.cpp index b27af592e..173c1c249 100644 --- a/regression/reference/forward/pyClass3type.cpp +++ b/regression/reference/forward/pyClass3type.cpp @@ -1,5 +1,5 @@ // pyClass3type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/pyforwardmodule.cpp b/regression/reference/forward/pyforwardmodule.cpp index df055b815..7adb8d115 100644 --- a/regression/reference/forward/pyforwardmodule.cpp +++ b/regression/reference/forward/pyforwardmodule.cpp @@ -1,5 +1,5 @@ // pyforwardmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/pyforwardmodule.hpp b/regression/reference/forward/pyforwardmodule.hpp index 2988c6171..1af6fedb8 100644 --- a/regression/reference/forward/pyforwardmodule.hpp +++ b/regression/reference/forward/pyforwardmodule.hpp @@ -1,5 +1,5 @@ // pyforwardmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/pyforwardutil.cpp b/regression/reference/forward/pyforwardutil.cpp index 449dd35ef..ab5fe3de1 100644 --- a/regression/reference/forward/pyforwardutil.cpp +++ b/regression/reference/forward/pyforwardutil.cpp @@ -1,5 +1,5 @@ // pyforwardutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/setup.py b/regression/reference/forward/setup.py index b6dda988e..10b81a538 100644 --- a/regression/reference/forward/setup.py +++ b/regression/reference/forward/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/typesforward.h b/regression/reference/forward/typesforward.h index c72808a07..38fe3fbbf 100644 --- a/regression/reference/forward/typesforward.h +++ b/regression/reference/forward/typesforward.h @@ -1,5 +1,5 @@ // typesforward.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/wrapClass2.cpp b/regression/reference/forward/wrapClass2.cpp index d69f79f50..c9a46370b 100644 --- a/regression/reference/forward/wrapClass2.cpp +++ b/regression/reference/forward/wrapClass2.cpp @@ -1,5 +1,5 @@ // wrapClass2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/wrapClass2.h b/regression/reference/forward/wrapClass2.h index c08c75cfd..79612e701 100644 --- a/regression/reference/forward/wrapClass2.h +++ b/regression/reference/forward/wrapClass2.h @@ -1,5 +1,5 @@ // wrapClass2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/wrapfforward.f b/regression/reference/forward/wrapfforward.f index f116780dc..af0060e24 100644 --- a/regression/reference/forward/wrapfforward.f +++ b/regression/reference/forward/wrapfforward.f @@ -1,5 +1,5 @@ ! wrapfforward.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/forward/wrapforward.cpp b/regression/reference/forward/wrapforward.cpp index 957e6d402..213841aa3 100644 --- a/regression/reference/forward/wrapforward.cpp +++ b/regression/reference/forward/wrapforward.cpp @@ -1,5 +1,5 @@ // wrapforward.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/generic/generic.json b/regression/reference/generic/generic.json index e151a6b9e..b90f8e832 100644 --- a/regression/reference/generic/generic.json +++ b/regression/reference/generic/generic.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/generic/typesgeneric.h b/regression/reference/generic/typesgeneric.h index f3cde71d2..77a20ba06 100644 --- a/regression/reference/generic/typesgeneric.h +++ b/regression/reference/generic/typesgeneric.h @@ -1,5 +1,5 @@ // typesgeneric.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/generic/wrapfgeneric.f b/regression/reference/generic/wrapfgeneric.f index 7bf248290..d8cb991b2 100644 --- a/regression/reference/generic/wrapfgeneric.f +++ b/regression/reference/generic/wrapfgeneric.f @@ -1,5 +1,5 @@ ! wrapfgeneric.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/generic/wrapgeneric.c b/regression/reference/generic/wrapgeneric.c index 0c6abda7b..c101cdddc 100644 --- a/regression/reference/generic/wrapgeneric.c +++ b/regression/reference/generic/wrapgeneric.c @@ -1,5 +1,5 @@ // wrapgeneric.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/generic/wrapgeneric.h b/regression/reference/generic/wrapgeneric.h index 955c46625..1b703c357 100644 --- a/regression/reference/generic/wrapgeneric.h +++ b/regression/reference/generic/wrapgeneric.h @@ -1,5 +1,5 @@ // wrapgeneric.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/include.json b/regression/reference/include/include.json index dfc712c49..23b27e21f 100644 --- a/regression/reference/include/include.json +++ b/regression/reference/include/include.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/include/library_types.yaml b/regression/reference/include/library_types.yaml index 6ec70fbc9..1fe1f5cc2 100644 --- a/regression/reference/include/library_types.yaml +++ b/regression/reference/include/library_types.yaml @@ -1,5 +1,5 @@ # library_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/typeslibrary.h b/regression/reference/include/typeslibrary.h index 21364c0ce..0c6408c8a 100644 --- a/regression/reference/include/typeslibrary.h +++ b/regression/reference/include/typeslibrary.h @@ -1,5 +1,5 @@ // typeslibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapClass2.cpp b/regression/reference/include/wrapClass2.cpp index d4a8b6aaf..a854f0224 100644 --- a/regression/reference/include/wrapClass2.cpp +++ b/regression/reference/include/wrapClass2.cpp @@ -1,5 +1,5 @@ // wrapClass2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapClass2.h b/regression/reference/include/wrapClass2.h index 91f65e82f..dbef60289 100644 --- a/regression/reference/include/wrapClass2.h +++ b/regression/reference/include/wrapClass2.h @@ -1,5 +1,5 @@ // wrapClass2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapflibrary.f b/regression/reference/include/wrapflibrary.f index 7c76f113d..85ff4b8aa 100644 --- a/regression/reference/include/wrapflibrary.f +++ b/regression/reference/include/wrapflibrary.f @@ -1,5 +1,5 @@ ! wrapflibrary.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapflibrary_one.f b/regression/reference/include/wrapflibrary_one.f index 1ba886339..c371b1e98 100644 --- a/regression/reference/include/wrapflibrary_one.f +++ b/regression/reference/include/wrapflibrary_one.f @@ -1,5 +1,5 @@ ! wrapflibrary_one.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapflibrary_one_two.f b/regression/reference/include/wrapflibrary_one_two.f index 1bf6de3c5..58b494028 100644 --- a/regression/reference/include/wrapflibrary_one_two.f +++ b/regression/reference/include/wrapflibrary_one_two.f @@ -1,5 +1,5 @@ ! wrapflibrary_one_two.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapflibrary_outer1.f b/regression/reference/include/wrapflibrary_outer1.f index 358a9cbe6..39334276a 100644 --- a/regression/reference/include/wrapflibrary_outer1.f +++ b/regression/reference/include/wrapflibrary_outer1.f @@ -1,5 +1,5 @@ ! wrapflibrary_outer1.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapflibrary_outer2.f b/regression/reference/include/wrapflibrary_outer2.f index 397341176..3c7a2e40c 100644 --- a/regression/reference/include/wrapflibrary_outer2.f +++ b/regression/reference/include/wrapflibrary_outer2.f @@ -1,5 +1,5 @@ ! wrapflibrary_outer2.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapflibrary_three.f b/regression/reference/include/wrapflibrary_three.f index aab2679ee..000453772 100644 --- a/regression/reference/include/wrapflibrary_three.f +++ b/regression/reference/include/wrapflibrary_three.f @@ -1,5 +1,5 @@ ! wrapflibrary_three.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary.cpp b/regression/reference/include/wraplibrary.cpp index 88c2de542..dfb6affa6 100644 --- a/regression/reference/include/wraplibrary.cpp +++ b/regression/reference/include/wraplibrary.cpp @@ -1,5 +1,5 @@ // wraplibrary.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary_one_two.cpp b/regression/reference/include/wraplibrary_one_two.cpp index 4e7b6b123..0f77548dc 100644 --- a/regression/reference/include/wraplibrary_one_two.cpp +++ b/regression/reference/include/wraplibrary_one_two.cpp @@ -1,5 +1,5 @@ // wraplibrary_one_two.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary_one_two.h b/regression/reference/include/wraplibrary_one_two.h index 54c5927ec..23947498d 100644 --- a/regression/reference/include/wraplibrary_one_two.h +++ b/regression/reference/include/wraplibrary_one_two.h @@ -1,5 +1,5 @@ // wraplibrary_one_two.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary_outer1.cpp b/regression/reference/include/wraplibrary_outer1.cpp index 2a9ffa017..ca65248f8 100644 --- a/regression/reference/include/wraplibrary_outer1.cpp +++ b/regression/reference/include/wraplibrary_outer1.cpp @@ -1,5 +1,5 @@ // wraplibrary_outer1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary_outer1.h b/regression/reference/include/wraplibrary_outer1.h index 61f585cb1..4477536a0 100644 --- a/regression/reference/include/wraplibrary_outer1.h +++ b/regression/reference/include/wraplibrary_outer1.h @@ -1,5 +1,5 @@ // wraplibrary_outer1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary_outer2.cpp b/regression/reference/include/wraplibrary_outer2.cpp index 93e805547..ff135e3cc 100644 --- a/regression/reference/include/wraplibrary_outer2.cpp +++ b/regression/reference/include/wraplibrary_outer2.cpp @@ -1,5 +1,5 @@ // wraplibrary_outer2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wraplibrary_outer2.h b/regression/reference/include/wraplibrary_outer2.h index 69ba32f51..89920cbab 100644 --- a/regression/reference/include/wraplibrary_outer2.h +++ b/regression/reference/include/wraplibrary_outer2.h @@ -1,5 +1,5 @@ // wraplibrary_outer2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapouter1_class0.cpp b/regression/reference/include/wrapouter1_class0.cpp index 99202c9e2..7ba755f12 100644 --- a/regression/reference/include/wrapouter1_class0.cpp +++ b/regression/reference/include/wrapouter1_class0.cpp @@ -1,5 +1,5 @@ // wrapouter1_class0.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapouter1_class0.h b/regression/reference/include/wrapouter1_class0.h index fffe558d0..689c7b7e4 100644 --- a/regression/reference/include/wrapouter1_class0.h +++ b/regression/reference/include/wrapouter1_class0.h @@ -1,5 +1,5 @@ // wrapouter1_class0.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapouter2_class0.cpp b/regression/reference/include/wrapouter2_class0.cpp index 0b643cb4c..ab66758fd 100644 --- a/regression/reference/include/wrapouter2_class0.cpp +++ b/regression/reference/include/wrapouter2_class0.cpp @@ -1,5 +1,5 @@ // wrapouter2_class0.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapouter2_class0.h b/regression/reference/include/wrapouter2_class0.h index 2cb3c5caa..b72d29df3 100644 --- a/regression/reference/include/wrapouter2_class0.h +++ b/regression/reference/include/wrapouter2_class0.h @@ -1,5 +1,5 @@ // wrapouter2_class0.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapthree_Class1.cpp b/regression/reference/include/wrapthree_Class1.cpp index 3b1a52d8a..9b5c70885 100644 --- a/regression/reference/include/wrapthree_Class1.cpp +++ b/regression/reference/include/wrapthree_Class1.cpp @@ -1,5 +1,5 @@ // wrapthree_Class1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/include/wrapthree_Class1.h b/regression/reference/include/wrapthree_Class1.h index 028892ef1..9319dd225 100644 --- a/regression/reference/include/wrapthree_Class1.h +++ b/regression/reference/include/wrapthree_Class1.h @@ -1,5 +1,5 @@ // wrapthree_Class1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/interface/interface.json b/regression/reference/interface/interface.json index 9d70612d3..b1c922bcb 100644 --- a/regression/reference/interface/interface.json +++ b/regression/reference/interface/interface.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/interface/typesInterface.h b/regression/reference/interface/typesInterface.h index fa148a199..aaa979fb8 100644 --- a/regression/reference/interface/typesInterface.h +++ b/regression/reference/interface/typesInterface.h @@ -1,5 +1,5 @@ // typesInterface.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/interface/wrapInterface.c b/regression/reference/interface/wrapInterface.c index 0946947e1..5401b61a2 100644 --- a/regression/reference/interface/wrapInterface.c +++ b/regression/reference/interface/wrapInterface.c @@ -1,5 +1,5 @@ // wrapInterface.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/interface/wrapfinterface.f b/regression/reference/interface/wrapfinterface.f index cc0e4e91e..f9f19e38c 100644 --- a/regression/reference/interface/wrapfinterface.f +++ b/regression/reference/interface/wrapfinterface.f @@ -1,5 +1,5 @@ ! wrapfinterface.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/memdoc/memdoc.json b/regression/reference/memdoc/memdoc.json index 4c8ea67eb..2b3e27b7c 100644 --- a/regression/reference/memdoc/memdoc.json +++ b/regression/reference/memdoc/memdoc.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/memdoc/typesmemdoc.h b/regression/reference/memdoc/typesmemdoc.h index ffac21c4c..71dedde52 100644 --- a/regression/reference/memdoc/typesmemdoc.h +++ b/regression/reference/memdoc/typesmemdoc.h @@ -1,5 +1,5 @@ // typesmemdoc.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/memdoc/utilmemdoc.cpp b/regression/reference/memdoc/utilmemdoc.cpp index 589455b9b..08610de2f 100644 --- a/regression/reference/memdoc/utilmemdoc.cpp +++ b/regression/reference/memdoc/utilmemdoc.cpp @@ -1,5 +1,5 @@ // utilmemdoc.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/memdoc/wrapfmemdoc.f b/regression/reference/memdoc/wrapfmemdoc.f index ff98dd321..a36059d21 100644 --- a/regression/reference/memdoc/wrapfmemdoc.f +++ b/regression/reference/memdoc/wrapfmemdoc.f @@ -1,5 +1,5 @@ ! wrapfmemdoc.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/memdoc/wrapmemdoc.cpp b/regression/reference/memdoc/wrapmemdoc.cpp index eb9007624..26ce60f4c 100644 --- a/regression/reference/memdoc/wrapmemdoc.cpp +++ b/regression/reference/memdoc/wrapmemdoc.cpp @@ -1,5 +1,5 @@ // wrapmemdoc.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/memdoc/wrapmemdoc.h b/regression/reference/memdoc/wrapmemdoc.h index f4308b2f6..67847b5f9 100644 --- a/regression/reference/memdoc/wrapmemdoc.h +++ b/regression/reference/memdoc/wrapmemdoc.h @@ -1,5 +1,5 @@ // wrapmemdoc.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/foo.cpp b/regression/reference/names/foo.cpp index f6d762663..559ae63d0 100644 --- a/regression/reference/names/foo.cpp +++ b/regression/reference/names/foo.cpp @@ -1,5 +1,5 @@ // foo.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/foo.f b/regression/reference/names/foo.f index 36d1c8eb6..126d13db7 100644 --- a/regression/reference/names/foo.f +++ b/regression/reference/names/foo.f @@ -1,5 +1,5 @@ ! foo.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/foo.h b/regression/reference/names/foo.h index 2b10961fd..3a3be20bb 100644 --- a/regression/reference/names/foo.h +++ b/regression/reference/names/foo.h @@ -1,5 +1,5 @@ // foo.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/foons0.cpp b/regression/reference/names/foons0.cpp index f8703fb74..da80b4471 100644 --- a/regression/reference/names/foons0.cpp +++ b/regression/reference/names/foons0.cpp @@ -1,5 +1,5 @@ // foons0.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/names.json b/regression/reference/names/names.json index b1ed3be6b..c9fdd439b 100644 --- a/regression/reference/names/names.json +++ b/regression/reference/names/names.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/names/pyNames2type.cpp b/regression/reference/names/pyNames2type.cpp index 7b96f0e93..815487358 100644 --- a/regression/reference/names/pyNames2type.cpp +++ b/regression/reference/names/pyNames2type.cpp @@ -1,5 +1,5 @@ // pyNames2type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pyns0_Namestype.cpp b/regression/reference/names/pyns0_Namestype.cpp index 1203b5299..961924bfc 100644 --- a/regression/reference/names/pyns0_Namestype.cpp +++ b/regression/reference/names/pyns0_Namestype.cpp @@ -1,5 +1,5 @@ // pyns0_Namestype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pystd_vector_doubletype.cpp b/regression/reference/names/pystd_vector_doubletype.cpp index 0440738d7..ed553318d 100644 --- a/regression/reference/names/pystd_vector_doubletype.cpp +++ b/regression/reference/names/pystd_vector_doubletype.cpp @@ -1,5 +1,5 @@ // pystd_vector_doubletype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pystd_vector_instantiation3type.cpp b/regression/reference/names/pystd_vector_instantiation3type.cpp index 21d481b78..81856d5ad 100644 --- a/regression/reference/names/pystd_vector_instantiation3type.cpp +++ b/regression/reference/names/pystd_vector_instantiation3type.cpp @@ -1,5 +1,5 @@ // pystd_vector_instantiation3type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pystd_vector_instantiation5type.cpp b/regression/reference/names/pystd_vector_instantiation5type.cpp index 7b54a118e..a7ed90d35 100644 --- a/regression/reference/names/pystd_vector_instantiation5type.cpp +++ b/regression/reference/names/pystd_vector_instantiation5type.cpp @@ -1,5 +1,5 @@ // pystd_vector_instantiation5type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pystd_vector_inttype.cpp b/regression/reference/names/pystd_vector_inttype.cpp index bbb26110d..b4de50c09 100644 --- a/regression/reference/names/pystd_vector_inttype.cpp +++ b/regression/reference/names/pystd_vector_inttype.cpp @@ -1,5 +1,5 @@ // pystd_vector_inttype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnames_internalmodule.cpp b/regression/reference/names/pytestnames_internalmodule.cpp index a738a9e81..439f730b1 100644 --- a/regression/reference/names/pytestnames_internalmodule.cpp +++ b/regression/reference/names/pytestnames_internalmodule.cpp @@ -1,5 +1,5 @@ // pytestnames_internalmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnames_ns0_innermodule.cpp b/regression/reference/names/pytestnames_ns0_innermodule.cpp index ba649c98b..dff96b95f 100644 --- a/regression/reference/names/pytestnames_ns0_innermodule.cpp +++ b/regression/reference/names/pytestnames_ns0_innermodule.cpp @@ -1,5 +1,5 @@ // pytestnames_ns0_innermodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnames_ns0module.cpp b/regression/reference/names/pytestnames_ns0module.cpp index 6e0028732..949e99d23 100644 --- a/regression/reference/names/pytestnames_ns0module.cpp +++ b/regression/reference/names/pytestnames_ns0module.cpp @@ -1,5 +1,5 @@ // pytestnames_ns0module.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnames_ns1module.cpp b/regression/reference/names/pytestnames_ns1module.cpp index fdc26591a..20e0c285c 100644 --- a/regression/reference/names/pytestnames_ns1module.cpp +++ b/regression/reference/names/pytestnames_ns1module.cpp @@ -1,5 +1,5 @@ // pytestnames_ns1module.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnames_stdmodule.cpp b/regression/reference/names/pytestnames_stdmodule.cpp index 6e3a3baec..b134cd1ec 100644 --- a/regression/reference/names/pytestnames_stdmodule.cpp +++ b/regression/reference/names/pytestnames_stdmodule.cpp @@ -1,5 +1,5 @@ // pytestnames_stdmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnamesmodule.cpp b/regression/reference/names/pytestnamesmodule.cpp index 323f2bbe7..cc57ef9bc 100644 --- a/regression/reference/names/pytestnamesmodule.cpp +++ b/regression/reference/names/pytestnamesmodule.cpp @@ -1,5 +1,5 @@ // pytestnamesmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnamesmodule.hpp b/regression/reference/names/pytestnamesmodule.hpp index 2a4249c0e..2b9f96d3b 100644 --- a/regression/reference/names/pytestnamesmodule.hpp +++ b/regression/reference/names/pytestnamesmodule.hpp @@ -1,5 +1,5 @@ // pytestnamesmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytestnamesutil.cpp b/regression/reference/names/pytestnamesutil.cpp index 46a0b76e5..c1e1c74e8 100644 --- a/regression/reference/names/pytestnamesutil.cpp +++ b/regression/reference/names/pytestnamesutil.cpp @@ -1,5 +1,5 @@ // pytestnamesutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytwoTs_0type.cpp b/regression/reference/names/pytwoTs_0type.cpp index 95b473b21..a733daf18 100644 --- a/regression/reference/names/pytwoTs_0type.cpp +++ b/regression/reference/names/pytwoTs_0type.cpp @@ -1,5 +1,5 @@ // pytwoTs_0type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/pytwoTs_instantiation4type.cpp b/regression/reference/names/pytwoTs_instantiation4type.cpp index 1eb043e05..7d9cd87ed 100644 --- a/regression/reference/names/pytwoTs_instantiation4type.cpp +++ b/regression/reference/names/pytwoTs_instantiation4type.cpp @@ -1,5 +1,5 @@ // pytwoTs_instantiation4type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/setup.py b/regression/reference/names/setup.py index 4aa9a460c..2c1a23301 100644 --- a/regression/reference/names/setup.py +++ b/regression/reference/names/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/testnames_types.yaml b/regression/reference/names/testnames_types.yaml index 4a6ccf842..b4116728d 100644 --- a/regression/reference/names/testnames_types.yaml +++ b/regression/reference/names/testnames_types.yaml @@ -1,5 +1,5 @@ # testnames_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/top.cpp b/regression/reference/names/top.cpp index 5fa3da845..5df3dfc88 100644 --- a/regression/reference/names/top.cpp +++ b/regression/reference/names/top.cpp @@ -1,5 +1,5 @@ // top.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/top.f b/regression/reference/names/top.f index ea308cb5c..f61e42803 100644 --- a/regression/reference/names/top.f +++ b/regression/reference/names/top.f @@ -1,5 +1,5 @@ ! top.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/top.h b/regression/reference/names/top.h index 2faf41b4e..a12673807 100644 --- a/regression/reference/names/top.h +++ b/regression/reference/names/top.h @@ -1,5 +1,5 @@ // top.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/typestestnames.hh b/regression/reference/names/typestestnames.hh index 88e270f93..c7bff986a 100644 --- a/regression/reference/names/typestestnames.hh +++ b/regression/reference/names/typestestnames.hh @@ -1,5 +1,5 @@ // typestestnames.hh -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapCAPI_Class1.cc b/regression/reference/names/wrapCAPI_Class1.cc index 745284345..c48c379e7 100644 --- a/regression/reference/names/wrapCAPI_Class1.cc +++ b/regression/reference/names/wrapCAPI_Class1.cc @@ -1,5 +1,5 @@ // wrapCAPI_Class1.cc -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapCAPI_Class1.hh b/regression/reference/names/wrapCAPI_Class1.hh index 5182ba880..ba1cac81f 100644 --- a/regression/reference/names/wrapCAPI_Class1.hh +++ b/regression/reference/names/wrapCAPI_Class1.hh @@ -1,5 +1,5 @@ // wrapCAPI_Class1.hh -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapNames2.cc b/regression/reference/names/wrapNames2.cc index f730cfda3..1521cc1a9 100644 --- a/regression/reference/names/wrapNames2.cc +++ b/regression/reference/names/wrapNames2.cc @@ -1,5 +1,5 @@ // wrapNames2.cc -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapftestnames_CAPI.F b/regression/reference/names/wrapftestnames_CAPI.F index 4829e7914..357147b9a 100644 --- a/regression/reference/names/wrapftestnames_CAPI.F +++ b/regression/reference/names/wrapftestnames_CAPI.F @@ -1,5 +1,5 @@ ! wrapftestnames_CAPI.F -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapftestnames_internal.F b/regression/reference/names/wrapftestnames_internal.F index a672e6867..c015fd449 100644 --- a/regression/reference/names/wrapftestnames_internal.F +++ b/regression/reference/names/wrapftestnames_internal.F @@ -1,5 +1,5 @@ ! wrapftestnames_internal.F -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapftestnames_ns0_inner.F b/regression/reference/names/wrapftestnames_ns0_inner.F index 478528244..b4135537b 100644 --- a/regression/reference/names/wrapftestnames_ns0_inner.F +++ b/regression/reference/names/wrapftestnames_ns0_inner.F @@ -1,5 +1,5 @@ ! wrapftestnames_ns0_inner.F -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapftestnames_ns1.F b/regression/reference/names/wrapftestnames_ns1.F index b8552c2b1..9ebc5cdb3 100644 --- a/regression/reference/names/wrapftestnames_ns1.F +++ b/regression/reference/names/wrapftestnames_ns1.F @@ -1,5 +1,5 @@ ! wrapftestnames_ns1.F -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wrapftestnames_std.F b/regression/reference/names/wrapftestnames_std.F index 0e8085cb6..273fadac8 100644 --- a/regression/reference/names/wrapftestnames_std.F +++ b/regression/reference/names/wrapftestnames_std.F @@ -1,5 +1,5 @@ ! wrapftestnames_std.F -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wraptestnames_CAPI.cc b/regression/reference/names/wraptestnames_CAPI.cc index 715e18d8f..f24e26a52 100644 --- a/regression/reference/names/wraptestnames_CAPI.cc +++ b/regression/reference/names/wraptestnames_CAPI.cc @@ -1,5 +1,5 @@ // wraptestnames_CAPI.cc -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wraptestnames_CAPI.hh b/regression/reference/names/wraptestnames_CAPI.hh index bc3ff7a0f..49fb23ae8 100644 --- a/regression/reference/names/wraptestnames_CAPI.hh +++ b/regression/reference/names/wraptestnames_CAPI.hh @@ -1,5 +1,5 @@ // wraptestnames_CAPI.hh -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wraptestnames_ns0_inner.cc b/regression/reference/names/wraptestnames_ns0_inner.cc index d04c7ae56..9f5fb1a0e 100644 --- a/regression/reference/names/wraptestnames_ns0_inner.cc +++ b/regression/reference/names/wraptestnames_ns0_inner.cc @@ -1,5 +1,5 @@ // wraptestnames_ns0_inner.cc -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wraptestnames_ns1.cc b/regression/reference/names/wraptestnames_ns1.cc index 280c2a6b3..d2d2a4b6c 100644 --- a/regression/reference/names/wraptestnames_ns1.cc +++ b/regression/reference/names/wraptestnames_ns1.cc @@ -1,5 +1,5 @@ // wraptestnames_ns1.cc -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names/wraptestnames_ns1.hh b/regression/reference/names/wraptestnames_ns1.hh index 1a2dc621b..c381d5cfa 100644 --- a/regression/reference/names/wraptestnames_ns1.hh +++ b/regression/reference/names/wraptestnames_ns1.hh @@ -1,5 +1,5 @@ // wraptestnames_ns1.hh -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names2/names2.json b/regression/reference/names2/names2.json index 3a44ee073..399feadf5 100644 --- a/regression/reference/names2/names2.json +++ b/regression/reference/names2/names2.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/names2/names_types.yaml b/regression/reference/names2/names_types.yaml index e36ac1a06..0bbcdedad 100644 --- a/regression/reference/names2/names_types.yaml +++ b/regression/reference/names2/names_types.yaml @@ -1,5 +1,5 @@ # names_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names2/typesNames.h b/regression/reference/names2/typesNames.h index e367c8253..0fdc65625 100644 --- a/regression/reference/names2/typesNames.h +++ b/regression/reference/names2/typesNames.h @@ -1,5 +1,5 @@ // typesNames.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names2/wrapNames.cpp b/regression/reference/names2/wrapNames.cpp index 634e89f12..6a8a466ce 100644 --- a/regression/reference/names2/wrapNames.cpp +++ b/regression/reference/names2/wrapNames.cpp @@ -1,5 +1,5 @@ // wrapNames.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names2/wrapNames.h b/regression/reference/names2/wrapNames.h index f4fc1f5ae..3cef6acc2 100644 --- a/regression/reference/names2/wrapNames.h +++ b/regression/reference/names2/wrapNames.h @@ -1,5 +1,5 @@ // wrapNames.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/names2/wrapfnames.f b/regression/reference/names2/wrapfnames.f index 01075b99c..bec2ba546 100644 --- a/regression/reference/names2/wrapfnames.f +++ b/regression/reference/names2/wrapfnames.f @@ -1,5 +1,5 @@ ! wrapfnames.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/namespace.json b/regression/reference/namespace/namespace.json index cf4356deb..c1e0087da 100644 --- a/regression/reference/namespace/namespace.json +++ b/regression/reference/namespace/namespace.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/namespace/ns_types.yaml b/regression/reference/namespace/ns_types.yaml index a3cbe8142..1ed464b38 100644 --- a/regression/reference/namespace/ns_types.yaml +++ b/regression/reference/namespace/ns_types.yaml @@ -1,5 +1,5 @@ # ns_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pyns_nsworkmodule.cpp b/regression/reference/namespace/pyns_nsworkmodule.cpp index 182817fff..8b8dc3d0f 100644 --- a/regression/reference/namespace/pyns_nsworkmodule.cpp +++ b/regression/reference/namespace/pyns_nsworkmodule.cpp @@ -1,5 +1,5 @@ // pyns_nsworkmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pyns_outermodule.cpp b/regression/reference/namespace/pyns_outermodule.cpp index c0143edb3..5dca027af 100644 --- a/regression/reference/namespace/pyns_outermodule.cpp +++ b/regression/reference/namespace/pyns_outermodule.cpp @@ -1,5 +1,5 @@ // pyns_outermodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pynsmodule.cpp b/regression/reference/namespace/pynsmodule.cpp index a2fef0f5a..e355c19db 100644 --- a/regression/reference/namespace/pynsmodule.cpp +++ b/regression/reference/namespace/pynsmodule.cpp @@ -1,5 +1,5 @@ // pynsmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pynsmodule.hpp b/regression/reference/namespace/pynsmodule.hpp index a2ee49758..155509ddb 100644 --- a/regression/reference/namespace/pynsmodule.hpp +++ b/regression/reference/namespace/pynsmodule.hpp @@ -1,5 +1,5 @@ // pynsmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pynsutil.cpp b/regression/reference/namespace/pynsutil.cpp index c64976f3d..3ac365349 100644 --- a/regression/reference/namespace/pynsutil.cpp +++ b/regression/reference/namespace/pynsutil.cpp @@ -1,5 +1,5 @@ // pynsutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pynswork_ClassWorktype.cpp b/regression/reference/namespace/pynswork_ClassWorktype.cpp index f717b905d..3d86ff474 100644 --- a/regression/reference/namespace/pynswork_ClassWorktype.cpp +++ b/regression/reference/namespace/pynswork_ClassWorktype.cpp @@ -1,5 +1,5 @@ // pynswork_ClassWorktype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/pyouter_Cstruct1type.cpp b/regression/reference/namespace/pyouter_Cstruct1type.cpp index 38aae068f..541cfc4b7 100644 --- a/regression/reference/namespace/pyouter_Cstruct1type.cpp +++ b/regression/reference/namespace/pyouter_Cstruct1type.cpp @@ -1,5 +1,5 @@ // pyouter_Cstruct1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/setup.py b/regression/reference/namespace/setup.py index e0dd5cde8..72f8a5a9e 100644 --- a/regression/reference/namespace/setup.py +++ b/regression/reference/namespace/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/typesns.h b/regression/reference/namespace/typesns.h index 6bc4806c0..1904c5b6e 100644 --- a/regression/reference/namespace/typesns.h +++ b/regression/reference/namespace/typesns.h @@ -1,5 +1,5 @@ // typesns.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/utilns.cpp b/regression/reference/namespace/utilns.cpp index 0008af2d9..e0efba161 100644 --- a/regression/reference/namespace/utilns.cpp +++ b/regression/reference/namespace/utilns.cpp @@ -1,5 +1,5 @@ // utilns.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapfns.f b/regression/reference/namespace/wrapfns.f index b76a4afd0..04d8a9652 100644 --- a/regression/reference/namespace/wrapfns.f +++ b/regression/reference/namespace/wrapfns.f @@ -1,5 +1,5 @@ ! wrapfns.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapfns_outer.f b/regression/reference/namespace/wrapfns_outer.f index 2e4d1a136..9f351cab5 100644 --- a/regression/reference/namespace/wrapfns_outer.f +++ b/regression/reference/namespace/wrapfns_outer.f @@ -1,5 +1,5 @@ ! wrapfns_outer.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapns.cpp b/regression/reference/namespace/wrapns.cpp index 252effd0e..4f2827c55 100644 --- a/regression/reference/namespace/wrapns.cpp +++ b/regression/reference/namespace/wrapns.cpp @@ -1,5 +1,5 @@ // wrapns.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapns.h b/regression/reference/namespace/wrapns.h index bf1d65236..7e58e3a65 100644 --- a/regression/reference/namespace/wrapns.h +++ b/regression/reference/namespace/wrapns.h @@ -1,5 +1,5 @@ // wrapns.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapns_outer.cpp b/regression/reference/namespace/wrapns_outer.cpp index 7bcc06aa7..1fa6579ac 100644 --- a/regression/reference/namespace/wrapns_outer.cpp +++ b/regression/reference/namespace/wrapns_outer.cpp @@ -1,5 +1,5 @@ // wrapns_outer.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapns_outer.h b/regression/reference/namespace/wrapns_outer.h index e61c1daf7..623dce32d 100644 --- a/regression/reference/namespace/wrapns_outer.h +++ b/regression/reference/namespace/wrapns_outer.h @@ -1,5 +1,5 @@ // wrapns_outer.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespace/wrapns_upper.h b/regression/reference/namespace/wrapns_upper.h index 71748e955..dddfe6460 100644 --- a/regression/reference/namespace/wrapns_upper.h +++ b/regression/reference/namespace/wrapns_upper.h @@ -1,5 +1,5 @@ // wrapns_upper.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/namespacedoc.json b/regression/reference/namespacedoc/namespacedoc.json index 1e976ef33..ea6700e1c 100644 --- a/regression/reference/namespacedoc/namespacedoc.json +++ b/regression/reference/namespacedoc/namespacedoc.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/namespacedoc/pywrapped_inner1module.cpp b/regression/reference/namespacedoc/pywrapped_inner1module.cpp index cc9fa3703..80e76ae82 100644 --- a/regression/reference/namespacedoc/pywrapped_inner1module.cpp +++ b/regression/reference/namespacedoc/pywrapped_inner1module.cpp @@ -1,5 +1,5 @@ // pywrapped_inner1module.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/pywrapped_inner2module.cpp b/regression/reference/namespacedoc/pywrapped_inner2module.cpp index 180ff42ca..a32c41932 100644 --- a/regression/reference/namespacedoc/pywrapped_inner2module.cpp +++ b/regression/reference/namespacedoc/pywrapped_inner2module.cpp @@ -1,5 +1,5 @@ // pywrapped_inner2module.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/pywrapped_inner4module.cpp b/regression/reference/namespacedoc/pywrapped_inner4module.cpp index 36d506d24..e7b146de5 100644 --- a/regression/reference/namespacedoc/pywrapped_inner4module.cpp +++ b/regression/reference/namespacedoc/pywrapped_inner4module.cpp @@ -1,5 +1,5 @@ // pywrapped_inner4module.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/pywrappedmodule.cpp b/regression/reference/namespacedoc/pywrappedmodule.cpp index 27de52fe8..2bfb9e1c4 100644 --- a/regression/reference/namespacedoc/pywrappedmodule.cpp +++ b/regression/reference/namespacedoc/pywrappedmodule.cpp @@ -1,5 +1,5 @@ // pywrappedmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/pywrappedmodule.hpp b/regression/reference/namespacedoc/pywrappedmodule.hpp index 524350a2d..bf9d4b129 100644 --- a/regression/reference/namespacedoc/pywrappedmodule.hpp +++ b/regression/reference/namespacedoc/pywrappedmodule.hpp @@ -1,5 +1,5 @@ // pywrappedmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/setup.py b/regression/reference/namespacedoc/setup.py index ce094890d..22a69ef7c 100644 --- a/regression/reference/namespacedoc/setup.py +++ b/regression/reference/namespacedoc/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/typeswrapped.h b/regression/reference/namespacedoc/typeswrapped.h index 047439314..998d0af66 100644 --- a/regression/reference/namespacedoc/typeswrapped.h +++ b/regression/reference/namespacedoc/typeswrapped.h @@ -1,5 +1,5 @@ // typeswrapped.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapfwrapped.f b/regression/reference/namespacedoc/wrapfwrapped.f index 7e49ed443..b6c5b163e 100644 --- a/regression/reference/namespacedoc/wrapfwrapped.f +++ b/regression/reference/namespacedoc/wrapfwrapped.f @@ -1,5 +1,5 @@ ! wrapfwrapped.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapfwrapped_inner1.f b/regression/reference/namespacedoc/wrapfwrapped_inner1.f index 9e533e213..53dd5dc82 100644 --- a/regression/reference/namespacedoc/wrapfwrapped_inner1.f +++ b/regression/reference/namespacedoc/wrapfwrapped_inner1.f @@ -1,5 +1,5 @@ ! wrapfwrapped_inner1.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapfwrapped_inner2.f b/regression/reference/namespacedoc/wrapfwrapped_inner2.f index f194c796d..4d972ecb4 100644 --- a/regression/reference/namespacedoc/wrapfwrapped_inner2.f +++ b/regression/reference/namespacedoc/wrapfwrapped_inner2.f @@ -1,5 +1,5 @@ ! wrapfwrapped_inner2.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapped_types.yaml b/regression/reference/namespacedoc/wrapped_types.yaml index 7a6e549db..57cbf2c57 100644 --- a/regression/reference/namespacedoc/wrapped_types.yaml +++ b/regression/reference/namespacedoc/wrapped_types.yaml @@ -1,5 +1,5 @@ # wrapped_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped.cpp b/regression/reference/namespacedoc/wrapwrapped.cpp index 13903d0d2..b8098cfa6 100644 --- a/regression/reference/namespacedoc/wrapwrapped.cpp +++ b/regression/reference/namespacedoc/wrapwrapped.cpp @@ -1,5 +1,5 @@ // wrapwrapped.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped.h b/regression/reference/namespacedoc/wrapwrapped.h index 269e67928..8e9a8f82a 100644 --- a/regression/reference/namespacedoc/wrapwrapped.h +++ b/regression/reference/namespacedoc/wrapwrapped.h @@ -1,5 +1,5 @@ // wrapwrapped.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped_inner1.cpp b/regression/reference/namespacedoc/wrapwrapped_inner1.cpp index cfed01b28..ada5b409e 100644 --- a/regression/reference/namespacedoc/wrapwrapped_inner1.cpp +++ b/regression/reference/namespacedoc/wrapwrapped_inner1.cpp @@ -1,5 +1,5 @@ // wrapwrapped_inner1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped_inner1.h b/regression/reference/namespacedoc/wrapwrapped_inner1.h index 8f66dde0a..10f3df1f4 100644 --- a/regression/reference/namespacedoc/wrapwrapped_inner1.h +++ b/regression/reference/namespacedoc/wrapwrapped_inner1.h @@ -1,5 +1,5 @@ // wrapwrapped_inner1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped_inner2.cpp b/regression/reference/namespacedoc/wrapwrapped_inner2.cpp index cdc955c67..800a61e4e 100644 --- a/regression/reference/namespacedoc/wrapwrapped_inner2.cpp +++ b/regression/reference/namespacedoc/wrapwrapped_inner2.cpp @@ -1,5 +1,5 @@ // wrapwrapped_inner2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped_inner2.h b/regression/reference/namespacedoc/wrapwrapped_inner2.h index e623cb55a..a64f7fdce 100644 --- a/regression/reference/namespacedoc/wrapwrapped_inner2.h +++ b/regression/reference/namespacedoc/wrapwrapped_inner2.h @@ -1,5 +1,5 @@ // wrapwrapped_inner2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped_inner4.cpp b/regression/reference/namespacedoc/wrapwrapped_inner4.cpp index 8572fcc49..640438a0f 100644 --- a/regression/reference/namespacedoc/wrapwrapped_inner4.cpp +++ b/regression/reference/namespacedoc/wrapwrapped_inner4.cpp @@ -1,5 +1,5 @@ // wrapwrapped_inner4.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/namespacedoc/wrapwrapped_inner4.h b/regression/reference/namespacedoc/wrapwrapped_inner4.h index f9419e870..daa3f9e0b 100644 --- a/regression/reference/namespacedoc/wrapwrapped_inner4.h +++ b/regression/reference/namespacedoc/wrapwrapped_inner4.h @@ -1,5 +1,5 @@ // wrapwrapped_inner4.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/luaownershipmodule.cpp b/regression/reference/ownership/luaownershipmodule.cpp index 2dcb5cb5a..6ec145d42 100644 --- a/regression/reference/ownership/luaownershipmodule.cpp +++ b/regression/reference/ownership/luaownershipmodule.cpp @@ -1,5 +1,5 @@ // luaownershipmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/luaownershipmodule.hpp b/regression/reference/ownership/luaownershipmodule.hpp index 1d8368d14..ac0bc251a 100644 --- a/regression/reference/ownership/luaownershipmodule.hpp +++ b/regression/reference/ownership/luaownershipmodule.hpp @@ -1,5 +1,5 @@ // luaownershipmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/ownership.json b/regression/reference/ownership/ownership.json index 91c3368b3..2c2c77cc2 100644 --- a/regression/reference/ownership/ownership.json +++ b/regression/reference/ownership/ownership.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/ownership/ownership_types.yaml b/regression/reference/ownership/ownership_types.yaml index e9606279e..50cd37cba 100644 --- a/regression/reference/ownership/ownership_types.yaml +++ b/regression/reference/ownership/ownership_types.yaml @@ -1,5 +1,5 @@ # ownership_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/pyClass1type.cpp b/regression/reference/ownership/pyClass1type.cpp index b8cd29a29..b535d23af 100644 --- a/regression/reference/ownership/pyClass1type.cpp +++ b/regression/reference/ownership/pyClass1type.cpp @@ -1,5 +1,5 @@ // pyClass1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/pyownershipmodule.cpp b/regression/reference/ownership/pyownershipmodule.cpp index a8a5ec12b..aed9e0e28 100644 --- a/regression/reference/ownership/pyownershipmodule.cpp +++ b/regression/reference/ownership/pyownershipmodule.cpp @@ -1,5 +1,5 @@ // pyownershipmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/pyownershipmodule.hpp b/regression/reference/ownership/pyownershipmodule.hpp index cd37446e6..d2d3d8c9f 100644 --- a/regression/reference/ownership/pyownershipmodule.hpp +++ b/regression/reference/ownership/pyownershipmodule.hpp @@ -1,5 +1,5 @@ // pyownershipmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/pyownershiputil.cpp b/regression/reference/ownership/pyownershiputil.cpp index b3b0190f2..dbde6ec6d 100644 --- a/regression/reference/ownership/pyownershiputil.cpp +++ b/regression/reference/ownership/pyownershiputil.cpp @@ -1,5 +1,5 @@ // pyownershiputil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/setup.py b/regression/reference/ownership/setup.py index 7b18eec61..619de873e 100644 --- a/regression/reference/ownership/setup.py +++ b/regression/reference/ownership/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/typesownership.h b/regression/reference/ownership/typesownership.h index 4bf362e6f..4de027022 100644 --- a/regression/reference/ownership/typesownership.h +++ b/regression/reference/ownership/typesownership.h @@ -1,5 +1,5 @@ // typesownership.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/utilownership.cpp b/regression/reference/ownership/utilownership.cpp index 156a21ef7..2d964f4a0 100644 --- a/regression/reference/ownership/utilownership.cpp +++ b/regression/reference/ownership/utilownership.cpp @@ -1,5 +1,5 @@ // utilownership.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/wrapClass1.cpp b/regression/reference/ownership/wrapClass1.cpp index d3ec47afc..c4b39b990 100644 --- a/regression/reference/ownership/wrapClass1.cpp +++ b/regression/reference/ownership/wrapClass1.cpp @@ -1,5 +1,5 @@ // wrapClass1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/wrapClass1.h b/regression/reference/ownership/wrapClass1.h index b8931bfc2..e70787a9e 100644 --- a/regression/reference/ownership/wrapClass1.h +++ b/regression/reference/ownership/wrapClass1.h @@ -1,5 +1,5 @@ // wrapClass1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/wrapfownership.f b/regression/reference/ownership/wrapfownership.f index a468d7cb5..b535096da 100644 --- a/regression/reference/ownership/wrapfownership.f +++ b/regression/reference/ownership/wrapfownership.f @@ -1,5 +1,5 @@ ! wrapfownership.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/wrapownership.cpp b/regression/reference/ownership/wrapownership.cpp index c5c825ee9..ee0512b95 100644 --- a/regression/reference/ownership/wrapownership.cpp +++ b/regression/reference/ownership/wrapownership.cpp @@ -1,5 +1,5 @@ // wrapownership.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/ownership/wrapownership.h b/regression/reference/ownership/wrapownership.h index 77f5ad67c..a169adfc6 100644 --- a/regression/reference/ownership/wrapownership.h +++ b/regression/reference/ownership/wrapownership.h @@ -1,5 +1,5 @@ // wrapownership.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-c/pointers.json b/regression/reference/pointers-c/pointers.json index 0129c3e1b..8e56e20fc 100644 --- a/regression/reference/pointers-c/pointers.json +++ b/regression/reference/pointers-c/pointers.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/pointers-c/typespointers.h b/regression/reference/pointers-c/typespointers.h index 72a096d97..50d2740b5 100644 --- a/regression/reference/pointers-c/typespointers.h +++ b/regression/reference/pointers-c/typespointers.h @@ -1,5 +1,5 @@ // typespointers.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-c/wrapfpointers.f b/regression/reference/pointers-c/wrapfpointers.f index 1440dc1fb..22073834e 100644 --- a/regression/reference/pointers-c/wrapfpointers.f +++ b/regression/reference/pointers-c/wrapfpointers.f @@ -1,5 +1,5 @@ ! wrapfpointers.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-c/wrappointers.c b/regression/reference/pointers-c/wrappointers.c index a4e679ac0..33bfaacff 100644 --- a/regression/reference/pointers-c/wrappointers.c +++ b/regression/reference/pointers-c/wrappointers.c @@ -1,5 +1,5 @@ // wrappointers.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-c/wrappointers.h b/regression/reference/pointers-c/wrappointers.h index 007dd9d7f..c1b5c283d 100644 --- a/regression/reference/pointers-c/wrappointers.h +++ b/regression/reference/pointers-c/wrappointers.h @@ -1,5 +1,5 @@ // wrappointers.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-cxx/pointers.json b/regression/reference/pointers-cxx/pointers.json index c4709e794..629e02d94 100644 --- a/regression/reference/pointers-cxx/pointers.json +++ b/regression/reference/pointers-cxx/pointers.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/pointers-cxx/typespointers.h b/regression/reference/pointers-cxx/typespointers.h index 669db69a5..61e2d19d1 100644 --- a/regression/reference/pointers-cxx/typespointers.h +++ b/regression/reference/pointers-cxx/typespointers.h @@ -1,5 +1,5 @@ // typespointers.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-cxx/wrapfpointers.f b/regression/reference/pointers-cxx/wrapfpointers.f index b8c1fd4d7..48394f9ef 100644 --- a/regression/reference/pointers-cxx/wrapfpointers.f +++ b/regression/reference/pointers-cxx/wrapfpointers.f @@ -1,5 +1,5 @@ ! wrapfpointers.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-cxx/wrappointers.cpp b/regression/reference/pointers-cxx/wrappointers.cpp index c207ee6d5..de3085de6 100644 --- a/regression/reference/pointers-cxx/wrappointers.cpp +++ b/regression/reference/pointers-cxx/wrappointers.cpp @@ -1,5 +1,5 @@ // wrappointers.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-cxx/wrappointers.h b/regression/reference/pointers-cxx/wrappointers.h index 8cf3a6064..fa6e6fdee 100644 --- a/regression/reference/pointers-cxx/wrappointers.h +++ b/regression/reference/pointers-cxx/wrappointers.h @@ -1,5 +1,5 @@ // wrappointers.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-list-c/pointers.json b/regression/reference/pointers-list-c/pointers.json index fcbb4bd06..173c3d42c 100644 --- a/regression/reference/pointers-list-c/pointers.json +++ b/regression/reference/pointers-list-c/pointers.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/pointers-list-c/pypointersmodule.c b/regression/reference/pointers-list-c/pypointersmodule.c index a0ccbd4b5..7406c0d75 100644 --- a/regression/reference/pointers-list-c/pypointersmodule.c +++ b/regression/reference/pointers-list-c/pypointersmodule.c @@ -1,5 +1,5 @@ // pypointersmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-list-c/pypointersmodule.h b/regression/reference/pointers-list-c/pypointersmodule.h index 41196f06e..492bdc2c9 100644 --- a/regression/reference/pointers-list-c/pypointersmodule.h +++ b/regression/reference/pointers-list-c/pypointersmodule.h @@ -1,5 +1,5 @@ // pypointersmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-list-c/setup.py b/regression/reference/pointers-list-c/setup.py index d00f5c6ee..d23891f9d 100644 --- a/regression/reference/pointers-list-c/setup.py +++ b/regression/reference/pointers-list-c/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-list-cxx/pointers.json b/regression/reference/pointers-list-cxx/pointers.json index 147a4c66c..adbfd1c8b 100644 --- a/regression/reference/pointers-list-cxx/pointers.json +++ b/regression/reference/pointers-list-cxx/pointers.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/pointers-list-cxx/pypointersmodule.cpp b/regression/reference/pointers-list-cxx/pypointersmodule.cpp index 0173d3070..1e78618a5 100644 --- a/regression/reference/pointers-list-cxx/pypointersmodule.cpp +++ b/regression/reference/pointers-list-cxx/pypointersmodule.cpp @@ -1,5 +1,5 @@ // pypointersmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-list-cxx/pypointersmodule.hpp b/regression/reference/pointers-list-cxx/pypointersmodule.hpp index fce176858..670ebe2d1 100644 --- a/regression/reference/pointers-list-cxx/pypointersmodule.hpp +++ b/regression/reference/pointers-list-cxx/pypointersmodule.hpp @@ -1,5 +1,5 @@ // pypointersmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-list-cxx/setup.py b/regression/reference/pointers-list-cxx/setup.py index c3b3d6605..ea92f191a 100644 --- a/regression/reference/pointers-list-cxx/setup.py +++ b/regression/reference/pointers-list-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-numpy-c/pointers.json b/regression/reference/pointers-numpy-c/pointers.json index 942f1bbee..576559195 100644 --- a/regression/reference/pointers-numpy-c/pointers.json +++ b/regression/reference/pointers-numpy-c/pointers.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/pointers-numpy-c/pypointersmodule.c b/regression/reference/pointers-numpy-c/pypointersmodule.c index cdd62d093..74e9fadda 100644 --- a/regression/reference/pointers-numpy-c/pypointersmodule.c +++ b/regression/reference/pointers-numpy-c/pypointersmodule.c @@ -1,5 +1,5 @@ // pypointersmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-numpy-c/pypointersmodule.h b/regression/reference/pointers-numpy-c/pypointersmodule.h index 41196f06e..492bdc2c9 100644 --- a/regression/reference/pointers-numpy-c/pypointersmodule.h +++ b/regression/reference/pointers-numpy-c/pypointersmodule.h @@ -1,5 +1,5 @@ // pypointersmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-numpy-c/setup.py b/regression/reference/pointers-numpy-c/setup.py index 90e260184..6be2a7cda 100644 --- a/regression/reference/pointers-numpy-c/setup.py +++ b/regression/reference/pointers-numpy-c/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-numpy-cxx/pointers.json b/regression/reference/pointers-numpy-cxx/pointers.json index ae044fc17..7968a6fae 100644 --- a/regression/reference/pointers-numpy-cxx/pointers.json +++ b/regression/reference/pointers-numpy-cxx/pointers.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/pointers-numpy-cxx/pypointersmodule.cpp b/regression/reference/pointers-numpy-cxx/pypointersmodule.cpp index 3516c2f23..911f4d951 100644 --- a/regression/reference/pointers-numpy-cxx/pypointersmodule.cpp +++ b/regression/reference/pointers-numpy-cxx/pypointersmodule.cpp @@ -1,5 +1,5 @@ // pypointersmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-numpy-cxx/pypointersmodule.hpp b/regression/reference/pointers-numpy-cxx/pypointersmodule.hpp index fce176858..670ebe2d1 100644 --- a/regression/reference/pointers-numpy-cxx/pypointersmodule.hpp +++ b/regression/reference/pointers-numpy-cxx/pypointersmodule.hpp @@ -1,5 +1,5 @@ // pypointersmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/pointers-numpy-cxx/setup.py b/regression/reference/pointers-numpy-cxx/setup.py index 8124f37c8..0d4e8388b 100644 --- a/regression/reference/pointers-numpy-cxx/setup.py +++ b/regression/reference/pointers-numpy-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/preprocess.json b/regression/reference/preprocess/preprocess.json index 3c23ed18d..3dd8f14b7 100644 --- a/regression/reference/preprocess/preprocess.json +++ b/regression/reference/preprocess/preprocess.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/preprocess/preprocess_types.yaml b/regression/reference/preprocess/preprocess_types.yaml index 683d35181..72db9577a 100644 --- a/regression/reference/preprocess/preprocess_types.yaml +++ b/regression/reference/preprocess/preprocess_types.yaml @@ -1,5 +1,5 @@ # preprocess_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/pyUser1type.cpp b/regression/reference/preprocess/pyUser1type.cpp index 7ec2a6c7f..226373de5 100644 --- a/regression/reference/preprocess/pyUser1type.cpp +++ b/regression/reference/preprocess/pyUser1type.cpp @@ -1,5 +1,5 @@ // pyUser1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/pyUser2type.cpp b/regression/reference/preprocess/pyUser2type.cpp index f54388ad6..d517861a6 100644 --- a/regression/reference/preprocess/pyUser2type.cpp +++ b/regression/reference/preprocess/pyUser2type.cpp @@ -1,5 +1,5 @@ // pyUser2type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/pypreprocessmodule.cpp b/regression/reference/preprocess/pypreprocessmodule.cpp index 5d481e7a8..0559d78dd 100644 --- a/regression/reference/preprocess/pypreprocessmodule.cpp +++ b/regression/reference/preprocess/pypreprocessmodule.cpp @@ -1,5 +1,5 @@ // pypreprocessmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/pypreprocessmodule.hpp b/regression/reference/preprocess/pypreprocessmodule.hpp index debaf9ba1..5bf1fa3ac 100644 --- a/regression/reference/preprocess/pypreprocessmodule.hpp +++ b/regression/reference/preprocess/pypreprocessmodule.hpp @@ -1,5 +1,5 @@ // pypreprocessmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/pypreprocessutil.cpp b/regression/reference/preprocess/pypreprocessutil.cpp index 6ec305935..cf1b3cac2 100644 --- a/regression/reference/preprocess/pypreprocessutil.cpp +++ b/regression/reference/preprocess/pypreprocessutil.cpp @@ -1,5 +1,5 @@ // pypreprocessutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/setup.py b/regression/reference/preprocess/setup.py index 8bde5858b..edd9ccab8 100644 --- a/regression/reference/preprocess/setup.py +++ b/regression/reference/preprocess/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/typespreprocess.h b/regression/reference/preprocess/typespreprocess.h index d4cb6a918..55c9d806d 100644 --- a/regression/reference/preprocess/typespreprocess.h +++ b/regression/reference/preprocess/typespreprocess.h @@ -1,5 +1,5 @@ // typespreprocess.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/wrapUser1.cpp b/regression/reference/preprocess/wrapUser1.cpp index 5d77e2f17..753d601ac 100644 --- a/regression/reference/preprocess/wrapUser1.cpp +++ b/regression/reference/preprocess/wrapUser1.cpp @@ -1,5 +1,5 @@ // wrapUser1.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/wrapUser1.h b/regression/reference/preprocess/wrapUser1.h index 9103ae9ca..53e58dd9a 100644 --- a/regression/reference/preprocess/wrapUser1.h +++ b/regression/reference/preprocess/wrapUser1.h @@ -1,5 +1,5 @@ // wrapUser1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/wrapUser2.cpp b/regression/reference/preprocess/wrapUser2.cpp index e55817a22..57364e4b7 100644 --- a/regression/reference/preprocess/wrapUser2.cpp +++ b/regression/reference/preprocess/wrapUser2.cpp @@ -1,5 +1,5 @@ // wrapUser2.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/wrapUser2.h b/regression/reference/preprocess/wrapUser2.h index 917da76ec..1664d1332 100644 --- a/regression/reference/preprocess/wrapUser2.h +++ b/regression/reference/preprocess/wrapUser2.h @@ -1,5 +1,5 @@ // wrapUser2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/wrapfpreprocess.f b/regression/reference/preprocess/wrapfpreprocess.f index e7c43b03b..dcc0be620 100644 --- a/regression/reference/preprocess/wrapfpreprocess.f +++ b/regression/reference/preprocess/wrapfpreprocess.f @@ -1,5 +1,5 @@ ! wrapfpreprocess.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/preprocess/wrappreprocess.cpp b/regression/reference/preprocess/wrappreprocess.cpp index a8ed24c61..d65f1602a 100644 --- a/regression/reference/preprocess/wrappreprocess.cpp +++ b/regression/reference/preprocess/wrappreprocess.cpp @@ -1,5 +1,5 @@ // wrappreprocess.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/scope.json b/regression/reference/scope/scope.json index 1e3e0027c..3fc6ecd3f 100644 --- a/regression/reference/scope/scope.json +++ b/regression/reference/scope/scope.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/scope/scope_types.yaml b/regression/reference/scope/scope_types.yaml index 12bada430..1cdb780bd 100644 --- a/regression/reference/scope/scope_types.yaml +++ b/regression/reference/scope/scope_types.yaml @@ -1,5 +1,5 @@ # scope_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/typesscope.h b/regression/reference/scope/typesscope.h index ae40448a7..641a95ab5 100644 --- a/regression/reference/scope/typesscope.h +++ b/regression/reference/scope/typesscope.h @@ -1,5 +1,5 @@ // typesscope.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapClass1.h b/regression/reference/scope/wrapClass1.h index f7905f26b..b94788834 100644 --- a/regression/reference/scope/wrapClass1.h +++ b/regression/reference/scope/wrapClass1.h @@ -1,5 +1,5 @@ // wrapClass1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapClass2.h b/regression/reference/scope/wrapClass2.h index d8abc59e9..fd3bab131 100644 --- a/regression/reference/scope/wrapClass2.h +++ b/regression/reference/scope/wrapClass2.h @@ -1,5 +1,5 @@ // wrapClass2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapfscope.f b/regression/reference/scope/wrapfscope.f index 9ff78e2c4..787b838c8 100644 --- a/regression/reference/scope/wrapfscope.f +++ b/regression/reference/scope/wrapfscope.f @@ -1,5 +1,5 @@ ! wrapfscope.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapfscope_ns1.f b/regression/reference/scope/wrapfscope_ns1.f index eb94cad8c..4d977840c 100644 --- a/regression/reference/scope/wrapfscope_ns1.f +++ b/regression/reference/scope/wrapfscope_ns1.f @@ -1,5 +1,5 @@ ! wrapfscope_ns1.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapfscope_ns2.f b/regression/reference/scope/wrapfscope_ns2.f index 7bb86adb5..32e80123c 100644 --- a/regression/reference/scope/wrapfscope_ns2.f +++ b/regression/reference/scope/wrapfscope_ns2.f @@ -1,5 +1,5 @@ ! wrapfscope_ns2.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapscope.cpp b/regression/reference/scope/wrapscope.cpp index b4ecc1735..4566a8da8 100644 --- a/regression/reference/scope/wrapscope.cpp +++ b/regression/reference/scope/wrapscope.cpp @@ -1,5 +1,5 @@ // wrapscope.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapscope.h b/regression/reference/scope/wrapscope.h index 77a581c69..53235e161 100644 --- a/regression/reference/scope/wrapscope.h +++ b/regression/reference/scope/wrapscope.h @@ -1,5 +1,5 @@ // wrapscope.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapscope_ns1.h b/regression/reference/scope/wrapscope_ns1.h index 064e69bdd..7ac4a45bf 100644 --- a/regression/reference/scope/wrapscope_ns1.h +++ b/regression/reference/scope/wrapscope_ns1.h @@ -1,5 +1,5 @@ // wrapscope_ns1.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/scope/wrapscope_ns2.h b/regression/reference/scope/wrapscope_ns2.h index 878ffbf2c..db3ad038f 100644 --- a/regression/reference/scope/wrapscope_ns2.h +++ b/regression/reference/scope/wrapscope_ns2.h @@ -1,5 +1,5 @@ // wrapscope_ns2.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/statement/statement.json b/regression/reference/statement/statement.json index ac562f53c..c309113c0 100644 --- a/regression/reference/statement/statement.json +++ b/regression/reference/statement/statement.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/statement/typesstatement.h b/regression/reference/statement/typesstatement.h index 793bd7f00..9dd3f89b9 100644 --- a/regression/reference/statement/typesstatement.h +++ b/regression/reference/statement/typesstatement.h @@ -1,5 +1,5 @@ // typesstatement.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/statement/wrapfstatement.f b/regression/reference/statement/wrapfstatement.f index 8f3d1a0b2..d3b8078ea 100644 --- a/regression/reference/statement/wrapfstatement.f +++ b/regression/reference/statement/wrapfstatement.f @@ -1,5 +1,5 @@ ! wrapfstatement.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/statement/wrapstatement.cpp b/regression/reference/statement/wrapstatement.cpp index 38c8389f9..d850a248f 100644 --- a/regression/reference/statement/wrapstatement.cpp +++ b/regression/reference/statement/wrapstatement.cpp @@ -1,5 +1,5 @@ // wrapstatement.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/statement/wrapstatement.h b/regression/reference/statement/wrapstatement.h index c1d76f1b2..055849ea7 100644 --- a/regression/reference/statement/wrapstatement.h +++ b/regression/reference/statement/wrapstatement.h @@ -1,5 +1,5 @@ // wrapstatement.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/pystringsmodule.cpp b/regression/reference/strings/pystringsmodule.cpp index e46d321de..c1c2daae0 100644 --- a/regression/reference/strings/pystringsmodule.cpp +++ b/regression/reference/strings/pystringsmodule.cpp @@ -1,5 +1,5 @@ // pystringsmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/pystringsmodule.hpp b/regression/reference/strings/pystringsmodule.hpp index efb49ead1..382bf79f1 100644 --- a/regression/reference/strings/pystringsmodule.hpp +++ b/regression/reference/strings/pystringsmodule.hpp @@ -1,5 +1,5 @@ // pystringsmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/setup.py b/regression/reference/strings/setup.py index 292b4951d..5293cce13 100644 --- a/regression/reference/strings/setup.py +++ b/regression/reference/strings/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/strings.json b/regression/reference/strings/strings.json index 57bb62610..d27f14cd8 100644 --- a/regression/reference/strings/strings.json +++ b/regression/reference/strings/strings.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/strings/typesstrings.h b/regression/reference/strings/typesstrings.h index 4cde58664..8c4eec22a 100644 --- a/regression/reference/strings/typesstrings.h +++ b/regression/reference/strings/typesstrings.h @@ -1,5 +1,5 @@ // typesstrings.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/utilstrings.cpp b/regression/reference/strings/utilstrings.cpp index 30c22c9e7..b0dfd0c02 100644 --- a/regression/reference/strings/utilstrings.cpp +++ b/regression/reference/strings/utilstrings.cpp @@ -1,5 +1,5 @@ // utilstrings.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/wrapfstrings.f b/regression/reference/strings/wrapfstrings.f index f0b92662b..fd2a8a1f6 100644 --- a/regression/reference/strings/wrapfstrings.f +++ b/regression/reference/strings/wrapfstrings.f @@ -1,5 +1,5 @@ ! wrapfstrings.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/wrapstrings.cpp b/regression/reference/strings/wrapstrings.cpp index e10b3f160..6c7d79ed7 100644 --- a/regression/reference/strings/wrapstrings.cpp +++ b/regression/reference/strings/wrapstrings.cpp @@ -1,5 +1,5 @@ // wrapstrings.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/strings/wrapstrings.h b/regression/reference/strings/wrapstrings.h index e0f817fb2..820e171b5 100644 --- a/regression/reference/strings/wrapstrings.h +++ b/regression/reference/strings/wrapstrings.h @@ -1,5 +1,5 @@ // wrapstrings.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-c/struct.json b/regression/reference/struct-c/struct.json index b31560525..804d1ba35 100644 --- a/regression/reference/struct-c/struct.json +++ b/regression/reference/struct-c/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-c/struct_types.yaml b/regression/reference/struct-c/struct_types.yaml index a033ef2f5..34a3991ed 100644 --- a/regression/reference/struct-c/struct_types.yaml +++ b/regression/reference/struct-c/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-c/typesstruct.h b/regression/reference/struct-c/typesstruct.h index 93a2cf3db..d1f973ef4 100644 --- a/regression/reference/struct-c/typesstruct.h +++ b/regression/reference/struct-c/typesstruct.h @@ -1,5 +1,5 @@ // typesstruct.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-c/wrapfstruct.f b/regression/reference/struct-c/wrapfstruct.f index 33d62f69a..f69c31685 100644 --- a/regression/reference/struct-c/wrapfstruct.f +++ b/regression/reference/struct-c/wrapfstruct.f @@ -1,5 +1,5 @@ ! wrapfstruct.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-c/wrapstruct.c b/regression/reference/struct-c/wrapstruct.c index 8a2591d43..48ebefdd3 100644 --- a/regression/reference/struct-c/wrapstruct.c +++ b/regression/reference/struct-c/wrapstruct.c @@ -1,5 +1,5 @@ // wrapstruct.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-c/wrapstruct.h b/regression/reference/struct-c/wrapstruct.h index 7dd329ed5..bc6c7b683 100644 --- a/regression/reference/struct-c/wrapstruct.h +++ b/regression/reference/struct-c/wrapstruct.h @@ -1,5 +1,5 @@ // wrapstruct.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pyArrays1type.c b/regression/reference/struct-class-c/pyArrays1type.c index cc6b30ee0..3d573f62f 100644 --- a/regression/reference/struct-class-c/pyArrays1type.c +++ b/regression/reference/struct-class-c/pyArrays1type.c @@ -1,5 +1,5 @@ // pyArrays1type.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pyCstruct1type.c b/regression/reference/struct-class-c/pyCstruct1type.c index 43f06a2ef..26a62b8a5 100644 --- a/regression/reference/struct-class-c/pyCstruct1type.c +++ b/regression/reference/struct-class-c/pyCstruct1type.c @@ -1,5 +1,5 @@ // pyCstruct1type.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pyCstruct_listtype.c b/regression/reference/struct-class-c/pyCstruct_listtype.c index ce50ce25d..72b3056e9 100644 --- a/regression/reference/struct-class-c/pyCstruct_listtype.c +++ b/regression/reference/struct-class-c/pyCstruct_listtype.c @@ -1,5 +1,5 @@ // pyCstruct_listtype.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pyCstruct_numpytype.c b/regression/reference/struct-class-c/pyCstruct_numpytype.c index 15d3cbfc2..446fae143 100644 --- a/regression/reference/struct-class-c/pyCstruct_numpytype.c +++ b/regression/reference/struct-class-c/pyCstruct_numpytype.c @@ -1,5 +1,5 @@ // pyCstruct_numpytype.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pyCstruct_ptrtype.c b/regression/reference/struct-class-c/pyCstruct_ptrtype.c index 74de41b83..8574f10ca 100644 --- a/regression/reference/struct-class-c/pyCstruct_ptrtype.c +++ b/regression/reference/struct-class-c/pyCstruct_ptrtype.c @@ -1,5 +1,5 @@ // pyCstruct_ptrtype.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pystructmodule.c b/regression/reference/struct-class-c/pystructmodule.c index da0a8a610..5f8bebc45 100644 --- a/regression/reference/struct-class-c/pystructmodule.c +++ b/regression/reference/struct-class-c/pystructmodule.c @@ -1,5 +1,5 @@ // pystructmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pystructmodule.h b/regression/reference/struct-class-c/pystructmodule.h index ea7f97dec..d74f21b21 100644 --- a/regression/reference/struct-class-c/pystructmodule.h +++ b/regression/reference/struct-class-c/pystructmodule.h @@ -1,5 +1,5 @@ // pystructmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/pystructutil.c b/regression/reference/struct-class-c/pystructutil.c index fae3ea581..73a555d3b 100644 --- a/regression/reference/struct-class-c/pystructutil.c +++ b/regression/reference/struct-class-c/pystructutil.c @@ -1,5 +1,5 @@ // pystructutil.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/setup.py b/regression/reference/struct-class-c/setup.py index c6898518a..6dc3f31df 100644 --- a/regression/reference/struct-class-c/setup.py +++ b/regression/reference/struct-class-c/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-c/struct.json b/regression/reference/struct-class-c/struct.json index 405ce7a3e..74a28431f 100644 --- a/regression/reference/struct-class-c/struct.json +++ b/regression/reference/struct-class-c/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-class-c/struct_types.yaml b/regression/reference/struct-class-c/struct_types.yaml index a033ef2f5..34a3991ed 100644 --- a/regression/reference/struct-class-c/struct_types.yaml +++ b/regression/reference/struct-class-c/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pyArrays1type.cpp b/regression/reference/struct-class-cxx/pyArrays1type.cpp index 7ff4aa421..4a0301a5d 100644 --- a/regression/reference/struct-class-cxx/pyArrays1type.cpp +++ b/regression/reference/struct-class-cxx/pyArrays1type.cpp @@ -1,5 +1,5 @@ // pyArrays1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pyCstruct1type.cpp b/regression/reference/struct-class-cxx/pyCstruct1type.cpp index 48f62d106..6339105ac 100644 --- a/regression/reference/struct-class-cxx/pyCstruct1type.cpp +++ b/regression/reference/struct-class-cxx/pyCstruct1type.cpp @@ -1,5 +1,5 @@ // pyCstruct1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pyCstruct_listtype.cpp b/regression/reference/struct-class-cxx/pyCstruct_listtype.cpp index ff0f1ed7d..755cf3efd 100644 --- a/regression/reference/struct-class-cxx/pyCstruct_listtype.cpp +++ b/regression/reference/struct-class-cxx/pyCstruct_listtype.cpp @@ -1,5 +1,5 @@ // pyCstruct_listtype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pyCstruct_numpytype.cpp b/regression/reference/struct-class-cxx/pyCstruct_numpytype.cpp index eb9f9b625..14e58a0de 100644 --- a/regression/reference/struct-class-cxx/pyCstruct_numpytype.cpp +++ b/regression/reference/struct-class-cxx/pyCstruct_numpytype.cpp @@ -1,5 +1,5 @@ // pyCstruct_numpytype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pyCstruct_ptrtype.cpp b/regression/reference/struct-class-cxx/pyCstruct_ptrtype.cpp index 896d18ddf..f339c15c4 100644 --- a/regression/reference/struct-class-cxx/pyCstruct_ptrtype.cpp +++ b/regression/reference/struct-class-cxx/pyCstruct_ptrtype.cpp @@ -1,5 +1,5 @@ // pyCstruct_ptrtype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pystructmodule.cpp b/regression/reference/struct-class-cxx/pystructmodule.cpp index e991adc66..e73419a4a 100644 --- a/regression/reference/struct-class-cxx/pystructmodule.cpp +++ b/regression/reference/struct-class-cxx/pystructmodule.cpp @@ -1,5 +1,5 @@ // pystructmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pystructmodule.hpp b/regression/reference/struct-class-cxx/pystructmodule.hpp index 5abd0d084..51793fea5 100644 --- a/regression/reference/struct-class-cxx/pystructmodule.hpp +++ b/regression/reference/struct-class-cxx/pystructmodule.hpp @@ -1,5 +1,5 @@ // pystructmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/pystructutil.cpp b/regression/reference/struct-class-cxx/pystructutil.cpp index eceda22fa..a7297c6d0 100644 --- a/regression/reference/struct-class-cxx/pystructutil.cpp +++ b/regression/reference/struct-class-cxx/pystructutil.cpp @@ -1,5 +1,5 @@ // pystructutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/setup.py b/regression/reference/struct-class-cxx/setup.py index b4a68682a..48284256d 100644 --- a/regression/reference/struct-class-cxx/setup.py +++ b/regression/reference/struct-class-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-class-cxx/struct.json b/regression/reference/struct-class-cxx/struct.json index 05a3eb1fe..541b3de73 100644 --- a/regression/reference/struct-class-cxx/struct.json +++ b/regression/reference/struct-class-cxx/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-class-cxx/struct_types.yaml b/regression/reference/struct-class-cxx/struct_types.yaml index 573b2dbc3..2e659c47d 100644 --- a/regression/reference/struct-class-cxx/struct_types.yaml +++ b/regression/reference/struct-class-cxx/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-cxx/struct.json b/regression/reference/struct-cxx/struct.json index 62c87a1b8..a15dad0f0 100644 --- a/regression/reference/struct-cxx/struct.json +++ b/regression/reference/struct-cxx/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-cxx/struct_types.yaml b/regression/reference/struct-cxx/struct_types.yaml index 573b2dbc3..2e659c47d 100644 --- a/regression/reference/struct-cxx/struct_types.yaml +++ b/regression/reference/struct-cxx/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-cxx/typesstruct.h b/regression/reference/struct-cxx/typesstruct.h index d836e2c58..0c3b0bbd6 100644 --- a/regression/reference/struct-cxx/typesstruct.h +++ b/regression/reference/struct-cxx/typesstruct.h @@ -1,5 +1,5 @@ // typesstruct.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-cxx/wrapfstruct.f b/regression/reference/struct-cxx/wrapfstruct.f index a8204d5d0..1dac7fde9 100644 --- a/regression/reference/struct-cxx/wrapfstruct.f +++ b/regression/reference/struct-cxx/wrapfstruct.f @@ -1,5 +1,5 @@ ! wrapfstruct.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-cxx/wrapstruct.cpp b/regression/reference/struct-cxx/wrapstruct.cpp index 96ffb54e7..bbeaf7c98 100644 --- a/regression/reference/struct-cxx/wrapstruct.cpp +++ b/regression/reference/struct-cxx/wrapstruct.cpp @@ -1,5 +1,5 @@ // wrapstruct.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-cxx/wrapstruct.h b/regression/reference/struct-cxx/wrapstruct.h index 6aecd2497..050c276e6 100644 --- a/regression/reference/struct-cxx/wrapstruct.h +++ b/regression/reference/struct-cxx/wrapstruct.h @@ -1,5 +1,5 @@ // wrapstruct.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-list-cxx/pystructmodule.cpp b/regression/reference/struct-list-cxx/pystructmodule.cpp index 98a1429a6..5662967b7 100644 --- a/regression/reference/struct-list-cxx/pystructmodule.cpp +++ b/regression/reference/struct-list-cxx/pystructmodule.cpp @@ -1,5 +1,5 @@ // pystructmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-list-cxx/pystructmodule.hpp b/regression/reference/struct-list-cxx/pystructmodule.hpp index 305a36c63..7c3253560 100644 --- a/regression/reference/struct-list-cxx/pystructmodule.hpp +++ b/regression/reference/struct-list-cxx/pystructmodule.hpp @@ -1,5 +1,5 @@ // pystructmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-list-cxx/setup.py b/regression/reference/struct-list-cxx/setup.py index 7ac1bdf49..b31afe47c 100644 --- a/regression/reference/struct-list-cxx/setup.py +++ b/regression/reference/struct-list-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-list-cxx/struct.json b/regression/reference/struct-list-cxx/struct.json index 4e82737e3..9d2d62d24 100644 --- a/regression/reference/struct-list-cxx/struct.json +++ b/regression/reference/struct-list-cxx/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-list-cxx/struct_types.yaml b/regression/reference/struct-list-cxx/struct_types.yaml index 573b2dbc3..2e659c47d 100644 --- a/regression/reference/struct-list-cxx/struct_types.yaml +++ b/regression/reference/struct-list-cxx/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-c/pystructmodule.c b/regression/reference/struct-numpy-c/pystructmodule.c index 14eacb878..8cedd860b 100644 --- a/regression/reference/struct-numpy-c/pystructmodule.c +++ b/regression/reference/struct-numpy-c/pystructmodule.c @@ -1,5 +1,5 @@ // pystructmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-c/pystructmodule.h b/regression/reference/struct-numpy-c/pystructmodule.h index 019eb5e26..c76d6f41f 100644 --- a/regression/reference/struct-numpy-c/pystructmodule.h +++ b/regression/reference/struct-numpy-c/pystructmodule.h @@ -1,5 +1,5 @@ // pystructmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-c/pystructutil.c b/regression/reference/struct-numpy-c/pystructutil.c index 985c1e5e9..631d07647 100644 --- a/regression/reference/struct-numpy-c/pystructutil.c +++ b/regression/reference/struct-numpy-c/pystructutil.c @@ -1,5 +1,5 @@ // pystructutil.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-c/setup.py b/regression/reference/struct-numpy-c/setup.py index bf4b45621..a79111cd6 100644 --- a/regression/reference/struct-numpy-c/setup.py +++ b/regression/reference/struct-numpy-c/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-c/struct.json b/regression/reference/struct-numpy-c/struct.json index 748509aca..c6c6fcaca 100644 --- a/regression/reference/struct-numpy-c/struct.json +++ b/regression/reference/struct-numpy-c/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-numpy-c/struct_types.yaml b/regression/reference/struct-numpy-c/struct_types.yaml index a033ef2f5..34a3991ed 100644 --- a/regression/reference/struct-numpy-c/struct_types.yaml +++ b/regression/reference/struct-numpy-c/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-cxx/pystructmodule.cpp b/regression/reference/struct-numpy-cxx/pystructmodule.cpp index fac454160..3fcb51e54 100644 --- a/regression/reference/struct-numpy-cxx/pystructmodule.cpp +++ b/regression/reference/struct-numpy-cxx/pystructmodule.cpp @@ -1,5 +1,5 @@ // pystructmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-cxx/pystructmodule.hpp b/regression/reference/struct-numpy-cxx/pystructmodule.hpp index a472ba8f7..76df015ad 100644 --- a/regression/reference/struct-numpy-cxx/pystructmodule.hpp +++ b/regression/reference/struct-numpy-cxx/pystructmodule.hpp @@ -1,5 +1,5 @@ // pystructmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-cxx/pystructutil.cpp b/regression/reference/struct-numpy-cxx/pystructutil.cpp index 9ac0b3919..6c1b09ba4 100644 --- a/regression/reference/struct-numpy-cxx/pystructutil.cpp +++ b/regression/reference/struct-numpy-cxx/pystructutil.cpp @@ -1,5 +1,5 @@ // pystructutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-cxx/setup.py b/regression/reference/struct-numpy-cxx/setup.py index 08edba53d..3fe480e0c 100644 --- a/regression/reference/struct-numpy-cxx/setup.py +++ b/regression/reference/struct-numpy-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-numpy-cxx/struct.json b/regression/reference/struct-numpy-cxx/struct.json index 4e2265921..e67f97016 100644 --- a/regression/reference/struct-numpy-cxx/struct.json +++ b/regression/reference/struct-numpy-cxx/struct.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-numpy-cxx/struct_types.yaml b/regression/reference/struct-numpy-cxx/struct_types.yaml index 573b2dbc3..2e659c47d 100644 --- a/regression/reference/struct-numpy-cxx/struct_types.yaml +++ b/regression/reference/struct-numpy-cxx/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-c/pyCstruct_as_classtype.c b/regression/reference/struct-py-c/pyCstruct_as_classtype.c index a08582207..ddc3688d1 100644 --- a/regression/reference/struct-py-c/pyCstruct_as_classtype.c +++ b/regression/reference/struct-py-c/pyCstruct_as_classtype.c @@ -1,5 +1,5 @@ // pyCstruct_as_classtype.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-c/pystructmodule.c b/regression/reference/struct-py-c/pystructmodule.c index 9231b662c..3d00fac97 100644 --- a/regression/reference/struct-py-c/pystructmodule.c +++ b/regression/reference/struct-py-c/pystructmodule.c @@ -1,5 +1,5 @@ // pystructmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-c/pystructmodule.h b/regression/reference/struct-py-c/pystructmodule.h index a8e15e800..b44ca43e8 100644 --- a/regression/reference/struct-py-c/pystructmodule.h +++ b/regression/reference/struct-py-c/pystructmodule.h @@ -1,5 +1,5 @@ // pystructmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-c/pystructutil.c b/regression/reference/struct-py-c/pystructutil.c index 58f7cb17f..7a5d428be 100644 --- a/regression/reference/struct-py-c/pystructutil.c +++ b/regression/reference/struct-py-c/pystructutil.c @@ -1,5 +1,5 @@ // pystructutil.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-c/setup.py b/regression/reference/struct-py-c/setup.py index 9932e9c1b..26fb31b8b 100644 --- a/regression/reference/struct-py-c/setup.py +++ b/regression/reference/struct-py-c/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-c/struct-py.json b/regression/reference/struct-py-c/struct-py.json index 9730ec495..33ceafc70 100644 --- a/regression/reference/struct-py-c/struct-py.json +++ b/regression/reference/struct-py-c/struct-py.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-py-c/struct_types.yaml b/regression/reference/struct-py-c/struct_types.yaml index 70f983f46..b0f2eb5d3 100644 --- a/regression/reference/struct-py-c/struct_types.yaml +++ b/regression/reference/struct-py-c/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-cxx/pyCstruct_as_classtype.cpp b/regression/reference/struct-py-cxx/pyCstruct_as_classtype.cpp index f758c19e7..da4f33374 100644 --- a/regression/reference/struct-py-cxx/pyCstruct_as_classtype.cpp +++ b/regression/reference/struct-py-cxx/pyCstruct_as_classtype.cpp @@ -1,5 +1,5 @@ // pyCstruct_as_classtype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-cxx/pystructmodule.cpp b/regression/reference/struct-py-cxx/pystructmodule.cpp index 6e08e2c9e..2d255f734 100644 --- a/regression/reference/struct-py-cxx/pystructmodule.cpp +++ b/regression/reference/struct-py-cxx/pystructmodule.cpp @@ -1,5 +1,5 @@ // pystructmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-cxx/pystructmodule.hpp b/regression/reference/struct-py-cxx/pystructmodule.hpp index d4c17ee99..695adccef 100644 --- a/regression/reference/struct-py-cxx/pystructmodule.hpp +++ b/regression/reference/struct-py-cxx/pystructmodule.hpp @@ -1,5 +1,5 @@ // pystructmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-cxx/pystructutil.cpp b/regression/reference/struct-py-cxx/pystructutil.cpp index 52f37fd4b..06eefe891 100644 --- a/regression/reference/struct-py-cxx/pystructutil.cpp +++ b/regression/reference/struct-py-cxx/pystructutil.cpp @@ -1,5 +1,5 @@ // pystructutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-cxx/setup.py b/regression/reference/struct-py-cxx/setup.py index 9c756be2e..1825a5d9c 100644 --- a/regression/reference/struct-py-cxx/setup.py +++ b/regression/reference/struct-py-cxx/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/struct-py-cxx/struct-py.json b/regression/reference/struct-py-cxx/struct-py.json index c75e03d1d..325105490 100644 --- a/regression/reference/struct-py-cxx/struct-py.json +++ b/regression/reference/struct-py-cxx/struct-py.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/struct-py-cxx/struct_types.yaml b/regression/reference/struct-py-cxx/struct_types.yaml index c53020a40..cc82bf786 100644 --- a/regression/reference/struct-py-cxx/struct_types.yaml +++ b/regression/reference/struct-py-cxx/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/pyArrays1type.c b/regression/reference/structlist/pyArrays1type.c index 678c1e9d4..a91d7cf5a 100644 --- a/regression/reference/structlist/pyArrays1type.c +++ b/regression/reference/structlist/pyArrays1type.c @@ -1,5 +1,5 @@ // pyArrays1type.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/pystructmodule.c b/regression/reference/structlist/pystructmodule.c index 900a6b9bf..013afed5e 100644 --- a/regression/reference/structlist/pystructmodule.c +++ b/regression/reference/structlist/pystructmodule.c @@ -1,5 +1,5 @@ // pystructmodule.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/pystructmodule.h b/regression/reference/structlist/pystructmodule.h index 8f1d01b37..052b96eb6 100644 --- a/regression/reference/structlist/pystructmodule.h +++ b/regression/reference/structlist/pystructmodule.h @@ -1,5 +1,5 @@ // pystructmodule.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/pystructutil.c b/regression/reference/structlist/pystructutil.c index f9ec4aacd..4d5bed572 100644 --- a/regression/reference/structlist/pystructutil.c +++ b/regression/reference/structlist/pystructutil.c @@ -1,5 +1,5 @@ // pystructutil.c -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/setup.py b/regression/reference/structlist/setup.py index dc49b7e0c..2a22cd8bc 100644 --- a/regression/reference/structlist/setup.py +++ b/regression/reference/structlist/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/struct_types.yaml b/regression/reference/structlist/struct_types.yaml index 03a0b9518..49b8eb295 100644 --- a/regression/reference/structlist/struct_types.yaml +++ b/regression/reference/structlist/struct_types.yaml @@ -1,5 +1,5 @@ # struct_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/structlist/structlist.json b/regression/reference/structlist/structlist.json index f6aaa4ffd..c73caf087 100644 --- a/regression/reference/structlist/structlist.json +++ b/regression/reference/structlist/structlist.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/templates/pyWorkertype.cpp b/regression/reference/templates/pyWorkertype.cpp index 543b43359..a41decec2 100644 --- a/regression/reference/templates/pyWorkertype.cpp +++ b/regression/reference/templates/pyWorkertype.cpp @@ -1,5 +1,5 @@ // pyWorkertype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pyinternal_ImplWorker1type.cpp b/regression/reference/templates/pyinternal_ImplWorker1type.cpp index 79fde9e66..7cd17dfc9 100644 --- a/regression/reference/templates/pyinternal_ImplWorker1type.cpp +++ b/regression/reference/templates/pyinternal_ImplWorker1type.cpp @@ -1,5 +1,5 @@ // pyinternal_ImplWorker1type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pyinternal_ImplWorker2type.cpp b/regression/reference/templates/pyinternal_ImplWorker2type.cpp index 0a1111b77..9585c7d3f 100644 --- a/regression/reference/templates/pyinternal_ImplWorker2type.cpp +++ b/regression/reference/templates/pyinternal_ImplWorker2type.cpp @@ -1,5 +1,5 @@ // pyinternal_ImplWorker2type.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pystd_vector_doubletype.cpp b/regression/reference/templates/pystd_vector_doubletype.cpp index ad5c10d17..ed630162d 100644 --- a/regression/reference/templates/pystd_vector_doubletype.cpp +++ b/regression/reference/templates/pystd_vector_doubletype.cpp @@ -1,5 +1,5 @@ // pystd_vector_doubletype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pystd_vector_inttype.cpp b/regression/reference/templates/pystd_vector_inttype.cpp index d9b512f8f..b8dd20129 100644 --- a/regression/reference/templates/pystd_vector_inttype.cpp +++ b/regression/reference/templates/pystd_vector_inttype.cpp @@ -1,5 +1,5 @@ // pystd_vector_inttype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pytemplates_internalmodule.cpp b/regression/reference/templates/pytemplates_internalmodule.cpp index 8cf7c0765..5b8f921ee 100644 --- a/regression/reference/templates/pytemplates_internalmodule.cpp +++ b/regression/reference/templates/pytemplates_internalmodule.cpp @@ -1,5 +1,5 @@ // pytemplates_internalmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pytemplates_stdmodule.cpp b/regression/reference/templates/pytemplates_stdmodule.cpp index 9cdcecdec..ada5000c0 100644 --- a/regression/reference/templates/pytemplates_stdmodule.cpp +++ b/regression/reference/templates/pytemplates_stdmodule.cpp @@ -1,5 +1,5 @@ // pytemplates_stdmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pytemplatesmodule.cpp b/regression/reference/templates/pytemplatesmodule.cpp index 523fa98ab..9bcf96419 100644 --- a/regression/reference/templates/pytemplatesmodule.cpp +++ b/regression/reference/templates/pytemplatesmodule.cpp @@ -1,5 +1,5 @@ // pytemplatesmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pytemplatesmodule.hpp b/regression/reference/templates/pytemplatesmodule.hpp index 13fa52cd8..7fb57fcb2 100644 --- a/regression/reference/templates/pytemplatesmodule.hpp +++ b/regression/reference/templates/pytemplatesmodule.hpp @@ -1,5 +1,5 @@ // pytemplatesmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pytemplatesutil.cpp b/regression/reference/templates/pytemplatesutil.cpp index 2085cb1e3..a99f0c958 100644 --- a/regression/reference/templates/pytemplatesutil.cpp +++ b/regression/reference/templates/pytemplatesutil.cpp @@ -1,5 +1,5 @@ // pytemplatesutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/pyuser_inttype.cpp b/regression/reference/templates/pyuser_inttype.cpp index b3a84aaa6..eea7a8be6 100644 --- a/regression/reference/templates/pyuser_inttype.cpp +++ b/regression/reference/templates/pyuser_inttype.cpp @@ -1,5 +1,5 @@ // pyuser_inttype.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/setup.py b/regression/reference/templates/setup.py index 37b6dfcdd..07f2a1496 100644 --- a/regression/reference/templates/setup.py +++ b/regression/reference/templates/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/templates.json b/regression/reference/templates/templates.json index c299dc795..386242e75 100644 --- a/regression/reference/templates/templates.json +++ b/regression/reference/templates/templates.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "classes": [ { diff --git a/regression/reference/templates/templates_types.yaml b/regression/reference/templates/templates_types.yaml index 4c4c717b2..f439629d9 100644 --- a/regression/reference/templates/templates_types.yaml +++ b/regression/reference/templates/templates_types.yaml @@ -1,5 +1,5 @@ # templates_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/typestemplates.h b/regression/reference/templates/typestemplates.h index 93edf8921..e3c14733f 100644 --- a/regression/reference/templates/typestemplates.h +++ b/regression/reference/templates/typestemplates.h @@ -1,5 +1,5 @@ // typestemplates.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapftemplates.f b/regression/reference/templates/wrapftemplates.f index 400005dd2..5354be469 100644 --- a/regression/reference/templates/wrapftemplates.f +++ b/regression/reference/templates/wrapftemplates.f @@ -1,5 +1,5 @@ ! wrapftemplates.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapftemplates_internal.f b/regression/reference/templates/wrapftemplates_internal.f index 94942ec9d..8798e8a0f 100644 --- a/regression/reference/templates/wrapftemplates_internal.f +++ b/regression/reference/templates/wrapftemplates_internal.f @@ -1,5 +1,5 @@ ! wrapftemplates_internal.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapftemplates_std.f b/regression/reference/templates/wrapftemplates_std.f index 9d89de5e6..a2a427aa8 100644 --- a/regression/reference/templates/wrapftemplates_std.f +++ b/regression/reference/templates/wrapftemplates_std.f @@ -1,5 +1,5 @@ ! wrapftemplates_std.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapstd_vector_double.cpp b/regression/reference/templates/wrapstd_vector_double.cpp index 0b4ca8d1f..b474d3ea8 100644 --- a/regression/reference/templates/wrapstd_vector_double.cpp +++ b/regression/reference/templates/wrapstd_vector_double.cpp @@ -1,5 +1,5 @@ // wrapstd_vector_double.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapstd_vector_double.h b/regression/reference/templates/wrapstd_vector_double.h index 155f7cdd9..268849458 100644 --- a/regression/reference/templates/wrapstd_vector_double.h +++ b/regression/reference/templates/wrapstd_vector_double.h @@ -1,5 +1,5 @@ // wrapstd_vector_double.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapstd_vector_int.h b/regression/reference/templates/wrapstd_vector_int.h index 3fc6417a0..aaeeffbe0 100644 --- a/regression/reference/templates/wrapstd_vector_int.h +++ b/regression/reference/templates/wrapstd_vector_int.h @@ -1,5 +1,5 @@ // wrapstd_vector_int.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wraptemplates.cpp b/regression/reference/templates/wraptemplates.cpp index f9915217a..9d36856fb 100644 --- a/regression/reference/templates/wraptemplates.cpp +++ b/regression/reference/templates/wraptemplates.cpp @@ -1,5 +1,5 @@ // wraptemplates.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wraptemplates.h b/regression/reference/templates/wraptemplates.h index 9d921ad46..c789711da 100644 --- a/regression/reference/templates/wraptemplates.h +++ b/regression/reference/templates/wraptemplates.h @@ -1,5 +1,5 @@ // wraptemplates.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapuser_int.cpp b/regression/reference/templates/wrapuser_int.cpp index afd2e3f38..477ca6c46 100644 --- a/regression/reference/templates/wrapuser_int.cpp +++ b/regression/reference/templates/wrapuser_int.cpp @@ -1,5 +1,5 @@ // wrapuser_int.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapuser_int.h b/regression/reference/templates/wrapuser_int.h index c2e3d4daa..dca828b39 100644 --- a/regression/reference/templates/wrapuser_int.h +++ b/regression/reference/templates/wrapuser_int.h @@ -1,5 +1,5 @@ // wrapuser_int.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/templates/wrapvectorforint.cpp b/regression/reference/templates/wrapvectorforint.cpp index adcb3062c..803dc12d0 100644 --- a/regression/reference/templates/wrapvectorforint.cpp +++ b/regression/reference/templates/wrapvectorforint.cpp @@ -1,5 +1,5 @@ // wrapvectorforint.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/luaTutorialmodule.cpp b/regression/reference/tutorial/luaTutorialmodule.cpp index 816aa5cf3..e1d5d0c8e 100644 --- a/regression/reference/tutorial/luaTutorialmodule.cpp +++ b/regression/reference/tutorial/luaTutorialmodule.cpp @@ -1,5 +1,5 @@ // luaTutorialmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/luaTutorialmodule.hpp b/regression/reference/tutorial/luaTutorialmodule.hpp index 160f1788e..a2279747f 100644 --- a/regression/reference/tutorial/luaTutorialmodule.hpp +++ b/regression/reference/tutorial/luaTutorialmodule.hpp @@ -1,5 +1,5 @@ // luaTutorialmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/pyTutorialmodule.cpp b/regression/reference/tutorial/pyTutorialmodule.cpp index 1ea0b9f62..786464566 100644 --- a/regression/reference/tutorial/pyTutorialmodule.cpp +++ b/regression/reference/tutorial/pyTutorialmodule.cpp @@ -1,5 +1,5 @@ // pyTutorialmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/pyTutorialmodule.hpp b/regression/reference/tutorial/pyTutorialmodule.hpp index d43a9e375..d04928034 100644 --- a/regression/reference/tutorial/pyTutorialmodule.hpp +++ b/regression/reference/tutorial/pyTutorialmodule.hpp @@ -1,5 +1,5 @@ // pyTutorialmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/setup.py b/regression/reference/tutorial/setup.py index 565608948..71cc4d33e 100644 --- a/regression/reference/tutorial/setup.py +++ b/regression/reference/tutorial/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/tutorial.json b/regression/reference/tutorial/tutorial.json index e4e8afebc..cdafdba03 100644 --- a/regression/reference/tutorial/tutorial.json +++ b/regression/reference/tutorial/tutorial.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/tutorial/typesTutorial.h b/regression/reference/tutorial/typesTutorial.h index 5deafff17..7a9515e36 100644 --- a/regression/reference/tutorial/typesTutorial.h +++ b/regression/reference/tutorial/typesTutorial.h @@ -1,5 +1,5 @@ // typesTutorial.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/utilTutorial.cpp b/regression/reference/tutorial/utilTutorial.cpp index cf1930e2f..0ef1a0cc4 100644 --- a/regression/reference/tutorial/utilTutorial.cpp +++ b/regression/reference/tutorial/utilTutorial.cpp @@ -1,5 +1,5 @@ // utilTutorial.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/wrapTutorial.cpp b/regression/reference/tutorial/wrapTutorial.cpp index b21122bf3..824f30401 100644 --- a/regression/reference/tutorial/wrapTutorial.cpp +++ b/regression/reference/tutorial/wrapTutorial.cpp @@ -1,5 +1,5 @@ // wrapTutorial.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/wrapTutorial.h b/regression/reference/tutorial/wrapTutorial.h index 4e26c2f34..caf782cef 100644 --- a/regression/reference/tutorial/wrapTutorial.h +++ b/regression/reference/tutorial/wrapTutorial.h @@ -1,5 +1,5 @@ // wrapTutorial.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/tutorial/wrapftutorial.f b/regression/reference/tutorial/wrapftutorial.f index 7963b529d..07116c990 100644 --- a/regression/reference/tutorial/wrapftutorial.f +++ b/regression/reference/tutorial/wrapftutorial.f @@ -1,5 +1,5 @@ ! wrapftutorial.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/pytypesmodule.cpp b/regression/reference/types/pytypesmodule.cpp index ef799f720..38a8a2a0a 100644 --- a/regression/reference/types/pytypesmodule.cpp +++ b/regression/reference/types/pytypesmodule.cpp @@ -1,5 +1,5 @@ // pytypesmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/pytypesmodule.hpp b/regression/reference/types/pytypesmodule.hpp index 132d2c588..8f547b9d3 100644 --- a/regression/reference/types/pytypesmodule.hpp +++ b/regression/reference/types/pytypesmodule.hpp @@ -1,5 +1,5 @@ // pytypesmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/setup.py b/regression/reference/types/setup.py index a7f8bc04c..36e152233 100644 --- a/regression/reference/types/setup.py +++ b/regression/reference/types/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/types.json b/regression/reference/types/types.json index ee5192232..ba0188c3f 100644 --- a/regression/reference/types/types.json +++ b/regression/reference/types/types.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/types/typestypes.h b/regression/reference/types/typestypes.h index bfb16fd63..913c6bd42 100644 --- a/regression/reference/types/typestypes.h +++ b/regression/reference/types/typestypes.h @@ -1,5 +1,5 @@ // typestypes.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/wrapftypes.f b/regression/reference/types/wrapftypes.f index 9c5a932d3..bac331c24 100644 --- a/regression/reference/types/wrapftypes.f +++ b/regression/reference/types/wrapftypes.f @@ -1,5 +1,5 @@ ! wrapftypes.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/wraptypes.cpp b/regression/reference/types/wraptypes.cpp index 0f9414b33..111be9edd 100644 --- a/regression/reference/types/wraptypes.cpp +++ b/regression/reference/types/wraptypes.cpp @@ -1,5 +1,5 @@ // wraptypes.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/types/wraptypes.h b/regression/reference/types/wraptypes.h index 4139265d3..b4fc6e2ed 100644 --- a/regression/reference/types/wraptypes.h +++ b/regression/reference/types/wraptypes.h @@ -1,5 +1,5 @@ // wraptypes.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-list/pyvectorsmodule.cpp b/regression/reference/vectors-list/pyvectorsmodule.cpp index 5828a6c29..5676a1e1b 100644 --- a/regression/reference/vectors-list/pyvectorsmodule.cpp +++ b/regression/reference/vectors-list/pyvectorsmodule.cpp @@ -1,5 +1,5 @@ // pyvectorsmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-list/pyvectorsmodule.hpp b/regression/reference/vectors-list/pyvectorsmodule.hpp index b777d5c2b..513130e5e 100644 --- a/regression/reference/vectors-list/pyvectorsmodule.hpp +++ b/regression/reference/vectors-list/pyvectorsmodule.hpp @@ -1,5 +1,5 @@ // pyvectorsmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-list/setup.py b/regression/reference/vectors-list/setup.py index 8caa728a7..82b285054 100644 --- a/regression/reference/vectors-list/setup.py +++ b/regression/reference/vectors-list/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-list/vectors.json b/regression/reference/vectors-list/vectors.json index f9b81f199..dd3785699 100644 --- a/regression/reference/vectors-list/vectors.json +++ b/regression/reference/vectors-list/vectors.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/vectors-numpy/pyvectorsmodule.cpp b/regression/reference/vectors-numpy/pyvectorsmodule.cpp index d2adfa150..b3534968b 100644 --- a/regression/reference/vectors-numpy/pyvectorsmodule.cpp +++ b/regression/reference/vectors-numpy/pyvectorsmodule.cpp @@ -1,5 +1,5 @@ // pyvectorsmodule.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-numpy/pyvectorsmodule.hpp b/regression/reference/vectors-numpy/pyvectorsmodule.hpp index d73fbcd5e..a81089a99 100644 --- a/regression/reference/vectors-numpy/pyvectorsmodule.hpp +++ b/regression/reference/vectors-numpy/pyvectorsmodule.hpp @@ -1,5 +1,5 @@ // pyvectorsmodule.hpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-numpy/pyvectorsutil.cpp b/regression/reference/vectors-numpy/pyvectorsutil.cpp index d993e0225..c1d3db6ca 100644 --- a/regression/reference/vectors-numpy/pyvectorsutil.cpp +++ b/regression/reference/vectors-numpy/pyvectorsutil.cpp @@ -1,5 +1,5 @@ // pyvectorsutil.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-numpy/setup.py b/regression/reference/vectors-numpy/setup.py index 63162b188..5b49bce11 100644 --- a/regression/reference/vectors-numpy/setup.py +++ b/regression/reference/vectors-numpy/setup.py @@ -1,5 +1,5 @@ # setup.py -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud nowrite-version. Do not edit. # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors-numpy/vectors.json b/regression/reference/vectors-numpy/vectors.json index 6f59dc798..e4f9ae70c 100644 --- a/regression/reference/vectors-numpy/vectors.json +++ b/regression/reference/vectors-numpy/vectors.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/vectors/typesvectors.h b/regression/reference/vectors/typesvectors.h index d0d12b9ab..d3176a3d9 100644 --- a/regression/reference/vectors/typesvectors.h +++ b/regression/reference/vectors/typesvectors.h @@ -1,5 +1,5 @@ // typesvectors.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors/utilvectors.cpp b/regression/reference/vectors/utilvectors.cpp index 439e9db93..68d384f1e 100644 --- a/regression/reference/vectors/utilvectors.cpp +++ b/regression/reference/vectors/utilvectors.cpp @@ -1,5 +1,5 @@ // utilvectors.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors/vectors.json b/regression/reference/vectors/vectors.json index 4b42ee95b..76a865629 100644 --- a/regression/reference/vectors/vectors.json +++ b/regression/reference/vectors/vectors.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud nowrite-version and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/vectors/wrapfvectors.f b/regression/reference/vectors/wrapfvectors.f index 796a1d57d..67109baa6 100644 --- a/regression/reference/vectors/wrapfvectors.f +++ b/regression/reference/vectors/wrapfvectors.f @@ -1,5 +1,5 @@ ! wrapfvectors.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud nowrite-version. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors/wrapvectors.cpp b/regression/reference/vectors/wrapvectors.cpp index 91f95aa87..6502dbd4b 100644 --- a/regression/reference/vectors/wrapvectors.cpp +++ b/regression/reference/vectors/wrapvectors.cpp @@ -1,5 +1,5 @@ // wrapvectors.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/vectors/wrapvectors.h b/regression/reference/vectors/wrapvectors.h index 2358bc9dd..367370f92 100644 --- a/regression/reference/vectors/wrapvectors.h +++ b/regression/reference/vectors/wrapvectors.h @@ -1,5 +1,5 @@ // wrapvectors.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/shroud/main.py b/shroud/main.py index deefc6ee8..da5f0235b 100644 --- a/shroud/main.py +++ b/shroud/main.py @@ -175,7 +175,7 @@ def dump_jsonfile(config, logdir, basename, newlibrary): out = dict( # This notice should sort to the top. __NOTICE__="This file is generated by Shroud {} " - "and is useful for debugging.".format(metadata.__version__), + "and is useful for debugging.".format(config.write_version), library=todict.to_dict(newlibrary), # yaml=all, ) @@ -195,6 +195,17 @@ def dump_jsonfile(config, logdir, basename, newlibrary): fp.close() +# https://thisdataguy.com/2017/07/03/no-options-with-argparse-and-python/ +class BooleanAction(argparse.Action): + def __init__(self, option_strings, dest, nargs=None, **kwargs): + super(BooleanAction, self).__init__( + option_strings, dest, nargs=0, **kwargs) + + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, self.dest, + False if option_string.startswith('--no') else True) + + def main(): appname = "shroud" @@ -263,6 +274,13 @@ def main(): parser.add_argument( "--write-helpers", default="", help="Write a file with helper functions." ) + parser.add_argument( + "--write-version", "--nowrite-version", + dest="write_version", + action=BooleanAction, + default=True, + help="Write version into generated files. --nowrite-version to not write version" + ) parser.add_argument( "--yaml-types", default="", help="Write a YAML file with default types." ) @@ -368,6 +386,10 @@ def main_with_args(args): config.write_helpers = args.write_helpers config.yaml_types = args.yaml_types config.log = log + if args.write_version: + config.write_version = metadata.__version__ + else: + config.write_version = "nowrite-version" # config.cfiles = [] # list of C/C++ files created # config.ffiles = [] # list of Fortran files created # config.pyfiles = [] # list of Python module files created diff --git a/shroud/util.py b/shroud/util.py index df7e94d60..f7ba11ed2 100644 --- a/shroud/util.py +++ b/shroud/util.py @@ -11,8 +11,6 @@ import os import string -from . import metadata - fmt = string.Formatter() def wformat(template, dct): @@ -448,7 +446,7 @@ def write_output_file(self, fname, directory, output, spaces=" "): fp = open(os.path.join(directory, fname), "w") fp.write("%s %s\n" % (self.comment, fname)) fp.write("{} This file is generated by Shroud {}. Do not edit.\n". - format(self.comment, metadata.__version__)) + format(self.comment, self.config.write_version)) self.write_copyright(fp) self.indent = 0 self.write_lines(fp, output, spaces) From 79860bb1460c5cf4738e315016c3a44aa751c421 Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Tue, 4 Aug 2020 22:46:46 -0700 Subject: [PATCH 35/36] Mangle fmt.F_capsule_data_type with C_prefix Avoid issues with multiple modules defining the type. Could be private but gfortran complains Error: Derived type 'tut_shroud_capsule_data' at (1) cannot be declared with both PRIVATE and BIND(C) attributes --- CHANGELOG.md | 2 ++ docs/reference.rst | 25 ++++++++++++++++--- .../reference/arrayclass/wrapfarrayclass.f | 6 ++--- regression/reference/cdesc/wrapfcdesc.f | 6 ++--- regression/reference/classes/wrapfclasses.f | 6 ++--- .../reference/debugfalse/wrapftutorial.f | 6 ++--- .../example/wrapfUserLibrary_example_nested.f | 6 ++--- regression/reference/memdoc/wrapfmemdoc.f | 6 ++--- regression/reference/namespace/wrapfns.f | 6 ++--- regression/reference/none/helpers.f | 14 +++++------ regression/reference/none/none.json | 3 ++- .../reference/ownership/wrapfownership.f | 14 +++++------ .../reference/pointers-c/wrapfpointers.f | 6 ++--- .../reference/pointers-cxx/wrapfpointers.f | 6 ++--- regression/reference/strings/wrapfstrings.f | 6 ++--- regression/reference/tutorial/wrapftutorial.f | 6 ++--- regression/reference/vectors/wrapfvectors.f | 6 ++--- regression/run/ccomplex/ccomplex.h | 2 +- shroud/ast.py | 6 ++--- 19 files changed, 79 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24b1ce499..41f5e2c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. fixes a conflict when two Shroud generated wrappers are used in the same subprogram. Ideally these helpers would be `PRIVATE`, but gfortran does not allow `PRIVATE` and `BIND(C)` together. +- Mangle names of Fortran derived types for capsules with *C_prefix* to avoid + name conflicts. - Correctly count Python arguments when there are default arguments. Do not include *intent(out)* arguments. diff --git a/docs/reference.rst b/docs/reference.rst index 541bdc5a9..9b0b3c7b7 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -458,11 +458,21 @@ F_abstract_interface_subprogram_template Defaults to ``arg{index}`` where *index* is the 0-based argument index. see :ref:`DeclAnchor_Function_Pointers`. +F_array_type_template + ``{C_prefix}SHROUD_array`` + +F_capsule_data_type_template + ``{C_prefix}SHROUD_capsule_data`` + F_capsule_data_type_class_template Name of the derived type which is the ``BIND(C)`` equivalent of the struct used to implement a shadow class. Each class must have a unique name. - Defaults to ``SHROUD_{F_name_scope}capsule``. + Defaults to ``{C_prefix}SHROUD_{F_name_scope}capsule``. + +F_capsule_type_template + ``{C_prefix}SHROUD_capsule`` + F_enum_member_template Name of enumeration member in Fortran wrapper. @@ -717,7 +727,8 @@ CXX_this F_array_type Name of derived type used to store information about an array such as its address and size. - Defaults to *SHROUD_array*. + Default value from option *F_array_type_template* which + defaults to *{C_prefix}SHROUD_array*. F_C_prefix Prefix added to name of generated Fortran interface for C routines. @@ -725,7 +736,12 @@ F_C_prefix F_capsule_data_type Name of derived type used to share memory information with C or C++. - Defaults to *SHROUD_capsule_data*. + Member of *F_array_type*. + Default value from option *F_capsule_data_type_template* which + defaults to *{C_prefix}SHROUD_capsule_data*. + + Each class has a similar derived type, but with a different name + to enforce type safety. F_capsule_delete_function Name of type-bound function of *F_capsule_type* which will @@ -739,7 +755,8 @@ F_capsule_final_function F_capsule_type Name of derived type used to release memory allocated by C or C++. - Defaults to *SHROUD_capsule*. + Default value from option *F_capsule_type_template* which + defaults to *{C_prefix}SHROUD_capsule*. Contains a *F_capsule_data_type*. F_derived_member diff --git a/regression/reference/arrayclass/wrapfarrayclass.f b/regression/reference/arrayclass/wrapfarrayclass.f index 8cfbc69cc..a6875ae5e 100644 --- a/regression/reference/arrayclass/wrapfarrayclass.f +++ b/regression/reference/arrayclass/wrapfarrayclass.f @@ -22,15 +22,15 @@ module arrayclass_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: ARR_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type ARR_SHROUD_capsule_data ! helper array_context type, bind(C) :: ARR_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(ARR_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/cdesc/wrapfcdesc.f b/regression/reference/cdesc/wrapfcdesc.f index 8fdbd04a8..779f7ceac 100644 --- a/regression/reference/cdesc/wrapfcdesc.f +++ b/regression/reference/cdesc/wrapfcdesc.f @@ -55,15 +55,15 @@ module cdesc_mod SH_TYPE_OTHER = 32 ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: CDE_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type CDE_SHROUD_capsule_data ! helper array_context type, bind(C) :: CDE_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(CDE_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/classes/wrapfclasses.f b/regression/reference/classes/wrapfclasses.f index 578819c6c..bc764e735 100644 --- a/regression/reference/classes/wrapfclasses.f +++ b/regression/reference/classes/wrapfclasses.f @@ -22,16 +22,16 @@ module classes_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: CLA_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type CLA_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: CLA_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(CLA_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/debugfalse/wrapftutorial.f b/regression/reference/debugfalse/wrapftutorial.f index e802bc0ce..2852af65f 100644 --- a/regression/reference/debugfalse/wrapftutorial.f +++ b/regression/reference/debugfalse/wrapftutorial.f @@ -22,16 +22,16 @@ module tutorial_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: TUT_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type TUT_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: TUT_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(TUT_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/example/wrapfUserLibrary_example_nested.f b/regression/reference/example/wrapfUserLibrary_example_nested.f index 5113253cf..5a779bc41 100644 --- a/regression/reference/example/wrapfUserLibrary_example_nested.f +++ b/regression/reference/example/wrapfUserLibrary_example_nested.f @@ -23,15 +23,15 @@ module userlibrary_example_nested_mod ! splicer end namespace.example::nested.module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: AA_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type AA_SHROUD_capsule_data ! helper array_context type, bind(C) :: AA_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(AA_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/memdoc/wrapfmemdoc.f b/regression/reference/memdoc/wrapfmemdoc.f index a36059d21..672e6a621 100644 --- a/regression/reference/memdoc/wrapfmemdoc.f +++ b/regression/reference/memdoc/wrapfmemdoc.f @@ -22,16 +22,16 @@ module memdoc_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: STR_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type STR_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: STR_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(STR_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/namespace/wrapfns.f b/regression/reference/namespace/wrapfns.f index 04d8a9652..559366261 100644 --- a/regression/reference/namespace/wrapfns.f +++ b/regression/reference/namespace/wrapfns.f @@ -22,15 +22,15 @@ module ns_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: NS_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type NS_SHROUD_capsule_data ! helper array_context type, bind(C) :: NS_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(NS_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/none/helpers.f b/regression/reference/none/helpers.f index 8184e167e..96f0c7b3e 100644 --- a/regression/reference/none/helpers.f +++ b/regression/reference/none/helpers.f @@ -40,7 +40,7 @@ ! helper array_context type, bind(C) :: LIB_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(LIB_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element @@ -58,10 +58,10 @@ ##### start capsule_data_helper derived_type ! helper capsule_data_helper -type, bind(C) :: SHROUD_capsule_data +type, bind(C) :: LIB_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor -end type SHROUD_capsule_data +end type LIB_SHROUD_capsule_data ##### end capsule_data_helper derived_type ##### start capsule_dtor interface @@ -71,9 +71,9 @@ ! Delete memory in a capsule. subroutine LIB_SHROUD_capsule_dtor(ptr)& bind(C, name="LIB_SHROUD_memory_destructor") - import SHROUD_capsule_data + import LIB_SHROUD_capsule_data implicit none - type(SHROUD_capsule_data), intent(INOUT) :: ptr + type(LIB_SHROUD_capsule_data), intent(INOUT) :: ptr end subroutine LIB_SHROUD_capsule_dtor end interface ##### end capsule_dtor interface @@ -83,7 +83,7 @@ end subroutine LIB_SHROUD_capsule_dtor ! helper capsule_helper type :: LIB_SHROUD_capsule private - type(SHROUD_capsule_data) :: mem + type(LIB_SHROUD_capsule_data) :: mem contains final :: SHROUD_capsule_final procedure :: delete => SHROUD_capsule_delete @@ -93,7 +93,7 @@ end subroutine LIB_SHROUD_capsule_dtor ##### start capsule_helper source ! helper capsule_helper -! finalize a static SHROUD_capsule_data +! finalize a static LIB_SHROUD_capsule_data subroutine SHROUD_capsule_final(cap) type(LIB_SHROUD_capsule), intent(INOUT) :: cap call LIB_SHROUD_capsule_dtor(cap%mem) diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index 10968642d..b13db7cca 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -40,7 +40,7 @@ "F_C_result_clause": "", "F_arg_c_call": "", "F_array_type": "LIB_SHROUD_array", - "F_capsule_data_type": "SHROUD_capsule_data", + "F_capsule_data_type": "LIB_SHROUD_capsule_data", "F_capsule_delete_function": "SHROUD_capsule_delete", "F_capsule_final_function": "SHROUD_capsule_final", "F_capsule_type": "LIB_SHROUD_capsule", @@ -148,6 +148,7 @@ "F_array_type_template": "{C_prefix}SHROUD_array", "F_auto_reference_count": false, "F_capsule_data_type_class_template": "{C_prefix}SHROUD_{F_name_scope}capsule", + "F_capsule_data_type_template": "{C_prefix}SHROUD_capsule_data", "F_capsule_type_template": "{C_prefix}SHROUD_capsule", "F_create_bufferify_function": true, "F_create_generic": true, diff --git a/regression/reference/ownership/wrapfownership.f b/regression/reference/ownership/wrapfownership.f index b535096da..9170f8919 100644 --- a/regression/reference/ownership/wrapfownership.f +++ b/regression/reference/ownership/wrapfownership.f @@ -22,15 +22,15 @@ module ownership_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: OWN_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type OWN_SHROUD_capsule_data ! helper array_context type, bind(C) :: OWN_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(OWN_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element @@ -47,7 +47,7 @@ module ownership_mod ! helper capsule_helper type :: OWN_SHROUD_capsule private - type(SHROUD_capsule_data) :: mem + type(OWN_SHROUD_capsule_data) :: mem contains final :: SHROUD_capsule_final procedure :: delete => SHROUD_capsule_delete @@ -431,9 +431,9 @@ end function c_get_class_new ! Delete memory in a capsule. subroutine OWN_SHROUD_capsule_dtor(ptr) & bind(C, name="OWN_SHROUD_memory_destructor") - import SHROUD_capsule_data + import OWN_SHROUD_capsule_data implicit none - type(SHROUD_capsule_data), intent(INOUT) :: ptr + type(OWN_SHROUD_capsule_data), intent(INOUT) :: ptr end subroutine OWN_SHROUD_capsule_dtor end interface @@ -733,7 +733,7 @@ function class1_ne(a,b) result (rv) end function class1_ne ! helper capsule_helper - ! finalize a static SHROUD_capsule_data + ! finalize a static OWN_SHROUD_capsule_data subroutine SHROUD_capsule_final(cap) type(OWN_SHROUD_capsule), intent(INOUT) :: cap call OWN_SHROUD_capsule_dtor(cap%mem) diff --git a/regression/reference/pointers-c/wrapfpointers.f b/regression/reference/pointers-c/wrapfpointers.f index 22073834e..edbd7da28 100644 --- a/regression/reference/pointers-c/wrapfpointers.f +++ b/regression/reference/pointers-c/wrapfpointers.f @@ -22,16 +22,16 @@ module pointers_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: POI_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type POI_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: POI_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(POI_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/pointers-cxx/wrapfpointers.f b/regression/reference/pointers-cxx/wrapfpointers.f index 48394f9ef..34a40c695 100644 --- a/regression/reference/pointers-cxx/wrapfpointers.f +++ b/regression/reference/pointers-cxx/wrapfpointers.f @@ -22,16 +22,16 @@ module pointers_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: POI_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type POI_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: POI_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(POI_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/strings/wrapfstrings.f b/regression/reference/strings/wrapfstrings.f index fd2a8a1f6..e1d34c06b 100644 --- a/regression/reference/strings/wrapfstrings.f +++ b/regression/reference/strings/wrapfstrings.f @@ -22,16 +22,16 @@ module strings_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: STR_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type STR_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: STR_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(STR_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/tutorial/wrapftutorial.f b/regression/reference/tutorial/wrapftutorial.f index 07116c990..0c6047deb 100644 --- a/regression/reference/tutorial/wrapftutorial.f +++ b/regression/reference/tutorial/wrapftutorial.f @@ -22,16 +22,16 @@ module tutorial_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: TUT_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type TUT_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: TUT_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(TUT_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/reference/vectors/wrapfvectors.f b/regression/reference/vectors/wrapfvectors.f index 67109baa6..e9d05e9ef 100644 --- a/regression/reference/vectors/wrapfvectors.f +++ b/regression/reference/vectors/wrapfvectors.f @@ -22,16 +22,16 @@ module vectors_mod ! splicer end module_top ! helper capsule_data_helper - type, bind(C) :: SHROUD_capsule_data + type, bind(C) :: VEC_SHROUD_capsule_data type(C_PTR) :: addr = C_NULL_PTR ! address of C++ memory integer(C_INT) :: idtor = 0 ! index of destructor - end type SHROUD_capsule_data + end type VEC_SHROUD_capsule_data ! start array_context ! helper array_context type, bind(C) :: VEC_SHROUD_array ! address of C++ memory - type(SHROUD_capsule_data) :: cxx + type(VEC_SHROUD_capsule_data) :: cxx ! address of data in cxx type(C_PTR) :: base_addr = C_NULL_PTR ! type of element diff --git a/regression/run/ccomplex/ccomplex.h b/regression/run/ccomplex/ccomplex.h index fe3e095b0..2a49b7723 100644 --- a/regression/run/ccomplex/ccomplex.h +++ b/regression/run/ccomplex/ccomplex.h @@ -23,6 +23,6 @@ void acceptDoubleComplexOutPtrFlag(double complex *arg1, int *flag); //---------------------------------------------------------------------- -void acceptDoubleComplexInoutArrayList(double complex *arg1, int narg) +void acceptDoubleComplexInoutArrayList(double complex *arg1, int narg); #endif // CCOMPLEX_H diff --git a/shroud/ast.py b/shroud/ast.py index 71b4096d4..1e667f7d5 100644 --- a/shroud/ast.py +++ b/shroud/ast.py @@ -467,8 +467,9 @@ def default_options(self): F_impl_filename_library_template="wrapf{library_lower}.{F_filename_suffix}", F_impl_filename_namespace_template="wrapf{file_scope}.{F_filename_suffix}", F_array_type_template="{C_prefix}SHROUD_array", - F_capsule_type_template="{C_prefix}SHROUD_capsule", + F_capsule_data_type_template="{C_prefix}SHROUD_capsule_data", F_capsule_data_type_class_template="{C_prefix}SHROUD_{F_name_scope}capsule", + F_capsule_type_template="{C_prefix}SHROUD_capsule", F_abstract_interface_subprogram_template="{underscore_name}_{argname}", F_abstract_interface_argument_template="arg{index}", @@ -589,8 +590,6 @@ def default_format(self, fmtdict, kwargs): F_this="obj", C_string_result_as_arg="SHF_rv", F_string_result_as_arg="", - F_capsule_data_type="SHROUD_capsule_data", -# F_capsule_type="SHROUD_capsule", F_capsule_final_function="SHROUD_capsule_final", F_capsule_delete_function="SHROUD_capsule_delete", @@ -756,6 +755,7 @@ def default_format(self, fmtdict, kwargs): self.eval_template("F_module_name", "_library") fmt_library.F_module_name = fmt_library.F_module_name.lower() self.eval_template("F_impl_filename", "_library") + self.eval_template("F_capsule_data_type") # If user changes PY_module_name, reflect change in PY_module_scope. self.set_fmt_default( From afe9592bb57abfd9eef67dcba5267d7e77c5487a Mon Sep 17 00:00:00 2001 From: Lee Taylor Date: Wed, 5 Aug 2020 00:33:35 -0700 Subject: [PATCH 36/36] Update version to 0.12.2 --- CHANGELOG.md | 2 ++ Makefile | 26 ++++++++++++++++++++++- README.md | 3 ++- docs/conf.py | 2 +- regression/reference/none/def_types.yaml | 2 +- regression/reference/none/none.json | 2 +- regression/reference/none/typeslibrary.h | 2 +- regression/reference/none/wrapflibrary.f | 2 +- regression/reference/none/wraplibrary.cpp | 2 +- shroud/metadata.py | 4 ++-- 10 files changed, 37 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f5e2c60..fa3eff810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## v0.12.2 - 2020-08-04 ### Added - Added std::string scalar arguments. diff --git a/Makefile b/Makefile index 358a1d138..0e82cf6b5 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,7 @@ include $(top)/regression/run/Makefile virtualenv : $(venv.dir) $(venv.dir) : $(PYTHON) -m venv --system-site-packages $(venv.dir) + $(python.dir)/pip install --upgrade pip virtualenv2 : $(venv) --system-site-packages $(venv.dir) @@ -111,10 +112,33 @@ pypi: .PHONY : install-twine sdist testpypi pypi +######################################################################## +# Creating pex executable +# This puts all of shroud into a single file. +# https://github.com/pantsbuild/pex + +install-pex : + $(python.dir)/pip install pex + +# Use version in output file name. +pex-file : vernum = $(shell grep __version__ shroud/metadata.py | awk -F '"' '{print $$2}') +pex-file : dist-pex/.. + $(python.dir)/pex . -r requirements.txt --python-shebang="/usr/bin/env python3" \ + -e shroud.main:main -o dist-pex/shroud-$(vernum).pex + cd dist-pex && ln --force --symbolic shroud-$(vernum).pex shroud.pex + +# Test pex created executable +do-test-pex : + @export TEST_OUTPUT_DIR=$(top)/$(tempdir)/regression; \ + export TEST_INPUT_DIR=$(top)/regression; \ + export EXECUTABLE_DIR=$(top)/dist-pex/shroud.pex; \ + $(PYTHON) regression/do-test.py $(do-test-args) + ######################################################################## # Creating shiv executable # This puts all of shroud into a single file. # https://github.com/linkedin/shiv +# Note: Python 3.6+ install-shiv : $(python.dir)/pip install shiv @@ -124,7 +148,7 @@ shiv-file : vernum = $(shell grep __version__ shroud/metadata.py | awk -F '"' '{ shiv-file : dist-shiv/.. $(python.dir)/shiv --python '/usr/bin/env python3' -c shroud \ -o dist-shiv/shroud-$(vernum).pyz . - cd dist-shiv && ln -s shroud-$(vernum).pyz shroud.pyz + cd dist-shiv && ln --force --symbolic shroud-$(vernum).pyz shroud.pyz # Test shiv created executable do-test-shiv : diff --git a/README.md b/README.md index b1d9b1319..90a31ecd1 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,10 @@ In addition, a file created by is available from the github release. Shroud and PyYAML are bundled into a single executable which uses the Python3 on your path. +Shiv requires Python 3.6+. ``` -wget https://github.com/LLNL/shroud/archive/shroud-0.12.1.pyz +wget https://github.com/LLNL/shroud/archive/shroud-0.12.2.pyz ``` diff --git a/docs/conf.py b/docs/conf.py index 8419bea54..334a2d1e2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,7 +53,7 @@ # The short X.Y version. version = '0.12' # The full version, including alpha/beta/rc tags. -release = '0.12.1' +release = '0.12.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/regression/reference/none/def_types.yaml b/regression/reference/none/def_types.yaml index 340e8e4f8..93e8f0272 100644 --- a/regression/reference/none/def_types.yaml +++ b/regression/reference/none/def_types.yaml @@ -1,5 +1,5 @@ # def_types.yaml -# This file is generated by Shroud 0.12.1. Do not edit. +# This file is generated by Shroud 0.12.2. Do not edit. # # Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. diff --git a/regression/reference/none/none.json b/regression/reference/none/none.json index b13db7cca..eefb1c03b 100644 --- a/regression/reference/none/none.json +++ b/regression/reference/none/none.json @@ -1,5 +1,5 @@ { - "__NOTICE__": "This file is generated by Shroud 0.12.1 and is useful for debugging.", + "__NOTICE__": "This file is generated by Shroud 0.12.2 and is useful for debugging.", "library": { "copyright": [ "Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and", diff --git a/regression/reference/none/typeslibrary.h b/regression/reference/none/typeslibrary.h index cc59b0786..1d4449822 100644 --- a/regression/reference/none/typeslibrary.h +++ b/regression/reference/none/typeslibrary.h @@ -1,5 +1,5 @@ // typeslibrary.h -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud 0.12.2. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/regression/reference/none/wrapflibrary.f b/regression/reference/none/wrapflibrary.f index 76119fced..b5764151a 100644 --- a/regression/reference/none/wrapflibrary.f +++ b/regression/reference/none/wrapflibrary.f @@ -1,5 +1,5 @@ ! wrapflibrary.f -! This file is generated by Shroud 0.12.1. Do not edit. +! This file is generated by Shroud 0.12.2. Do not edit. ! Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and ! other Shroud Project Developers. ! See the top-level COPYRIGHT file for details. diff --git a/regression/reference/none/wraplibrary.cpp b/regression/reference/none/wraplibrary.cpp index 4976cdaed..ddc2c9c76 100644 --- a/regression/reference/none/wraplibrary.cpp +++ b/regression/reference/none/wraplibrary.cpp @@ -1,5 +1,5 @@ // wraplibrary.cpp -// This file is generated by Shroud 0.12.1. Do not edit. +// This file is generated by Shroud 0.12.2. Do not edit. // Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. diff --git a/shroud/metadata.py b/shroud/metadata.py index 406ffed6a..96713a622 100644 --- a/shroud/metadata.py +++ b/shroud/metadata.py @@ -5,6 +5,6 @@ # SPDX-License-Identifier: (BSD-3-Clause) ######################################################################## -__version__ = "0.12.1" -__version_info__ = (0, 12, 1, "final", 0) +__version__ = "0.12.2" +__version_info__ = (0, 12, 2, "final", 0) # 'alpha', 'beta', 'candidate', or 'final'.