rpm  5.4.15
Macros | Typedefs | Functions | Variables
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.

Macros

#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. More...
 
rpmtcl rpmtclLink (rpmtcl tcl)
 Reference a tcl interpreter instance. More...
 
rpmtcl rpmtclFree (rpmtcl tcl)
 Destroy a tcl interpreter. More...
 
rpmtcl rpmtclNew (char **av, uint32_t flags)
 Create and load a tcl interpreter. More...
 
rpmRC rpmtclRunFile (rpmtcl tcl, const char *fn, const char **resultp)
 Execute tcl from a file. More...
 
rpmRC rpmtclRun (rpmtcl tcl, const char *str, const char **resultp)
 Execute tcl string. More...
 

Variables

int _rpmtcl_debug
 
rpmtcl _rpmtclI
 

Macro Definition 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 179 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 160 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

int _rpmtcl_debug

Definition at line 14 of file rpmtcl.c.

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

rpmtcl _rpmtclI

Definition at line 17 of file rpmtcl.c.

Referenced by rpmioClean(), and rpmtclI().