Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
src/vm/module.h@0:14e5e829dffe, 2010-07-21 (annotated)
- Committer:
- dadaista
- Date:
- Wed Jul 21 12:50:41 2010 +0000
- Revision:
- 0:14e5e829dffe
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dadaista | 0:14e5e829dffe | 1 | /* |
dadaista | 0:14e5e829dffe | 2 | # This file is Copyright 2003, 2006, 2007, 2009 Dean Hall. |
dadaista | 0:14e5e829dffe | 3 | # |
dadaista | 0:14e5e829dffe | 4 | # This file is part of the PyMite VM. |
dadaista | 0:14e5e829dffe | 5 | # The PyMite VM is free software: you can redistribute it and/or modify |
dadaista | 0:14e5e829dffe | 6 | # it under the terms of the GNU GENERAL PUBLIC LICENSE Version 2. |
dadaista | 0:14e5e829dffe | 7 | # |
dadaista | 0:14e5e829dffe | 8 | # The PyMite VM is distributed in the hope that it will be useful, |
dadaista | 0:14e5e829dffe | 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
dadaista | 0:14e5e829dffe | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
dadaista | 0:14e5e829dffe | 11 | # A copy of the GNU GENERAL PUBLIC LICENSE Version 2 |
dadaista | 0:14e5e829dffe | 12 | # is seen in the file COPYING in this directory. |
dadaista | 0:14e5e829dffe | 13 | */ |
dadaista | 0:14e5e829dffe | 14 | |
dadaista | 0:14e5e829dffe | 15 | |
dadaista | 0:14e5e829dffe | 16 | #ifndef __MODULE_H__ |
dadaista | 0:14e5e829dffe | 17 | #define __MODULE_H__ |
dadaista | 0:14e5e829dffe | 18 | |
dadaista | 0:14e5e829dffe | 19 | |
dadaista | 0:14e5e829dffe | 20 | /** |
dadaista | 0:14e5e829dffe | 21 | * \file |
dadaista | 0:14e5e829dffe | 22 | * \brief Module Object Type |
dadaista | 0:14e5e829dffe | 23 | * |
dadaista | 0:14e5e829dffe | 24 | * Module object type header. |
dadaista | 0:14e5e829dffe | 25 | */ |
dadaista | 0:14e5e829dffe | 26 | |
dadaista | 0:14e5e829dffe | 27 | |
dadaista | 0:14e5e829dffe | 28 | /** |
dadaista | 0:14e5e829dffe | 29 | * Creates a Module Obj for the given Code Obj. |
dadaista | 0:14e5e829dffe | 30 | * |
dadaista | 0:14e5e829dffe | 31 | * Use a func struct to represent the Module obj because |
dadaista | 0:14e5e829dffe | 32 | * the module's construction code must execute later, |
dadaista | 0:14e5e829dffe | 33 | * but set the type to OBJ_TYPE_MOD so that it is |
dadaista | 0:14e5e829dffe | 34 | * not otherwise callable. |
dadaista | 0:14e5e829dffe | 35 | * |
dadaista | 0:14e5e829dffe | 36 | * @param pco Ptr to code obj |
dadaista | 0:14e5e829dffe | 37 | * @param pmod Return by reference; ptr to new module obj |
dadaista | 0:14e5e829dffe | 38 | * @return Return status |
dadaista | 0:14e5e829dffe | 39 | */ |
dadaista | 0:14e5e829dffe | 40 | PmReturn_t mod_new(pPmObj_t pco, pPmObj_t *pmod); |
dadaista | 0:14e5e829dffe | 41 | |
dadaista | 0:14e5e829dffe | 42 | /** |
dadaista | 0:14e5e829dffe | 43 | * Imports a module of the given name. |
dadaista | 0:14e5e829dffe | 44 | * Searches for an image with a matching name. |
dadaista | 0:14e5e829dffe | 45 | * A code obj is created for the code image. |
dadaista | 0:14e5e829dffe | 46 | * A module obj is created for the code obj. |
dadaista | 0:14e5e829dffe | 47 | * |
dadaista | 0:14e5e829dffe | 48 | * @param pstr String obj containing name of code obj to load. |
dadaista | 0:14e5e829dffe | 49 | * @param pmod Return by reference; ptr to imported module |
dadaista | 0:14e5e829dffe | 50 | * @return Return status |
dadaista | 0:14e5e829dffe | 51 | */ |
dadaista | 0:14e5e829dffe | 52 | PmReturn_t mod_import(pPmObj_t pstr, pPmObj_t *pmod); |
dadaista | 0:14e5e829dffe | 53 | |
dadaista | 0:14e5e829dffe | 54 | #endif /* __MODULE_H__ */ |