RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
  Module: rpm                              Date:   02-Apr-2011 04:01:53
  Branch: HEAD                             Handle: 2011040202015300

  Modified files:
    rpm                     CHANGES configure.ac
    rpm/js                  Makefile.am rpmaug-js.c

  Log:
    rpmjs: port to SpiderMonkey 1.8.5 API.

  Summary:
    Revision    Changes     Path
    1.3594      +1  -0      rpm/CHANGES
    2.483       +4  -4      rpm/configure.ac
    1.45        +1  -1      rpm/js/Makefile.am
    1.12        +22 -16     rpm/js/rpmaug-js.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3593 -r1.3594 CHANGES
  --- rpm/CHANGES       1 Apr 2011 09:51:45 -0000       1.3593
  +++ rpm/CHANGES       2 Apr 2011 02:01:53 -0000       1.3594
  @@ -1,4 +1,5 @@
   5.4.0 -> 5.4.1:
  +    - proyvind: rpmjs: port to SpiderMonkey 1.8.5 API.
       - proyvind: mandriva: filter overlapping depencies.
       - proyvind: rubygems.rb: add/provide ruby(abi) dependencies for non-gems.
       - proyvind: rpmfc: add classifiers for gstreamer plugins & dep generator.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.482 -r2.483 configure.ac
  --- rpm/configure.ac  1 Apr 2011 05:11:52 -0000       2.482
  +++ rpm/configure.ac  2 Apr 2011 02:01:53 -0000       2.483
  @@ -1609,12 +1609,12 @@
   WITH_JS_SUBDIR=""
   WITH_SPIDERMONKEY_SUBDIR=""
   RPM_CHECK_LIB(
  -    [JavaScript], [js],
  -    [js], [JS_NewContext], [jsapi.h],
  -    [no,internal:external:none], [js:src:src],
  +    [JavaScript], [mozjs185],
  +    [mozjs185], [JS_NewContext], [jsapi.h],
  +    [no,internal:external:none], [mozjs185:src:src],
       [ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
             WITH_SPIDERMONKEY_SUBDIR="$WITH_JS_SUBDIR/src"
  -          AC_DEFINE(HAVE_LIBJS, 1, [Define to 1 if you have the 'js' library 
(-ljs).])
  +          AC_DEFINE(HAVE_LIBJS, 1, [Define to 1 if you have the 'mozjs185' 
library (-lmozjs185).])
         else
             WITH_JS_SUBDIR=js
         fi
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.44 -r1.45 Makefile.am
  --- rpm/js/Makefile.am        18 Sep 2010 14:12:57 -0000      1.44
  +++ rpm/js/Makefile.am        2 Apr 2011 02:01:53 -0000       1.45
  @@ -22,7 +22,7 @@
        -I$(top_srcdir)/misc \
        @WITH_DB_CPPFLAGS@ \
        @WITH_FILE_CPPFLAGS@ \
  -     @WITH_JS_CPPFLAGS@ \
  +     @WITH_MOZJS185_CPPFLAGS@ \
        @WITH_LUA_CPPFLAGS@ \
        @WITH_GPSEE_CPPFLAGS@ \
        @WITH_SYCK_CPPFLAGS@ \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/js/rpmaug-js.c
  ============================================================================
  $ cvs diff -u -r1.11 -r1.12 rpmaug-js.c
  --- rpm/js/rpmaug-js.c        10 Jan 2010 18:29:12 -0000      1.11
  +++ rpm/js/rpmaug-js.c        2 Apr 2011 02:01:53 -0000       1.12
  @@ -303,18 +303,18 @@
   }
   
   static JSFunctionSpec rpmaug_funcs[] = {
  -    JS_FS("defvar",  rpmaug_defvar,          0,0,0),
  -    JS_FS("get",     rpmaug_get,             0,0,0),
  -    JS_FS("set",     rpmaug_set,             0,0,0),
  -    JS_FS("insert",  rpmaug_insert,          0,0,0),
  -    JS_FS("rm",              rpmaug_rm,              0,0,0),
  -    JS_FS("remove",  rpmaug_rm,              0,0,0),
  -    JS_FS("mv",              rpmaug_mv,              0,0,0),
  -    JS_FS("move",    rpmaug_mv,              0,0,0),
  -    JS_FS("match",   rpmaug_match,           0,0,0),
  -    JS_FS("save",    rpmaug_save,            0,0,0),
  -    JS_FS("load",    rpmaug_load,            0,0,0),
  -    JS_FS("print",   rpmaug_print,           0,0,0),
  +    JS_FS("defvar",  rpmaug_defvar,          0,0),
  +    JS_FS("get",     rpmaug_get,             0,0),
  +    JS_FS("set",     rpmaug_set,             0,0),
  +    JS_FS("insert",  rpmaug_insert,          0,0),
  +    JS_FS("rm",              rpmaug_rm,              0,0),
  +    JS_FS("remove",  rpmaug_rm,              0,0),
  +    JS_FS("mv",              rpmaug_mv,              0,0),
  +    JS_FS("move",    rpmaug_mv,              0,0),
  +    JS_FS("match",   rpmaug_match,           0,0),
  +    JS_FS("save",    rpmaug_save,            0,0),
  +    JS_FS("load",    rpmaug_load,            0,0),
  +    JS_FS("print",   rpmaug_print,           0,0),
       JS_FS_END
   };
   
  @@ -515,25 +515,31 @@
   }
   
   static JSBool
  -rpmaug_ctor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval 
*rval)
  +rpmaug_ctor( JSContext* cx, uintN argc, jsval* vp )
   {
  +    jsval *argv = JS_ARGV( cx , vp );
  +    JSObject *obj = JS_NewObjectForConstructor( cx , vp );
  +    if( ! obj ) {
  +     JS_ReportError( cx , "Failed to create 'this' object" );
  +     return JS_FALSE;
  +    }
       JSBool ok = JS_FALSE;
       const char * _root = _rpmaugRoot;
       const char * _loadpath = _rpmaugLoadpath;
       unsigned int _flags = _rpmaugFlags;
   
  -_CTOR_DEBUG_ENTRY(_debug);
  +_CTOR_DEBUG_ENTRY(_debug, vp);
   
       if (!(ok = JS_ConvertArguments(cx, argc, argv, "/ssu", &_root, 
&_loadpath, &_flags)))
        goto exit;
   
  -    if (JS_IsConstructing(cx)) {
  +    if (JS_IsConstructing(cx, vp)) {
        if (rpmaug_init(cx, obj, _root, _loadpath, _flags) == NULL)
            goto exit;
       } else {
        if ((obj = JS_NewObject(cx, &rpmaugClass, NULL, NULL)) == NULL)
            goto exit;
  -     *rval = OBJECT_TO_JSVAL(obj);
  +        JS_SET_RVAL( cx , vp , OBJECT_TO_JSVAL( obj ) );
       }
       ok = JS_TRUE;
   
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to