rpm 5.3.7
|
#include "system.h"
#include <rpmiotypes.h>
#include <argv.h>
#include "rpmpython.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | _RPMIOB_INTERNAL |
#define | _RPMPYTHON_INTERNAL |
Functions | |
static void | rpmpythonFini (void *_python) |
static rpmpython | rpmpythonGetPool (rpmioPool pool) |
static rpmpython | rpmpythonI (void) |
rpmpython | rpmpythonNew (char **av, uint32_t flags) |
Create and load a python interpreter. | |
rpmRC | rpmpythonRunFile (rpmpython python, const char *fn, const char **resultp) |
Execute python from a file. | |
static const char * | rpmpythonSlurp (const char *arg) |
rpmRC | rpmpythonRun (rpmpython python, const char *str, const char **resultp) |
Execute python string. | |
Variables | |
int | _rpmpython_debug = 0 |
rpmpython | _rpmpythonI = NULL |
rpmioPool | _rpmpythonPool |
#define _RPMIOB_INTERNAL |
Definition at line 3 of file rpmpython.c.
#define _RPMPYTHON_INTERNAL |
Definition at line 7 of file rpmpython.c.
static void rpmpythonFini | ( | void * | _python | ) | [static] |
Definition at line 23 of file rpmpython.c.
Referenced by rpmpythonGetPool().
Definition at line 38 of file rpmpython.c.
References _rpmpython_debug, _rpmpythonPool, rpmioGetPool(), rpmioNewPool(), and rpmpythonFini().
Referenced by rpmpythonNew().
static rpmpython rpmpythonI | ( | void | ) | [static] |
Definition at line 62 of file rpmpython.c.
References _rpmpythonI, and rpmpythonNew().
Referenced by rpmpythonNew(), rpmpythonRun(), and rpmpythonRunFile().
rpmpython rpmpythonNew | ( | char ** | av, |
uint32_t | flags | ||
) |
Create and load a python interpreter.
fn | python interpreter args (or NULL) |
flags | python interpreter flags ((1<<31): use global interpreter) |
Definition at line 71 of file rpmpython.c.
References _rpmpython_debug, _rpmpythonI, argvCount(), rpmpythonGetPool(), rpmpythonI(), rpmpythonLink(), and rpmpythonRun().
Referenced by expandMacro(), and rpmpythonI().
Execute python string.
python | python interpreter (NULL uses global interpreter) |
str | python string to execute (NULL returns RPMRC_FAIL) |
*resultp | python exec result |
Definition at line 153 of file rpmpython.c.
References _free(), _rpmpython_debug, rpmpythonI(), rpmpythonSlurp(), RPMRC_FAIL, and RPMRC_OK.
Referenced by expandMacro(), and rpmpythonNew().
Execute python from a file.
python | python interpreter (NULL uses global interpreter) |
fn | python file to run (NULL returns RPMRC_FAIL) |
*resultp | python exec result |
Definition at line 103 of file rpmpython.c.
References _rpmpython_debug, rpmpythonI(), RPMRC_FAIL, and RPMRC_OK.
static const char* rpmpythonSlurp | ( | const char * | arg | ) | [static] |
Definition at line 129 of file rpmpython.c.
References rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobSlurp(), rpmiobStr(), Stat(), and xstrdup().
Referenced by rpmpythonRun().
int _rpmpython_debug = 0 |
Definition at line 18 of file rpmpython.c.
Referenced by rpmpythonGetPool(), rpmpythonNew(), rpmpythonRun(), and rpmpythonRunFile().
rpmpython _rpmpythonI = NULL |
Definition at line 21 of file rpmpython.c.
Referenced by rpmioClean(), rpmpythonI(), and rpmpythonNew().
Definition at line 36 of file rpmpython.c.
Referenced by rpmioClean(), and rpmpythonGetPool().