module.c File Reference

Module Object Type. More...

#include "pm.h"

Go to the source code of this file.

Defines

#define __FILE_ID__   0x0E

Functions

PmReturn_t mod_new (pPmObj_t pco, pPmObj_t *pmod)
PmReturn_t mod_import (pPmObj_t pstr, pPmObj_t *pmod)


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

Definition at line 77 of file module.c.

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

Definition at line 32 of file module.c.


Generated on Mon Oct 18 07:40:49 2010 for Python-on-a-chip by  doxygen 1.5.9