Add return code to rpmPushMacro() and rpmPopMacro()
These haven't been in any public release yet so there's time to fiddle with stuff like this. Both always succeed currently so no change in that respect but it's better to have room for expansion...
This commit is contained in:
parent
6988799d0f
commit
f95825ef1b
|
@ -1513,19 +1513,21 @@ rpmDumpMacroTable(rpmMacroContext mc, FILE * fp)
|
||||||
rpmmctxRelease(mc);
|
rpmmctxRelease(mc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rpmPushMacro(rpmMacroContext mc,
|
int rpmPushMacro(rpmMacroContext mc,
|
||||||
const char * n, const char * o, const char * b, int level)
|
const char * n, const char * o, const char * b, int level)
|
||||||
{
|
{
|
||||||
mc = rpmmctxAcquire(mc);
|
mc = rpmmctxAcquire(mc);
|
||||||
pushMacro(mc, n, o, b, level, ME_NONE);
|
pushMacro(mc, n, o, b, level, ME_NONE);
|
||||||
rpmmctxRelease(mc);
|
rpmmctxRelease(mc);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rpmPopMacro(rpmMacroContext mc, const char * n)
|
int rpmPopMacro(rpmMacroContext mc, const char * n)
|
||||||
{
|
{
|
||||||
mc = rpmmctxAcquire(mc);
|
mc = rpmmctxAcquire(mc);
|
||||||
popMacro(mc, n);
|
popMacro(mc, n);
|
||||||
rpmmctxRelease(mc);
|
rpmmctxRelease(mc);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -75,8 +75,9 @@ int rpmExpandMacros (rpmMacroContext mc, const char * sbuf,
|
||||||
* @param o macro paramaters
|
* @param o macro paramaters
|
||||||
* @param b macro body
|
* @param b macro body
|
||||||
* @param level macro recursion level (0 is entry API)
|
* @param level macro recursion level (0 is entry API)
|
||||||
|
* @return 0 on success
|
||||||
*/
|
*/
|
||||||
void rpmPushMacro (rpmMacroContext mc, const char * n,
|
int rpmPushMacro (rpmMacroContext mc, const char * n,
|
||||||
const char * o,
|
const char * o,
|
||||||
const char * b, int level);
|
const char * b, int level);
|
||||||
|
|
||||||
|
@ -84,8 +85,9 @@ void rpmPushMacro (rpmMacroContext mc, const char * n,
|
||||||
* Pop macro from context.
|
* Pop macro from context.
|
||||||
* @param mc macro context (NULL uses global context).
|
* @param mc macro context (NULL uses global context).
|
||||||
* @param n macro name
|
* @param n macro name
|
||||||
|
* @return 0 on success
|
||||||
*/
|
*/
|
||||||
void rpmPopMacro (rpmMacroContext mc, const char * n);
|
int rpmPopMacro (rpmMacroContext mc, const char * n);
|
||||||
|
|
||||||
/** \ingroup rpmmacro
|
/** \ingroup rpmmacro
|
||||||
* Define macro in context.
|
* Define macro in context.
|
||||||
|
|
Loading…
Reference in New Issue