Conversation
Used with capsule_memflags. Will not add to the top of the type files but surrounded by #ifndef SHROUD_SHARE_H so that multiple wrapped libraries can define the same, identical symbols. This allows one wrapped library to use another. Most symbols are made unique by name mangling, this is another solution to sharing.
When the object is a argument that is intent(IN), the capsule needs to be intent(IN) too, otherwise: gfortran Dummy argument ‘obj’ with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1) oneapi A dummy argument with the INTENT(IN) attribute shall not be defined nor become undefined. [OBJ]
Used to declare a member function as const when C++ const keyword is not used. This sets the shadow argument as intent(IN) and allows the function to be called with an intent(IN) dummy argument.
It was missing. Added a test case to cxxlibrary.yaml.
There a test in scope.yaml but it is not compiled since there
is not run/scope library.
+ integer, parameter :: color_enum = C_INT
integer(color_enum), parameter :: colorenum_red = 60
Do not wrap for Python since it is not compiling.
Fix at some future date...
A best practice. Add some comments.
Merge its behavior into option flatten_space. No need to treat Fortran differently. This will change splicernames when maybe it shouldn't. Add a test for deprecated options, similar to deprecate format, and check for setting F_flatten_namespace.
The declarations in the Namespace will go into the parent's file. This fixes a problem where an include file which will not exist was being added to a typemap. Then it was added to generated code resulting in a compile error.
The symbol table lookup has moved to declast.py so this argument is no longer needed.
Helps to identify where Shroud is currently processing.
Similar to ModuleInfo in wrapf.py. Used to gather up output for a file. Currently only a single file can be generated at a time. But planned changes to how namespace are processed will require the ability to have several files being accumulated at once.
Nessary for future flatten_namespace work. It keeps the each output file independent in its own instance.
The NamespaceNode is now always added to the parent NamespaceNode (or LibraryNode). Before it was not added if option.flatten_namespace was set. Instead all of the namespaces declarations were added directly to the parent Namespace. This could present issues with duplicate names. Now the hierarchy is preserved in the Node tree. This restores the splicer names which lost the namespace component in some cases in an earlier commit. It also causes some reordering of declarations in the C and Fortran wrappers. Instead wrapf.py and wrapc.py are responsible for checking for flatten_namespace and do the correct thing. Note that Python and Lua do not check for flatten_namespace and will create wrappers that mirror the Node tree. To be fixed: the 'Wrote filename' in the log is being duplicated since write_file is being called too often due to now having to check for flatten_namespace explicitly.
They are now created since the Python wrapper does not process option flatten_namespace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove option F_flatten_namespace, only have option flatten_namespace which applies to both C and Fortran. Preserved the
NamespaceNodein the tree.Move
SwigMemFlagsso it is protected bySHROUD_SHARE_Hdefine. This allows several wrapped libraries to define the same symbols with having a compiler error.Add a +constfunc attribute. Used when a member function does not change the class. Keeps the capsule as
intent(IN)in the generated Fortran.Factor out class FileInfo to allow multiple C files to be built up at once. Needed for the change in namespace processing.