Move code-running functions out of src/packfile/api.c
completed by: Kristaba
Task Description: In Parrot source code files are arranged in a very specific way. Individual subsystems have their own directory in src/. Inside the subsystem directory, there should be a file api.c which contains the external API for the subsystem. Functions in api.c should be public and decorated with PARROT_EXPORT, unless the function is exposed as a pointer in a struct. Other files in the folder should contain the internal (and private) machinery that makes the subsystem work. If the subsystem needs a private header file, it should be called <subsystem_name>_private.h
Separate out some functions relating to executing functions from a PackFile out of src/packfile/api.c into a new file src/packfile/execute.c. These functions include:
Steps to Complete:
- Create a fork of parrot/parrot on Github
- Create a new file src/packfile/packfile_private.h. This is a private header file for the subsystem. Include the necessary tags for headerizer.
- Create a new file src/packfile/execute.c. Include the necessary POD documentation header and file footer information. Include headerizer tags for static functions and for public functions to be headerizered in src/packfile/packfile_private.h
- Move the listed functions into the new file
- #include "packfile_private.h" in src/packfile/api.c
- Replace all public (outside the src/packfile/ directory) uses of the function do_sub_pragmas with the function PackFile_fixup_subs
- Run headerizer, and verify that the new function prototypes are located in the proper locations.
- Build parrot and run all tests
- Open a pull request on github