Hello community,

here is the log from the commit of package lua-luaevent for openSUSE:Factory 
checked in at 2019-01-11 14:04:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lua-luaevent (Old)
 and      /work/SRC/openSUSE:Factory/.lua-luaevent.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lua-luaevent"

Fri Jan 11 14:04:59 2019 rev:3 rq:664302 version:0.4.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/lua-luaevent/lua-luaevent.changes        
2017-10-31 15:44:10.945377330 +0100
+++ /work/SRC/openSUSE:Factory/.lua-luaevent.new.28833/lua-luaevent.changes     
2019-01-11 14:05:26.203803207 +0100
@@ -1,0 +2,9 @@
+Thu Jan 10 08:58:06 UTC 2019 - [email protected]
+
+- Update to 0.4.6:
+  * Correctly balance stack in callback.
+  * Fix to allow 0 timeout values.
+  * Collect traceback if an error occurs in a callback.
+- Run spec-cleaner
+
+-------------------------------------------------------------------

Old:
----
  luaevent-0.4.4.tar.gz

New:
----
  luaevent-0.4.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lua-luaevent.spec ++++++
--- /var/tmp/diff_new_pack.McJZB6/_old  2019-01-11 14:05:27.435801968 +0100
+++ /var/tmp/diff_new_pack.McJZB6/_new  2019-01-11 14:05:27.479801924 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package lua-luaevent
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,15 @@
 
 %define flavor @BUILD_FLAVOR@
 %define mod_name luaevent
-Version:        0.4.4
+Version:        0.4.6
 Release:        0
 Summary:        A binding of libevent to Lua
 License:        MIT
 Group:          System/Libraries
-Url:            https://github.com/harningt/luaevent
+URL:            https://github.com/harningt/luaevent
 Source:         
https://github.com/harningt/luaevent/archive/v%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz
 BuildRequires:  %{flavor}-devel
-BuildRequires:  libevent-devel
+BuildRequires:  libevent-devel >= 1.4
 Requires:       %{flavor}
 Requires:       %{flavor}-luasocket
 %if "%{flavor}" == ""
@@ -63,7 +63,8 @@
 %postun -p /sbin/ldconfig
 
 %files
-%doc CHANGELOG README LICENSE
+%license LICENSE
+%doc CHANGELOG README
 %dir %{lua_archdir}/luaevent
 %{lua_archdir}/luaevent/core.so
 %{lua_noarchdir}/luaevent.lua

++++++ luaevent-0.4.4.tar.gz -> luaevent-0.4.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luaevent-0.4.4/.travis.yml 
new/luaevent-0.4.6/.travis.yml
--- old/luaevent-0.4.4/.travis.yml      2016-08-04 06:26:23.000000000 +0200
+++ new/luaevent-0.4.6/.travis.yml      2019-01-05 20:09:36.000000000 +0100
@@ -3,6 +3,11 @@
 
 sudo: false
 
+addons:
+    apt:
+        packages:
+            - libevent-dev
+
 env:
     global:
         - LUAROCKS=2.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luaevent-0.4.4/CHANGELOG new/luaevent-0.4.6/CHANGELOG
