global.c File Reference

VM Globals. More...

#include "pm.h"

Defines

#define __FILE_ID__   0x05

Functions

PmReturn_t global_init (void)
PmReturn_t global_setBuiltins (pPmFunc_t pmod)
PmReturn_t global_loadBuiltins (void)

Variables

unsigned char const * stdlib_img
volatile PmVmGlobal_t gVmGlobal


Detailed Description

VM Globals.

VM globals operations. PyMite's global struct def and initial values.


Function Documentation

PmReturn_t global_init ( void   ) 

Initializes the global struct

Returns:
Return status

PmReturn_t global_loadBuiltins ( void   ) 

Loads the "__bt" module and sets the builtins dict (PM_PBUILTINS) to point to __bt's attributes dict. Creates "None" = None entry in builtins.

When run, there should not be any other threads in the interpreter thread list yet.

Returns:
Return status

PmReturn_t global_setBuiltins ( pPmFunc_t  pmod  ) 

Sets the builtins dict into the given module's attrs.

If not yet done, loads the "__bt" module via global_loadBuiltins(). Restrictions described in that functions documentation apply.

Parameters:
pmod Module whose attrs receive builtins
Returns:
Return status


Variable Documentation

Most PyMite globals all in one convenient place

unsigned char const* stdlib_img

PyMite library image file.

Automatically created from: utco.py img-list-terminator by pmImgCreator.py on Wed Jan 6 14:20:08 2010.

Byte count: 260

Selected memspace type: RAM

DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST.


Generated on Wed Feb 24 13:37:02 2010 for Python-on-a-chip by  doxygen 1.5.9