2 # This file is Copyright 2003, 2006, 2007, 2009, 2010 Dean Hall.
4 # This file is part of the PyMite VM.
5 # The PyMite VM is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU GENERAL PUBLIC LICENSE Version 2.
8 # The PyMite VM is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 # A copy of the GNU GENERAL PUBLIC LICENSE Version 2
12 # is seen in the file COPYING in this directory.
22 * \brief Module Object Type
24 * Module object type header.
29 * Creates a Module Obj for the given Code Obj.
31 * Use a func struct to represent the Module obj because
32 * the module's construction code must execute later,
33 * but set the type to OBJ_TYPE_MOD so that it is
34 * not otherwise callable.
36 * @param pco Ptr to code obj
37 * @param pmod Return by reference; ptr to new module obj
38 * @return Return status
40 PmReturn_t
mod_new(pPmObj_t pco
, pPmObj_t
*pmod
);
43 * Imports a module of the given name.
44 * Searches for an image with a matching name.
45 * A code obj is created for the code image.
46 * A module obj is created for the code obj.
48 * @param pstr String obj containing name of code obj to load.
49 * @param pmod Return by reference; ptr to imported module
50 * @return Return status
52 PmReturn_t
mod_import(pPmObj_t pstr
, pPmObj_t
*pmod
);
54 #endif /* __MODULE_H__ */