#include "tcl/makecmd.h"
#include "rutz/fileposition.h"
#include "rutz/debug.h"
Go to the source code of this file.
Namespaces | |
namespace | rutz |
namespace | tcl |
Classes | |
class | tcl::pkg |
Defines | |
#define | GVX_PKG_CREATE(pkg, interp, pkgname, pkgversion) |
This macro should go at the top of each *_Init() function. | |
#define | GVX_PKG_RETURN(pkg) |
This macro should go at the end of each *_Init() function. | |
#define | GVX_PKG_FINISH(pkg) |
Use this instead of GVX_PKG_RETURN(pkg) if more work needs to be done after the package is initialized. | |
Variables | |
const int | tcl::NO_EXPORT = 1 << 0 |
Definition in file pkg.h.
#define GVX_PKG_CREATE | ( | pkg, | |||
interp, | |||||
pkgname, | |||||
pkgversion | ) |
Value:
\ int GVX_PKG_STATUS = tcl::pkg::STATUS_ERR; \ { \ tcl::pkg* pkg = 0; \ \ try \ { pkg = tcl::pkg::create_in_macro(interp, pkgname, pkgversion); } \ catch (...) \ { return 1; } \ \ static bool recursive_initialization = false; \ GVX_ASSERT(!recursive_initialization); \ recursive_initialization = true; \ \ try \ {
Constructs a tcl::pkg
with a Tcl interpreter, package name, and package version. The version string should be in the form MM.mm where MM is major version, and mm is minor version. This constructor can also correctly parse a version string such as given by the RCS revision tag. If you're using svn, the suggested form is to choose a fixed major version number, and let the svn revision be the minor number, so you would pass a version string such as "4.$Revision: 10065 $".
#define GVX_PKG_FINISH | ( | pkg | ) |
Value:
} \ catch(...) \ { \ pkg->handle_live_exception(SRC_POS); \ } \ recursive_initialization = false; \ GVX_PKG_STATUS = pkg->finish_init(); \ }
#define GVX_PKG_RETURN | ( | pkg | ) |