RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 18-Jan-2010 18:32:54 Branch: HEAD Handle: 2010011817325201 Modified files: rpm CHANGES rpm/rpmio macro.c rpmcudf.c rpmcudf.h rpmficl.c rpmficl.h rpmjs.c rpmjs.h rpmperl.c rpmperl.h rpmpython.c rpmpython.h rpmruby.c rpmruby.h rpmsquirrel.c rpmsquirrel.h rpmtcl.c rpmtcl.h Log: - reserve (1<<31) in all embedded interpreters to mark global. Summary: Revision Changes Path 1.3254 +1 -0 rpm/CHANGES 2.241 +1 -1 rpm/rpmio/macro.c 2.6 +6 -2 rpm/rpmio/rpmcudf.c 2.4 +2 -2 rpm/rpmio/rpmcudf.h 2.3 +14 -11 rpm/rpmio/rpmficl.c 2.4 +2 -2 rpm/rpmio/rpmficl.h 1.29 +50 -12 rpm/rpmio/rpmjs.c 1.7 +3 -2 rpm/rpmio/rpmjs.h 2.10 +15 -11 rpm/rpmio/rpmperl.c 2.7 +2 -2 rpm/rpmio/rpmperl.h 2.14 +4 -3 rpm/rpmio/rpmpython.c 2.8 +2 -2 rpm/rpmio/rpmpython.h 2.11 +16 -11 rpm/rpmio/rpmruby.c 2.6 +2 -2 rpm/rpmio/rpmruby.h 2.5 +16 -11 rpm/rpmio/rpmsquirrel.c 2.4 +2 -2 rpm/rpmio/rpmsquirrel.h 2.10 +15 -11 rpm/rpmio/rpmtcl.c 2.11 +2 -2 rpm/rpmio/rpmtcl.h ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3253 -r1.3254 CHANGES --- rpm/CHANGES 12 Jan 2010 14:40:20 -0000 1.3253 +++ rpm/CHANGES 18 Jan 2010 17:32:52 -0000 1.3254 @@ -1,5 +1,6 @@ 5.2b1 -> 5.3a1 + - jbj: reserve (1<<31) in all embedded interpreters to mark global. - jbj: gpsee: remove the --without-gpsee JS interpreter. - jbj: gpsee: use gpsee_{create,destroy}Interpreter() throughout RPM. - jbj: gpsee: convert the rest of the modules to use GPSEE module loading. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/macro.c ============================================================================ $ cvs diff -u -r2.240 -r2.241 macro.c --- rpm/rpmio/macro.c 14 Sep 2009 21:32:21 -0000 2.240 +++ rpm/rpmio/macro.c 18 Jan 2010 17:32:53 -0000 2.241 @@ -92,7 +92,7 @@ /*...@unchecked@*/ #if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_JS) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_SQUIRREL) || defined(WITH_TCL) -static int _globalI = 1; +static int _globalI = 0x80000000; #endif #if defined(__LCLINT__) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmcudf.c ============================================================================ $ cvs diff -u -r2.5 -r2.6 rpmcudf.c --- rpm/rpmio/rpmcudf.c 27 Dec 2009 13:55:30 -0000 2.5 +++ rpm/rpmio/rpmcudf.c 18 Jan 2010 17:32:53 -0000 2.6 @@ -484,9 +484,13 @@ } #endif -rpmcudf rpmcudfNew(const char ** av, int flags) +rpmcudf rpmcudfNew(const char ** av, uint32_t flags) { - rpmcudf cudf = rpmcudfGetPool(_rpmcudfPool); + rpmcudf cudf = +#ifdef NOTYET + (flags & 0x80000000) ? rpmcudfI() : +#endif + rpmcudfGetPool(_rpmcudfPool); const char * fn = (av ? av[0] : NULL); int typ = flags; static int oneshot = 0; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmcudf.h ============================================================================ $ cvs diff -u -r2.3 -r2.4 rpmcudf.h --- rpm/rpmio/rpmcudf.h 27 Dec 2009 13:55:30 -0000 2.3 +++ rpm/rpmio/rpmcudf.h 18 Jan 2010 17:32:53 -0000 2.4 @@ -155,11 +155,11 @@ /** * Create and load a cudf interpreter. * @param *av cudf interpreter args (or NULL) - * @param flags cudf interpreter flags (1 == use global interpreter) + * @param flags cudf interpreter flags ((1<<31) == use global interpreter) * @return new cudf interpreter */ /*...@newref@*/ /*...@null@*/ -rpmcudf rpmcudfNew(/*...@null@*/ const char ** av, int flags) +rpmcudf rpmcudfNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmficl.c ============================================================================ $ cvs diff -u -r2.2 -r2.3 rpmficl.c --- rpm/rpmio/rpmficl.c 17 Apr 2009 18:42:33 -0000 2.2 +++ rpm/rpmio/rpmficl.c 18 Jan 2010 17:32:53 -0000 2.3 @@ -62,10 +62,22 @@ return (rpmficl) rpmioGetPool(pool, sizeof(*ficl)); } -rpmficl rpmficlNew(const char ** av, int flags) +static rpmficl rpmficlI(void) + /*...@globals _rpmficlI @*/ + /*...@modifies _rpmficlI @*/ { - rpmficl ficl = rpmficlGetPool(_rpmficlPool); + if (_rpmficlI == NULL) + _rpmficlI = rpmficlNew(NULL, 0); + return _rpmficlI; +} +rpmficl rpmficlNew(const char ** av, uint32_t flags) +{ + rpmficl ficl = +#ifdef NOTYET + (flags & 0x80000000) ? rpmficlI() : +#endif + rpmficlGetPool(_rpmficlPool); #if defined(WITH_FICL) static const char * _av[] = { "rpmficl", NULL }; ficlSystemInformation fsi; @@ -108,15 +120,6 @@ return rpmficlLink(ficl); } -static rpmficl rpmficlI(void) - /*...@globals _rpmficlI @*/ - /*...@modifies _rpmficlI @*/ -{ - if (_rpmficlI == NULL) - _rpmficlI = rpmficlNew(NULL, 0); - return _rpmficlI; -} - rpmRC rpmficlRunFile(rpmficl ficl, const char * fn, const char ** resultp) { rpmRC rc = RPMRC_FAIL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmficl.h ============================================================================ $ cvs diff -u -r2.3 -r2.4 rpmficl.h --- rpm/rpmio/rpmficl.h 10 Dec 2009 18:47:58 -0000 2.3 +++ rpm/rpmio/rpmficl.h 18 Jan 2010 17:32:53 -0000 2.4 @@ -70,11 +70,11 @@ /** * Create and load a ficl interpreter. * @param av ficl interpreter args (or NULL) - * @param flags ficl interpreter flags (1 == use global interpreter) + * @param flags ficl interpreter flags ((1<<31) == use global interpreter) * @return new ficl interpreter */ /*...@newref@*/ /*...@null@*/ -rpmficl rpmficlNew(/*...@null@*/ const char ** av, int flags) +rpmficl rpmficlNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmjs.c ============================================================================ $ cvs diff -u -r1.28 -r1.29 rpmjs.c --- rpm/rpmio/rpmjs.c 17 Jan 2010 12:16:31 -0000 1.28 +++ rpm/rpmio/rpmjs.c 18 Jan 2010 17:32:53 -0000 1.29 @@ -2,6 +2,7 @@ #include "system.h" #include <argv.h> +#include <popt.h> #if defined(__APPLE__) #include <crt_externs.h> @@ -46,6 +47,39 @@ /*...@unchecked@*/ int _rpmjs_zeal = 2; +#ifdef NOTYET +struct poptOption rpmjsIPoptTable[] = { + { "allow", 'a', POPT_BIT_SET, &_js.flags, RPMJS_FLAGS_ALLOW, + N_("Allow (read-only) access to caller's environmen"), NULL }, + { "nocache", 'C', POPT_BIT_SET, &_js.flags, RPMJS_FLAGS_NOCACHE, + N_("Disables compiler caching via JSScript XDR serialization"), NULL }, + { "loadrc", 'R', POPT_BIT_SET, &_js.flags, RPMJS_FLAGS_LOADRC, + N_("Load RC file for interpreter based on script filename."), NULL }, + { "nowarn", 'W', POPT_BIT_SET, &_js.flags, RPMJS_FLAGS_NOWARN, + N_("Do not report warnings"), NULL }, + + { "norelimit", 'e', POPT_BIT_CLR, &_js.flags, RPMJS_FLAGS_RELIMIT, + N_("Do not limit regexps to n^3 levels of backtracking"), NULL }, + { "nojit", 'J', POPT_BIT_CLR, &_js.flags, RPMJS_FLAGS_JIT, + N_("Disable nanojit"), NULL }, + { "nostrict", 'S', POPT_BIT_CLR, &_js.flags, RPMJS_FLAGS_STRICT, + N_("Disable Strict mode"), NULL }, + { "noutf8", 'U', POPT_BIT_SET, &_js.flags, RPMJS_FLAGS_NOUTF8, + N_("Disable UTF-8 C string processing"), NULL }, + { "xml", 'x', POPT_BIT_SET, &_js.flags, RPMJS_FLAGS_XML, + N_("Parse <!-- comments --> as E4X tokens"), NULL }, + + { "anonfunfix", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &_js.flags, RPMJS_FLAGS_ANONFUNFIX, + N_("Parse //@line number [\"filename\"] for XUL"), NULL }, + { "atline", 'A', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &_js.flags, RPMJS_FLAGS_ATLINE, + N_("Parse //@line number [\"filename\"] for XUL"), NULL }, + { "werror", 'w', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &_js.flags, RPMJS_FLAGS_WERROR, + N_("Convert warnings to errors"), NULL }, + + POPT_TABLEEND +}; +#endif + static void rpmjsFini(void * _js) /*...@globals fileSystem @*/ /*...@modifies *_js, fileSystem @*/ @@ -78,9 +112,24 @@ return (rpmjs) rpmioGetPool(pool, sizeof(*js)); } +static rpmjs rpmjsI(void) + /*...@globals _rpmjsI @*/ + /*...@modifies _rpmjsI @*/ +{ + if (_rpmjsI == NULL) + _rpmjsI = rpmjsNew(NULL, 0); +if (_rpmjs_debug) +fprintf(stderr, "<== %s() _rpmjsI %p\n", __FUNCTION__, _rpmjsI); + return _rpmjsI; +} + rpmjs rpmjsNew(const char ** av, uint32_t flags) { - rpmjs js = rpmjsGetPool(_rpmjsPool); + rpmjs js = +#ifdef NOTYET + (flags & 0x80000000) ? rpmjsI() : +#endif + rpmjsGetPool(_rpmjsPool); JSI_t I = NULL; #if defined(WITH_GPSEE) @@ -117,17 +166,6 @@ return rpmjsLink(js); } -static rpmjs rpmjsI(void) - /*...@globals _rpmjsI @*/ - /*...@modifies _rpmjsI @*/ -{ - if (_rpmjsI == NULL) - _rpmjsI = rpmjsNew(NULL, 0); -if (_rpmjs_debug) -fprintf(stderr, "<== %s() _rpmjsI %p\n", __FUNCTION__, _rpmjsI); - return _rpmjsI; -} - rpmRC rpmjsRunFile(rpmjs js, const char * fn, const char ** resultp) { rpmRC rc = RPMRC_FAIL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmjs.h ============================================================================ $ cvs diff -u -r1.6 -r1.7 rpmjs.h --- rpm/rpmio/rpmjs.h 15 Jan 2010 05:06:33 -0000 1.6 +++ rpm/rpmio/rpmjs.h 18 Jan 2010 17:32:53 -0000 1.7 @@ -50,7 +50,8 @@ RPMJS_FLAGS_NOCACHE = (1<<20), /*!< -C */ RPMJS_FLAGS_NOWARN = (1<<21), /*!< -W */ RPMJS_FLAGS_ALLOW = (1<<22), /*!< -a */ - /* bits 23-31 unused */ + /* bits 23-30 unused */ + RPMJS_FLAGS_GLOBAL = (1<<31), }; struct rpmjs_s { @@ -105,7 +106,7 @@ /** * Create and load a js interpreter. * @param av js interpreter args (or NULL) - * @param flags js interpreter flags (0 uses default) + * @param flags js interpreter flags ((1<<31): use global interpreter) * @return new js interpreter */ /*...@newref@*/ /*...@null@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmperl.c ============================================================================ $ cvs diff -u -r2.9 -r2.10 rpmperl.c --- rpm/rpmio/rpmperl.c 16 Apr 2009 17:27:17 -0000 2.9 +++ rpm/rpmio/rpmperl.c 18 Jan 2010 17:32:53 -0000 2.10 @@ -80,9 +80,22 @@ "; #endif -rpmperl rpmperlNew(const char ** av, int flags) +static rpmperl rpmperlI(void) + /*...@globals _rpmperlI @*/ + /*...@modifies _rpmperlI @*/ +{ + if (_rpmperlI == NULL) + _rpmperlI = rpmperlNew(NULL, 0); + return _rpmperlI; +} + +rpmperl rpmperlNew(const char ** av, uint32_t flags) { - rpmperl perl = rpmperlGetPool(_rpmperlPool); + rpmperl perl = +#ifdef NOTYET + (flags & 0x80000000) ? rpmperlI() : +#endif + rpmperlGetPool(_rpmperlPool); #if defined(WITH_PERLEMBED) static const char * _av[] = { "rpmperl", NULL }; static int initialized = 0; @@ -121,15 +134,6 @@ return rpmperlLink(perl); } -static rpmperl rpmperlI(void) - /*...@globals _rpmperlI @*/ - /*...@modifies _rpmperlI @*/ -{ - if (_rpmperlI == NULL) - _rpmperlI = rpmperlNew(NULL, 0); - return _rpmperlI; -} - rpmRC rpmperlRun(rpmperl perl, const char * str, const char ** resultp) { rpmRC rc = RPMRC_FAIL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmperl.h ============================================================================ $ cvs diff -u -r2.6 -r2.7 rpmperl.h --- rpm/rpmio/rpmperl.h 10 Dec 2009 18:47:58 -0000 2.6 +++ rpm/rpmio/rpmperl.h 18 Jan 2010 17:32:53 -0000 2.7 @@ -68,11 +68,11 @@ /** * Create and load a perl interpreter. * @param av perl interpreter args (or NULL) - * @param flags perl interpreter flags (1 == use global interpreter) + * @param flags perl interpreter flags ((1<<31): use global interpreter) * @return new perl interpreter */ /*...@newref@*/ /*...@null@*/ -rpmperl rpmperlNew(/*...@null@*/ const char ** av, int flags) +rpmperl rpmperlNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmpython.c ============================================================================ $ cvs diff -u -r2.13 -r2.14 rpmpython.c --- rpm/rpmio/rpmpython.c 1 Jun 2009 13:21:45 -0000 2.13 +++ rpm/rpmio/rpmpython.c 18 Jan 2010 17:32:53 -0000 2.14 @@ -68,13 +68,14 @@ return _rpmpythonI; } -rpmpython rpmpythonNew(const char ** av, int flags) +rpmpython rpmpythonNew(const char ** av, uint32_t flags) { static const char * _av[] = { "rpmpython", NULL }; #if defined(WITH_PYTHONEMBED) - int initialize = (!flags || _rpmpythonI == NULL); + int initialize = (!(flags & 0x80000000) || _rpmpythonI == NULL); #endif - rpmpython python = (flags ? rpmpythonI() : rpmpythonGetPool(_rpmpythonPool)); + rpmpython python = (flags & 0x80000000) + ? rpmpythonI() : rpmpythonGetPool(_rpmpythonPool); if (_rpmpython_debug) fprintf(stderr, "==> %s(%p, %d) python %p\n", __FUNCTION__, av, flags, python); @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmpython.h ============================================================================ $ cvs diff -u -r2.7 -r2.8 rpmpython.h --- rpm/rpmio/rpmpython.h 10 Dec 2009 18:47:58 -0000 2.7 +++ rpm/rpmio/rpmpython.h 18 Jan 2010 17:32:53 -0000 2.8 @@ -68,11 +68,11 @@ /** * Create and load a python interpreter. * @param fn python interpreter args (or NULL) - * @param flags python interpreter flags (1 == use global interpreter) + * @param flags python interpreter flags ((1<<31): use global interpreter) * @return new python interpreter */ /*...@newref@*/ /*...@null@*/ -rpmpython rpmpythonNew(/*...@null@*/ const char ** av, int flags) +rpmpython rpmpythonNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmruby.c ============================================================================ $ cvs diff -u -r2.10 -r2.11 rpmruby.c --- rpm/rpmio/rpmruby.c 10 May 2009 15:31:09 -0000 2.10 +++ rpm/rpmio/rpmruby.c 18 Jan 2010 17:32:53 -0000 2.11 @@ -64,10 +64,24 @@ "; #endif -rpmruby rpmrubyNew(const char ** av, int flags) +static rpmruby rpmrubyI(void) + /*...@globals _rpmrubyI @*/ + /*...@modifies _rpmrubyI @*/ +{ + if (_rpmrubyI == NULL) + _rpmrubyI = rpmrubyNew(NULL, 0); + return _rpmrubyI; +} + +rpmruby rpmrubyNew(const char ** av, uint32_t flags) { + rpmruby ruby = +#ifdef NOTYET + (flags & 0x80000000) ? rpmrubyI() : +#endif + rpmrubyGetPool(_rpmrubyPool); + static const char * _av[] = { "rpmruby", NULL }; - rpmruby ruby = rpmrubyGetPool(_rpmrubyPool); if (av == NULL) av = _av; @@ -83,15 +97,6 @@ return rpmrubyLink(ruby); } -static rpmruby rpmrubyI(void) - /*...@globals _rpmrubyI @*/ - /*...@modifies _rpmrubyI @*/ -{ - if (_rpmrubyI == NULL) - _rpmrubyI = rpmrubyNew(NULL, 0); - return _rpmrubyI; -} - rpmRC rpmrubyRunFile(rpmruby ruby, const char * fn, const char ** resultp) { rpmRC rc = RPMRC_FAIL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmruby.h ============================================================================ $ cvs diff -u -r2.5 -r2.6 rpmruby.h --- rpm/rpmio/rpmruby.h 10 Dec 2009 18:47:58 -0000 2.5 +++ rpm/rpmio/rpmruby.h 18 Jan 2010 17:32:53 -0000 2.6 @@ -69,11 +69,11 @@ /** * Create and load a ruby interpreter. * @param av ruby interpreter args (or NULL) - * @param flags ruby interpreter flags (1 == use global interpreter) + * @param flags ruby interpreter flags ((1<<31): use global interpreter) * @return new ruby interpreter */ /*...@newref@*/ /*...@null@*/ -rpmruby rpmrubyNew(/*...@null@*/ const char ** av, int flags) +rpmruby rpmrubyNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsquirrel.c ============================================================================ $ cvs diff -u -r2.4 -r2.5 rpmsquirrel.c --- rpm/rpmio/rpmsquirrel.c 20 Aug 2009 15:55:59 -0000 2.4 +++ rpm/rpmio/rpmsquirrel.c 18 Jan 2010 17:32:53 -0000 2.5 @@ -74,9 +74,23 @@ } #endif -rpmsquirrel rpmsquirrelNew(const char ** av, int flags) +/* XXX FIXME: honor 0x8000000 in flags to use global interpreter */ +static rpmsquirrel rpmsquirrelI(void) + /*...@globals _rpmsquirrelI @*/ + /*...@modifies _rpmsquirrelI @*/ +{ + if (_rpmsquirrelI == NULL) + _rpmsquirrelI = rpmsquirrelNew(NULL, 0); + return _rpmsquirrelI; +} + +rpmsquirrel rpmsquirrelNew(const char ** av, uint32_t flags) { - rpmsquirrel squirrel = rpmsquirrelGetPool(_rpmsquirrelPool); + rpmsquirrel squirrel = +#ifdef NOTYET + (flags & 0x80000000) ? rpmsquirrelI() : +#endif + rpmsquirrelGetPool(_rpmsquirrelPool); #if defined(WITH_SQUIRREL) static const char * _av[] = { "rpmsquirrel", NULL }; @@ -110,15 +124,6 @@ return rpmsquirrelLink(squirrel); } -static rpmsquirrel rpmsquirrelI(void) - /*...@globals _rpmsquirrelI @*/ - /*...@modifies _rpmsquirrelI @*/ -{ - if (_rpmsquirrelI == NULL) - _rpmsquirrelI = rpmsquirrelNew(NULL, 0); - return _rpmsquirrelI; -} - rpmRC rpmsquirrelRunFile(rpmsquirrel squirrel, const char * fn, const char ** resultp) { rpmRC rc = RPMRC_FAIL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsquirrel.h ============================================================================ $ cvs diff -u -r2.3 -r2.4 rpmsquirrel.h --- rpm/rpmio/rpmsquirrel.h 15 Jun 2009 20:42:03 -0000 2.3 +++ rpm/rpmio/rpmsquirrel.h 18 Jan 2010 17:32:53 -0000 2.4 @@ -69,11 +69,11 @@ /** * Create and load a squirrel interpreter. * @param av squirrel interpreter args (or NULL) - * @param flags squirrel interpreter flags (1 == use global interpreter) + * @param flags squirrel interpreter flags ((1<<31): use global interpreter) * @return new squirrel interpreter */ /*...@newref@*/ /*...@null@*/ -rpmsquirrel rpmsquirrelNew(/*...@null@*/ const char ** av, int flags) +rpmsquirrel rpmsquirrelNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmtcl.c ============================================================================ $ cvs diff -u -r2.9 -r2.10 rpmtcl.c --- rpm/rpmio/rpmtcl.c 16 Apr 2009 18:28:32 -0000 2.9 +++ rpm/rpmio/rpmtcl.c 18 Jan 2010 17:32:53 -0000 2.10 @@ -111,9 +111,22 @@ }; #endif -rpmtcl rpmtclNew(const char ** av, int flags) +static rpmtcl rpmtclI(void) + /*...@globals _rpmtclI @*/ + /*...@modifies _rpmtclI @*/ +{ + if (_rpmtclI == NULL) + _rpmtclI = rpmtclNew(NULL, 0); + return _rpmtclI; +} + +rpmtcl rpmtclNew(const char ** av, uint32_t flags) { - rpmtcl tcl = rpmtclGetPool(_rpmtclPool); + rpmtcl tcl = +#ifdef NOTYET + (flags & 0x80000000) ? rpmtclI() : +#endif + rpmtclGetPool(_rpmtclPool); #if defined(WITH_TCL) static const char * _av[] = { "rpmtcl", NULL }; @@ -140,15 +153,6 @@ return rpmtclLink(tcl); } -static rpmtcl rpmtclI(void) - /*...@globals _rpmtclI @*/ - /*...@modifies _rpmtclI @*/ -{ - if (_rpmtclI == NULL) - _rpmtclI = rpmtclNew(NULL, 0); - return _rpmtclI; -} - rpmRC rpmtclRunFile(rpmtcl tcl, const char * fn, const char ** resultp) { rpmRC rc = RPMRC_FAIL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmtcl.h ============================================================================ $ cvs diff -u -r2.10 -r2.11 rpmtcl.h --- rpm/rpmio/rpmtcl.h 10 Dec 2009 18:47:58 -0000 2.10 +++ rpm/rpmio/rpmtcl.h 18 Jan 2010 17:32:53 -0000 2.11 @@ -70,11 +70,11 @@ /** * Create and load a tcl interpreter. * @param av tcl interpreter args (or NULL) - * @param flags tcl interpreter flags (1 == use global interpreter) + * @param flags tcl interpreter flags ((1<<31): use global interpreter) * @return new tcl interpreter */ /*...@newref@*/ /*...@null@*/ -rpmtcl rpmtclNew(/*...@null@*/ const char ** av, int flags) +rpmtcl rpmtclNew(/*...@null@*/ const char ** av, uint32_t flags) /*...@globals fileSystem, internalState @*/ /*...@modifies fileSystem, internalState @*/; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org