rpm  5.4.15
Macros | Functions | Variables
rpmperl.c File Reference
#include "system.h"
#include <argv.h>
#include "rpmperl.h"
#include <rpmmacro.h>
#include "debug.h"
Include dependency graph for rpmperl.c:

Go to the source code of this file.

Macros

#define _RPMPERL_INTERNAL
 
#define my_perl   ((PerlInterpreter *)perl->I)
 

Functions

static void rpmperlFini (void *_perl)
 
static rpmperl rpmperlGetPool (rpmioPool pool)
 
static rpmperl rpmperlI (void)
 
rpmperl rpmperlNew (char **av, uint32_t flags)
 Create and load a perl interpreter. More...
 
rpmRC rpmperlRun (rpmperl perl, const char *str, const char **resultp)
 Execute perl string. More...
 

Variables

int _rpmperl_debug = 0
 
rpmperl _rpmperlI = NULL
 
rpmioPool _rpmperlPool
 

Macro Definition Documentation

#define _RPMPERL_INTERNAL

Definition at line 6 of file rpmperl.c.

#define my_perl   ((PerlInterpreter *)perl->I)

Definition at line 24 of file rpmperl.c.

Referenced by rpmperlFini(), rpmperlNew(), and rpmperlRun().

Function Documentation

static void rpmperlFini ( void *  _perl)
static

Definition at line 26 of file rpmperl.c.

References _rpmperlI, and my_perl.

Referenced by rpmperlGetPool().

static rpmperl rpmperlGetPool ( rpmioPool  pool)
static

Definition at line 46 of file rpmperl.c.

References _rpmperl_debug, _rpmperlPool, rpmioGetPool(), rpmioNewPool(), and rpmperlFini().

Referenced by rpmperlNew().

static rpmperl rpmperlI ( void  )
static

Definition at line 84 of file rpmperl.c.

References _rpmperlI, and rpmperlNew().

Referenced by rpmperlNew(), and rpmperlRun().

rpmperl rpmperlNew ( char **  av,
uint32_t  flags 
)

Create and load a perl interpreter.

Parameters
avperl interpreter args (or NULL)
flagsperl interpreter flags ((1<<31): use global interpreter)
Returns
new perl interpreter

Definition at line 93 of file rpmperl.c.

References _free(), argvAdd(), argvAppend(), argvCount(), argvFree(), environ, my_perl, rpmExpand(), rpmperlGetPool(), rpmperlI(), and rpmperlLink().

Referenced by expandMacro(), and rpmperlI().

rpmRC rpmperlRun ( rpmperl  perl,
const char *  str,
const char **  resultp 
)

Execute perl string.

Parameters
perlperl interpreter (NULL uses global interpreter)
strperl string to execute (NULL returns RPMRC_FAIL)
*resultpperl exec result
Returns
RPMRC_OK on success

Definition at line 144 of file rpmperl.c.

References _rpmperl_debug, my_perl, rpmperlI(), RPMRC_FAIL, RPMRC_OK, STRLEN, and TRUE.

Referenced by expandMacro().

Variable Documentation

int _rpmperl_debug = 0

Definition at line 19 of file rpmperl.c.

Referenced by rpmperlGetPool(), and rpmperlRun().

rpmperl _rpmperlI = NULL

Definition at line 22 of file rpmperl.c.

Referenced by rpmioClean(), rpmperlFini(), and rpmperlI().

rpmioPool _rpmperlPool

Definition at line 44 of file rpmperl.c.

Referenced by rpmioClean(), and rpmperlGetPool().