rpm 5.3.7
Defines | Typedefs | Functions | Variables

rpmio/rpmtcl.h File Reference

#include <rpmiotypes.h>
#include <rpmio.h>
Include dependency graph for rpmtcl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define rpmtclUnlink(_tcl)   ((rpmtcl)rpmioUnlinkPoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))
#define rpmtclLink(_tcl)   ((rpmtcl)rpmioLinkPoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))
#define rpmtclFree(_tcl)   ((rpmtcl)rpmioFreePoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))

Typedefs

typedef struct rpmtcl_s * rpmtcl

Functions

rpmtcl rpmtclUnlink (rpmtcl tcl)
 Unreference a tcl interpreter instance.
rpmtcl rpmtclLink (rpmtcl tcl)
 Reference a tcl interpreter instance.
rpmtcl rpmtclFree (rpmtcl tcl)
 Destroy a tcl interpreter.
rpmtcl rpmtclNew (char **av, uint32_t flags)
 Create and load a tcl interpreter.
rpmRC rpmtclRunFile (rpmtcl tcl, const char *fn, const char **resultp)
 Execute tcl from a file.
rpmRC rpmtclRun (rpmtcl tcl, const char *str, const char **resultp)
 Execute tcl string.

Variables

int _rpmtcl_debug
rpmtcl _rpmtclI

Detailed Description

Definition in file rpmtcl.h.


Define Documentation

#define rpmtclFree (   _tcl)    ((rpmtcl)rpmioFreePoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))

Definition at line 67 of file rpmtcl.h.

#define rpmtclLink (   _tcl)    ((rpmtcl)rpmioLinkPoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))

Definition at line 55 of file rpmtcl.h.

#define rpmtclUnlink (   _tcl)    ((rpmtcl)rpmioUnlinkPoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))

Definition at line 44 of file rpmtcl.h.


Typedef Documentation

typedef struct rpmtcl_s* rpmtcl

Definition at line 11 of file rpmtcl.h.


Function Documentation

rpmtcl rpmtclFree ( rpmtcl  tcl)

Destroy a tcl interpreter.

Parameters:
tcltcl interpreter
Returns:
NULL on last dereference

Referenced by expandMacro(), and rpmioClean().

rpmtcl rpmtclLink ( rpmtcl  tcl)

Reference a tcl interpreter instance.

Parameters:
tcltcl interpreter
Returns:
new tcl interpreter reference

Referenced by rpmtclNew().

rpmtcl rpmtclNew ( char **  av,
uint32_t  flags 
)

Create and load a tcl interpreter.

Parameters:
avtcl interpreter args (or NULL)
flagstcl interpreter flags ((1<<31): use global interpreter)
Returns:
new tcl interpreter

Definition at line 125 of file rpmtcl.c.

References argvCount(), rpmiobNew(), rpmtclGetPool(), rpmtclI(), and rpmtclLink().

Referenced by expandMacro(), and rpmtclI().

rpmRC rpmtclRun ( rpmtcl  tcl,
const char *  str,
const char **  resultp 
)

Execute tcl string.

Parameters:
tcltcl interpreter (NULL uses global interpreter)
strtcl string to execute (NULL returns RPMRC_FAIL)
*resultptcl exec result
Returns:
RPMRC_OK on success

Definition at line 177 of file rpmtcl.c.

References _rpmtcl_debug, rpmiobStr(), RPMRC_FAIL, RPMRC_OK, and rpmtclI().

Referenced by expandMacro().

rpmRC rpmtclRunFile ( rpmtcl  tcl,
const char *  fn,
const char **  resultp 
)

Execute tcl from a file.

Parameters:
tcltcl interpreter (NULL uses global interpreter)
fntcl file to run (NULL returns RPMRC_FAIL)
*resultptcl exec result
Returns:
RPMRC_OK on success

Definition at line 158 of file rpmtcl.c.

References _rpmtcl_debug, rpmiobStr(), RPMRC_FAIL, RPMRC_OK, and rpmtclI().

rpmtcl rpmtclUnlink ( rpmtcl  tcl)

Unreference a tcl interpreter instance.

Parameters:
tcltcl interpreter
Returns:
NULL on last dereference

Variable Documentation

Definition at line 14 of file rpmtcl.c.

Referenced by rpmtclGetPool(), rpmtclRun(), and rpmtclRunFile().

Definition at line 17 of file rpmtcl.c.

Referenced by rpmioClean(), and rpmtclI().