GSoC/GCI Archive
Google Code-in 2010 Parrot Foundation and The Perl Foundation

Write a function to serialize a PMC

completed by: David Czech

mentors: whiteknight

Task Description: Parrot's new embedding API is a work in progress. It contains several functions, but not enough for all uses. Parrot's PMCs can be serialized to an array of bytes, and later deserialized back into a usable PMC. Parrot's embedding API has functions to deserialize a PMC, but not a function to serialize them.

Write a function Parrot_api_pmc_serialize that takes a PMC and returns a STRING representation of a serialized PMC. Create this function in src/embed/pmc.c. Make sure to properly document this function.

Steps to Complete:

  1. Create a fork of parrot/parrot on github
  2. Write the new function Parrot_api_pmc_serialize in src/embed/pmc.c, including documentation.
  3. Write a test for the new function in t/src/embed/pmc.t
  4. Build parrot and run all tests to verify
  5. open a pull request on github.