rpm  5.4.10
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

§ rpmtclFree

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

Definition at line 67 of file rpmtcl.h.

§ rpmtclLink

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

Definition at line 55 of file rpmtcl.h.

§ rpmtclUnlink

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

Definition at line 44 of file rpmtcl.h.

Typedef Documentation

§ rpmtcl

typedef struct rpmtcl_s* rpmtcl

Definition at line 11 of file rpmtcl.h.

Function Documentation

§ rpmtclFree()

rpmtcl rpmtclFree ( rpmtcl  tcl)

Destroy a tcl interpreter.

Parameters
tcltcl interpreter
Returns
NULL on last dereference

Referenced by expandMacro(), psmWait(), and rpmioClean().

§ rpmtclLink()

rpmtcl rpmtclLink ( rpmtcl  tcl)

Reference a tcl interpreter instance.

Parameters
tcltcl interpreter
Returns
new tcl interpreter reference

Referenced by rpmtclNew().

§ 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 165 of file rpmtcl.c.

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

Referenced by expandMacro(), psmWait(), and rpmtclI().

§ rpmtclRun()

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 225 of file rpmtcl.c.

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

Referenced by expandMacro(), and psmWait().

§ rpmtclRunFile()

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 203 of file rpmtcl.c.

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

§ rpmtclUnlink()

rpmtcl rpmtclUnlink ( rpmtcl  tcl)

Unreference a tcl interpreter instance.

Parameters
tcltcl interpreter
Returns
NULL on last dereference

Variable Documentation

§ _rpmtcl_debug

int _rpmtcl_debug

Definition at line 21 of file rpmtcl.c.

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

§ _rpmtclI

rpmtcl _rpmtclI

Definition at line 24 of file rpmtcl.c.

Referenced by rpmioClean(), and rpmtclI().