rpm  5.4.14
Macros | Typedefs | Functions | Variables
#include <rpmiotypes.h>
#include <rpmio.h>
Include dependency graph for rpmjs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define rpmjsUnlink(_js)   ((rpmjs)rpmioUnlinkPoolItem((rpmioItem)(_js), __FUNCTION__, __FILE__, __LINE__))
 
#define rpmjsLink(_js)   ((rpmjs)rpmioLinkPoolItem((rpmioItem)(_js), __FUNCTION__, __FILE__, __LINE__))
 
#define rpmjsFree(_js)   ((rpmjs)rpmioFreePoolItem((rpmioItem)(_js), __FUNCTION__, __FILE__, __LINE__))
 

Typedefs

typedef struct rpmjs_s * rpmjs
 

Functions

rpmjs rpmjsUnlink (rpmjs js)
 Unreference a js interpreter instance. More...
 
rpmjs rpmjsLink (rpmjs js)
 Reference a js interpreter instance. More...
 
rpmjs rpmjsFree (rpmjs js)
 Destroy a js interpreter. More...
 
rpmjs rpmjsNew (char **av, uint32_t flags)
 Create and load a js interpreter. More...
 
rpmRC rpmjsRunFile (rpmjs js, const char *fn, char *const *Iargv, const char **resultp)
 Execute js from a file. More...
 
rpmRC rpmjsRun (rpmjs js, const char *str, const char **resultp)
 Execute js string. More...
 

Variables

int _rpmjs_debug
 
rpmjs _rpmjsI
 
uint32_t _rpmjs_options
 
int _rpmjs_zeal
 

Macro Definition Documentation

#define rpmjsFree (   _js)    ((rpmjs)rpmioFreePoolItem((rpmioItem)(_js), __FUNCTION__, __FILE__, __LINE__))

Definition at line 107 of file rpmjs.h.

#define rpmjsLink (   _js)    ((rpmjs)rpmioLinkPoolItem((rpmioItem)(_js), __FUNCTION__, __FILE__, __LINE__))

Definition at line 95 of file rpmjs.h.

#define rpmjsUnlink (   _js)    ((rpmjs)rpmioUnlinkPoolItem((rpmioItem)(_js), __FUNCTION__, __FILE__, __LINE__))

Definition at line 84 of file rpmjs.h.

Typedef Documentation

typedef struct rpmjs_s* rpmjs

Definition at line 11 of file rpmjs.h.

Function Documentation

rpmjs rpmjsFree ( rpmjs  js)

Destroy a js interpreter.

Parameters
jsjs interpreter
Returns
NULL on last dereference

Referenced by rpmioClean(), and while().

rpmjs rpmjsLink ( rpmjs  js)

Reference a js interpreter instance.

Parameters
jsjs interpreter
Returns
new js interpreter reference

Referenced by rpmjsNew().

rpmjs rpmjsNew ( char **  av,
uint32_t  flags 
)

Create and load a js interpreter.

Parameters
avjs interpreter args (or NULL)
flagsjs interpreter flags ((1<<31): use global interpreter)
Returns
new js interpreter

Definition at line 171 of file rpmjs.c.

References _rpmjs_options, _rpmjs_zeal, F_ISSET, flags, getenv(), NULL, rpmjsGetPool(), rpmjsI(), and rpmjsLink().

Referenced by rpmjsI(), and while().

rpmRC rpmjsRun ( rpmjs  js,
const char *  str,
const char **  resultp 
)

Execute js string.

Parameters
jsjs interpreter (NULL uses global interpreter)
strjs string to execute (NULL returns RPMRC_FAIL)
*resultpjs exec result
Returns
RPMRC_OK on success

Definition at line 410 of file rpmjs.c.

References DBG, exit, ns, NULL, rc, rpmjsI(), RPMRC_FAIL, RPMRC_OK, s, and xmalloc.

Referenced by while().

rpmRC rpmjsRunFile ( rpmjs  js,
const char *  fn,
char *const *  Iargv,
const char **  resultp 
)

Execute js from a file.

Parameters
jsjs interpreter (NULL uses global interpreter)
fnjs file to run (NULL returns RPMRC_FAIL)
Iargvjs script argv
*resultpjs exec result
Returns
RPMRC_OK on success

Definition at line 317 of file rpmjs.c.

References DBG, environ, exit, F_ISSET, NULL, rc, rpmjsI(), RPMRC_FAIL, and RPMRC_OK.

rpmjs rpmjsUnlink ( rpmjs  js)

Unreference a js interpreter instance.

Parameters
jsjs interpreter
Returns
NULL on last dereference

Variable Documentation

int _rpmjs_debug

Definition at line 74 of file rpmjs.c.

Referenced by rpmjsGetPool().

uint32_t _rpmjs_options

Definition at line 83 of file rpmjs.c.

Referenced by rpmjsNew().

int _rpmjs_zeal

Definition at line 86 of file rpmjs.c.

Referenced by rpmjsNew().

rpmjs _rpmjsI

Definition at line 551 of file poptALL.c.

Referenced by rpmioClean(), and rpmjsI().