rpm 5.3.12
Defines | Typedefs | Functions | Variables
rpmio/rpmjs.h File Reference
#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.

Defines

#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.
rpmjs rpmjsLink (rpmjs js)
 Reference a js interpreter instance.
rpmjs rpmjsFree (rpmjs js)
 Destroy a js interpreter.
rpmjs rpmjsNew (char **av, uint32_t flags)
 Create and load a js interpreter.
rpmRC rpmjsRunFile (rpmjs js, const char *fn, char *const *Iargv, const char **resultp)
 Execute js from a file.
rpmRC rpmjsRun (rpmjs js, const char *str, const char **resultp)
 Execute js string.

Variables

int _rpmjs_debug
rpmjs _rpmjsI
uint32_t _rpmjs_options
int _rpmjs_zeal

Detailed Description

Definition in file rpmjs.h.


Define 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 expandMacro(), rpmcliFini(), and rpmioClean().

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 162 of file rpmjs.c.

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

Referenced by expandMacro(), and rpmjsI().

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 383 of file rpmjs.c.

References _rpmjs_debug, rpmjsI(), RPMRC_FAIL, and RPMRC_OK.

Referenced by expandMacro().

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 300 of file rpmjs.c.

References _rpmjs_debug, environ, F_ISSET, 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

Definition at line 70 of file rpmjs.c.

Referenced by rpmjsFini(), rpmjsGetPool(), rpmjsI(), rpmjsRun(), and rpmjsRunFile().

uint32_t _rpmjs_options

Definition at line 76 of file rpmjs.c.

Referenced by rpmjsNew().

Definition at line 79 of file rpmjs.c.

Referenced by rpmjsNew().

Definition at line 73 of file rpmjs.c.

Referenced by rpmcliFini(), rpmioClean(), and rpmjsI().