summaryrefslogtreecommitdiffstats
path: root/epan/wslua/lrexlib
diff options
context:
space:
mode:
Diffstat (limited to 'epan/wslua/lrexlib')
-rw-r--r--epan/wslua/lrexlib/CMakeLists.txt4
-rw-r--r--epan/wslua/lrexlib/LICENSE27
-rw-r--r--epan/wslua/lrexlib/README.rst38
-rw-r--r--epan/wslua/lrexlib/algo.h28
-rw-r--r--epan/wslua/lrexlib/common.c28
-rw-r--r--epan/wslua/lrexlib/common.h32
-rw-r--r--epan/wslua/lrexlib/pcre2/lpcre2.c30
-rw-r--r--epan/wslua/lrexlib/pcre2/lpcre2_f.c28
8 files changed, 63 insertions, 152 deletions
diff --git a/epan/wslua/lrexlib/CMakeLists.txt b/epan/wslua/lrexlib/CMakeLists.txt
index 2f7231ef..e87988bd 100644
--- a/epan/wslua/lrexlib/CMakeLists.txt
+++ b/epan/wslua/lrexlib/CMakeLists.txt
@@ -21,10 +21,10 @@ target_include_directories(lrexlib SYSTEM PRIVATE
add_dependencies(lrexlib register_wslua)
if(FETCH_lua)
- add_dependencies(lrexlib lua52)
+ add_dependencies(lrexlib lua54)
endif()
add_compile_definitions(
- VERSION=\"2.9.1\"
+ VERSION=\"2.9.2\"
PCRE2_CODE_UNIT_WIDTH=8
)
diff --git a/epan/wslua/lrexlib/LICENSE b/epan/wslua/lrexlib/LICENSE
new file mode 100644
index 00000000..cfd2df47
--- /dev/null
+++ b/epan/wslua/lrexlib/LICENSE
@@ -0,0 +1,27 @@
+License of Lrexlib release
+--------------------------
+
+Copyright (C) Reuben Thomas 2000-2020
+Copyright (C) Shmuel Zeigerman 2004-2020
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute,
+sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall
+be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/epan/wslua/lrexlib/README.rst b/epan/wslua/lrexlib/README.rst
index b9679d35..660e8475 100644
--- a/epan/wslua/lrexlib/README.rst
+++ b/epan/wslua/lrexlib/README.rst
@@ -5,7 +5,7 @@ Lrexlib
| and Shmuel Zeigerman (shmuz@013net.net)
**Lrexlib** provides bindings of five regular expression library APIs
-(POSIX_, PCRE_, PCRE2_, GNU_, TRE_ and Oniguruma_) to Lua_ >= 5.1.
+(POSIX_, PCRE_, GNU_, TRE_ and Oniguruma_) to Lua_ >= 5.1.
The bindings for TRE and Oniguruma are not currently complete.
**Lrexlib** is copyright Reuben Thomas 2000-2020 and copyright Shmuel
@@ -13,17 +13,17 @@ Zeigerman 2004-2020, and is released under the same license as Lua,
the MIT_ license (otherwise known as the revised BSD license). There
is no warranty.
-.. _POSIX: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html
-.. _PCRE: http://www.pcre.org/pcre.txt
-.. _PCRE2: http://www.pcre.org/pcre2.txt
-.. _GNU: ftp://ftp.gnu.org/old-gnu/regex/
+.. _POSIX: https://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html
+.. _PCRE: https://www.pcre.org/current/doc/html/
+.. _GNU: https://ftp.gnu.org/old-gnu/regex/
.. _Oniguruma: https://github.com/kkos/oniguruma
-.. _TRE: http://laurikari.net/tre/documentation/
-.. _Lua: http://www.lua.org
-.. _MIT: http://www.opensource.org/licenses/mit-license.php
+.. _TRE: https://laurikari.net/tre/documentation/
+.. _Lua: https://www.lua.org
+.. _MIT: https://www.opensource.org/licenses/mit-license.php
-Please report bugs and make suggestions to the maintainer, or use the
-LuaForge trackers and mailing lists.
+Please report bugs and make suggestions on GitHub_.
+
+.. _GitHub: https://github.com/rrthomas/lrexlib/issues
Thanks to Thatcher Ulrich for bug and warning fixes, and to Nick
Gammon for adding support for PCRE named subpatterns.
@@ -37,20 +37,22 @@ Lrexlib is installed with LuaRocks_, using the command::
luarocks install lrexlib-FLAVOUR
-where **FLAVOUR** is one of PCRE, PCRE2, POSIX, oniguruma, TRE, GNU
+where **FLAVOUR** is one of PCRE2, POSIX, oniguruma, TRE, GNU
+
+Note that the obsolete PCRE version 1 is also supported, as flavour PCRE.
-.. _LuaRocks: http://www.luarocks.org
+.. _LuaRocks: https://luarocks.org
Links
-----
+- `GitHub project page`_
- License_
- `Reference Manual`_
-- `LuaForge Project Page`_
-- Download_
+- Downloads_
-.. _License: http://rrthomas.github.com/lrexlib/license.html
-.. _Reference Manual: http://rrthomas.github.com/lrexlib/manual.html
-.. _LuaForge Project Page: http://luaforge.net/projects/lrexlib/
-.. _Download: https://github.com/rrthomas/lrexlib/downloads
+.. _GitHub project page: https://github.com/rrthomas/lrexlib
+.. _License: https://rrthomas.github.io/lrexlib/license.html
+.. _Reference Manual: https://rrthomas.github.io/lrexlib/manual.html
+.. _Downloads: https://github.com/rrthomas/lrexlib/downloads
diff --git a/epan/wslua/lrexlib/algo.h b/epan/wslua/lrexlib/algo.h
index 2e7a38ab..0d16d757 100644
--- a/epan/wslua/lrexlib/algo.h
+++ b/epan/wslua/lrexlib/algo.h
@@ -1,30 +1,6 @@
/* algo.h */
-/*
- * Copyright (C) Reuben Thomas 2000-2020
- * Copyright (C) Shmuel Zeigerman 2004-2020
-
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated
- * documentation files (the "Software"), to deal in the
- * Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
-
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the
- * Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/* See Copyright Notice in the file LICENSE */
+/* SPDX-License-Identifier: MIT */
#include "common.h"
diff --git a/epan/wslua/lrexlib/common.c b/epan/wslua/lrexlib/common.c
index 4d42de9c..0c50ec94 100644
--- a/epan/wslua/lrexlib/common.c
+++ b/epan/wslua/lrexlib/common.c
@@ -1,30 +1,6 @@
/* common.c */
-/*
- * Copyright (C) Reuben Thomas 2000-2020
- * Copyright (C) Shmuel Zeigerman 2004-2020
-
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated
- * documentation files (the "Software"), to deal in the
- * Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
-
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the
- * Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/* See Copyright Notice in the file LICENSE */
+/* SPDX-License-Identifier: MIT */
#include <wireshark.h>
DIAG_OFF_CLANG(shorten-64-to-32)
diff --git a/epan/wslua/lrexlib/common.h b/epan/wslua/lrexlib/common.h
index 121e54c7..a93828f6 100644
--- a/epan/wslua/lrexlib/common.h
+++ b/epan/wslua/lrexlib/common.h
@@ -1,30 +1,6 @@
/* common.h */
-/*
- * Copyright (C) Reuben Thomas 2000-2020
- * Copyright (C) Shmuel Zeigerman 2004-2020
-
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated
- * documentation files (the "Software"), to deal in the
- * Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
-
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the
- * Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/* See Copyright Notice in the file LICENSE */
+/* SPDX-License-Identifier: MIT */
#ifndef COMMON_H
#define COMMON_H
@@ -32,7 +8,9 @@
#include "lua.h"
#if LUA_VERSION_NUM > 501
-# define lua_objlen lua_rawlen
+# ifndef lua_objlen
+# define lua_objlen lua_rawlen
+# endif
int luaL_typerror (lua_State *L, int narg, const char *tname);
#endif
diff --git a/epan/wslua/lrexlib/pcre2/lpcre2.c b/epan/wslua/lrexlib/pcre2/lpcre2.c
index f24cbec8..f278bbab 100644
--- a/epan/wslua/lrexlib/pcre2/lpcre2.c
+++ b/epan/wslua/lrexlib/pcre2/lpcre2.c
@@ -1,30 +1,6 @@
/* lpcre2.c - Lua binding of PCRE2 library */
-/*
- * Copyright (C) Reuben Thomas 2000-2020
- * Copyright (C) Shmuel Zeigerman 2004-2020
-
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated
- * documentation files (the "Software"), to deal in the
- * Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
-
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the
- * Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/* See Copyright Notice in the file LICENSE */
+/* SPDX-License-Identifier: MIT */
#include <wireshark.h>
DIAG_OFF_CLANG(shorten-64-to-32)
@@ -432,7 +408,7 @@ static int Lpcre2_jit_compile (lua_State *L) {
#define SET_INFO_FIELD(L,ud,what,name,valtype) { \
valtype val; \
if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
- lua_pushnumber (L, val); \
+ lua_pushinteger (L, val); \
lua_setfield (L, -2, name); \
} \
}
diff --git a/epan/wslua/lrexlib/pcre2/lpcre2_f.c b/epan/wslua/lrexlib/pcre2/lpcre2_f.c
index 659c8ac7..e79d850d 100644
--- a/epan/wslua/lrexlib/pcre2/lpcre2_f.c
+++ b/epan/wslua/lrexlib/pcre2/lpcre2_f.c
@@ -1,30 +1,6 @@
/* lpcre2_f.c - Lua binding of PCRE2 library */
-/*
- * Copyright (C) Reuben Thomas 2000-2020
- * Copyright (C) Shmuel Zeigerman 2004-2020
-
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated
- * documentation files (the "Software"), to deal in the
- * Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
-
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the
- * Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/* See Copyright Notice in the file LICENSE */
+/* SPDX-License-Identifier: MIT */
#include <pcre2.h>
#include "lua.h"