--- old/luaevent-0.4.4/CHANGELOG        2016-08-04 06:26:23.000000000 +0200
+++ new/luaevent-0.4.6/CHANGELOG        2019-01-05 20:09:36.000000000 +0100
@@ -1,3 +1,8 @@
+0.4.6 - 2019-01-05
+ * Correctly balance stack in callback. Mattew Wild <[email protected]>
+0.4.5 - 2018-11-01
+ * Fix to allow 0 timeout values. Matthew Wild <[email protected]>
+ * Collect traceback if an error occurs in a callback. Kim Alvefur 
<[email protected]>
 0.4.4 - 2016-08-04
  * Updated license to MIT license
  * Add basic continuous integration tests via Travis-CI
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luaevent-0.4.4/lua/luaevent.lua 
new/luaevent-0.4.6/lua/luaevent.lua
--- old/luaevent-0.4.4/lua/luaevent.lua 2016-08-04 06:26:23.000000000 +0200
+++ new/luaevent-0.4.6/lua/luaevent.lua 2019-01-05 20:09:36.000000000 +0100
@@ -1,6 +1,6 @@
 --[[
    LuaEvent
-   Copyright (C) 2007,2012,2013 Thomas Harning <[email protected]>
+   Copyright (C) 2007,2012,2013,2016,2018,2019 Thomas Harning 
<[email protected]>
 
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to 
deal
@@ -25,7 +25,7 @@
 
 _M.core = core
 _M._NAME = "luaevent"
-_M._VERSION = "0.4.4"
+_M._VERSION = "0.4.6"
 
 local EV_READ = core.EV_READ
 local EV_WRITE = core.EV_WRITE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/luaevent-0.4.4/rockspecs/luaevent/luaevent-0.4.5-1.rockspec 
new/luaevent-0.4.6/rockspecs/luaevent/luaevent-0.4.5-1.rockspec
--- old/luaevent-0.4.4/rockspecs/luaevent/luaevent-0.4.5-1.rockspec     
1970-01-01 01:00:00.000000000 +0100
+++ new/luaevent-0.4.6/rockspecs/luaevent/luaevent-0.4.5-1.rockspec     
2019-01-05 20:09:36.000000000 +0100
@@ -0,0 +1,36 @@
+package="luaevent"
+version="0.4.5-1"
+source = {
+   url = "https://github.com/harningt/luaevent/archive/v0.4.5.tar.gz";,
+   dir = "luaevent-0.4.5",
+}
+description = {
+   summary = "libevent binding for Lua",
+   detailed = [[
+       This is a binding of libevent to Lua
+   ]],
+   homepage = "https://github.com/harningt/luaevent";,
+   license = "MIT"
+}
+dependencies = {
+   "lua >= 5.1, <= 5.3"
+}
+external_dependencies = {
+   EVENT = {
+      header = "event.h",
+      library = "event",
+   }
+}
+build = {
+   type = "builtin",
+   modules = {
+      ["luaevent.core"] = {
+         sources = { "src/buffer_event.c", "src/event_buffer.c", 
"src/event_callback.c", "src/utility.c", "src/luaevent.c" },
+         libdirs = "$(EVENT_LIBDIR)",
+         incdirs = { "include", "$(EVENT_INCDIR)" },
+         libraries = "event",
+      },
+      ["luaevent"] = "lua/luaevent.lua",
+   },
+   copy_directories = { "doc", "test" },
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/luaevent-0.4.4/rockspecs/luaevent/luaevent-0.4.6-1.rockspec 
new/luaevent-0.4.6/rockspecs/luaevent/luaevent-0.4.6-1.rockspec
--- old/luaevent-0.4.4/rockspecs/luaevent/luaevent-0.4.6-1.rockspec     
1970-01-01 01:00:00.000000000 +0100
+++ new/luaevent-0.4.6/rockspecs/luaevent/luaevent-0.4.6-1.rockspec     
2019-01-05 20:09:36.000000000 +0100
@@ -0,0 +1,36 @@
+package="luaevent"
+version="0.4.6-1"
+source = {
+   url = "https://github.com/harningt/luaevent/archive/v0.4.6.tar.gz";,
+   dir = "luaevent-0.4.6",
+}
+description = {
+   summary = "libevent binding for Lua",
+   detailed = [[
+       This is a binding of libevent to Lua
+   ]],
+   homepage = "https://github.com/harningt/luaevent";,
+   license = "MIT"
+}
+dependencies = {
+   "lua >= 5.1, <= 5.3"
+}
+external_dependencies = {
+   EVENT = {
+      header = "event.h",
+      library = "event",
+   }
+}
+build = {
+   type = "builtin",
+   modules = {
+      ["luaevent.core"] = {
+         sources = { "src/buffer_event.c", "src/event_buffer.c", 
"src/event_callback.c", "src/utility.c", "src/luaevent.c" },
+         libdirs = "$(EVENT_LIBDIR)",
+         incdirs = { "include", "$(EVENT_INCDIR)" },
+         libraries = "event",
+      },
+      ["luaevent"] = "lua/luaevent.lua",
+   },
+   copy_directories = { "doc", "test" },
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luaevent-0.4.4/src/event_callback.c 
new/luaevent-0.4.6/src/event_callback.c
--- old/luaevent-0.4.4/src/event_callback.c     2016-08-04 06:26:23.000000000 
+0200
+++ new/luaevent-0.4.6/src/event_callback.c     2019-01-05 20:09:36.000000000 
+0100
@@ -41,7 +41,7 @@
 void luaevent_callback(int fd, short event, void* p) {
        le_callback* cb = p;
        lua_State* L;
-       int ret;
+       int ret, errfunc;
        struct timeval new_tv = { 0, 0 };
        le_base* base;
        assert(cb);
@@ -49,11 +49,34 @@
                return; /* Event has already been collected + destroyed */
        assert(cb->base->loop_L);
        L = cb->base->loop_L;
+
+       errfunc = 0;
+
+       lua_getglobal(L, "debug");
+
+       if(lua_istable(L, -1)) {
+               lua_getfield(L, -1, "traceback");
+
+               if(lua_isfunction(L, -1)) {
+                       lua_remove(L, -2);
+                       errfunc = lua_gettop(L);
+               } else {
+                       lua_pop(L, 2);
+               }
+       } else {
+               lua_pop(L, 1);
+       }
+
        lua_rawgeti(L, LUA_REGISTRYINDEX, cb->callbackRef);
        lua_pushinteger(L, event);
        /* cb->base may be NULL after the pcall, if the event is destroyed */
        base = cb->base;
-       if(lua_pcall(L, 1, 2, 0))
+
+       ret = lua_pcall(L, 1, 2, errfunc);
+       if(errfunc) {
+               lua_remove(L, errfunc);
+       }
+       if(ret)
        {
                base->errorMessage = luaL_ref(L, LUA_REGISTRYINDEX);
                event_base_loopbreak(base->base);
@@ -70,7 +93,7 @@
        memcpy(&new_tv, &cb->timeout, sizeof(new_tv));
        if(lua_isnumber(L, -1)) {
                double newTimeout = lua_tonumber(L, -1);
-               if(newTimeout > 0) {
+               if(newTimeout >= 0) {
                        load_timeval(newTimeout, &new_tv);
                }
        }


Reply via email to