Create embedding API function to get a PMC Class object by name
completed by: Nagato Yuki
Task Description: Parrot is working on a new embedding API so that libparrot can be used from within other applications. This embedding API contains enough functionality to run existing embedding applications, but not enough to really utilize all the power of libparrot.
Classes in Parrot are objects themselves of type Class. We need an ability to look up a Class by name from the embedding API, similar to the get_class PIR opcode.
Write a new function Parrot_api_pmc_get_class() to get a class object using a lookup key PMC parameter. The new function should follow all conventions of the existing API functions. Ask for help if necessary.
Steps to Compete:
- Create a fork of parrot/parrot on Github
- Checkout the embed_api2 branch
- Create the new function Parrot_api_pmc_get_class() in src/embed/pmc.c. Follow existing examples for how to correctly write an API function
- Write a test for the new function in t/src/embed/pmc.c (create that file if it does not exist)
- Build parrot and run all tests to verify
- Open a pull request on github