python-on-a-chip online compiler
module.c File Reference
Module Object Type. More...
Go to the source code of this file.
Functions | |
PmReturn_t | mod_new (pPmObj_t pco, pPmObj_t *pmod) |
Creates a Module Obj for the given Code Obj. | |
PmReturn_t | mod_import (pPmObj_t pstr, pPmObj_t *pmod) |
Imports a module of the given name. |
Detailed Description
Module Object Type.
Module object type operations.
Definition in file module.c.
Function Documentation
PmReturn_t mod_import | ( | pPmObj_t | pstr, |
pPmObj_t * | pmod | ||
) |
Imports a module of the given name.
Searches for an image with a matching name. A code obj is created for the code image. A module obj is created for the code obj.
- Parameters:
-
pstr String obj containing name of code obj to load. pmod Return by reference; ptr to imported module
- Returns:
- Return status
PmReturn_t mod_new | ( | pPmObj_t | pco, |
pPmObj_t * | pmod | ||
) |
Creates a Module Obj for the given Code Obj.
Use a func struct to represent the Module obj because the module's construction code must execute later, but set the type to OBJ_TYPE_MOD so that it is not otherwise callable.
- Parameters:
-
pco Ptr to code obj pmod Return by reference; ptr to new module obj
- Returns:
- Return status
Generated on Tue Jul 12 2022 23:13:47 by 1.7.2