1 patch to use Lua 5.2 instead of Lua 5.1.
3 Need testing before contribution to upstream.
7 --- a/configure.ac 2017-07-19 08:44:01.496947783 -0700
8 +++ b/configure.ac 2017-07-19 08:54:49.587362050 -0700
11 dnl ================================================================
19 return success ? 0 : 1;
22 -AC_ARG_ENABLE(lua5.1,
23 - AS_HELP_STRING([--enable-lua5.1],[Enable Lua 5.1 support]),
24 - [enable_lua51=$enableval],
25 - [enable_lua51=auto])
26 +AC_ARG_ENABLE(lua5.2,
27 + AS_HELP_STRING([--enable-lua5.2],[Enable Lua 5.2 support]),
28 + [enable_lua52=$enableval],
29 + [enable_lua52=auto])
32 - AS_HELP_STRING([--enable-luajit],[Enable LuaJIT for Lua 5.1 support]),
33 + AS_HELP_STRING([--enable-luajit],[Enable LuaJIT for Lua 5.2 support]),
34 [enable_luajit=$enableval],
37 -AC_MSG_CHECKING([for Lua 5.1 availability.])
38 +AC_MSG_CHECKING([for Lua 5.2 availability.])
40 -if test "x$enable_lua51" = "xno"; then
41 - found_lua51="no (disabled, use --enable-lua5.1 to enable)"
42 - AC_MSG_RESULT([$found_lua51])
43 +if test "x$enable_lua52" = "xno"; then
44 + found_lua52="no (disabled, use --enable-lua5.2 to enable)"
45 + AC_MSG_RESULT([$found_lua52])
47 if test "x$enable_luajit" != "xno"; then
48 PKG_CHECK_EXISTS([luajit >= $LUAJIT_REQUIRED], [
58 - if test "x$enable_luajit" = "xyes" -a "x$found_lua51" = "xno"; then
59 + if test "x$enable_luajit" = "xyes" -a "x$found_lua52" = "xno"; then
60 AC_MSG_ERROR([You need to have LuaJIT >= $LUAJIT_REQUIRED
61 installed to build libpeas])
65 - if test "x$found_lua51" != "xyes"; then
66 - PKG_CHECK_EXISTS([lua5.1 >= $LUA51_REQUIRED], [
69 + if test "x$found_lua52" != "xyes"; then
70 + PKG_CHECK_EXISTS([lua >= $LUA52_REQUIRED], [
78 - if test "x$enable_lua51" = "xyes" -a "x$found_lua51" = "xno"; then
79 - AC_MSG_ERROR([You need to have Lua 5.1 >= $LUA51_REQUIRED
80 + if test "x$enable_lua52" = "xyes" -a "x$found_lua52" = "xno"; then
81 + AC_MSG_ERROR([You need to have Lua 5.2 >= $LUA52_REQUIRED
82 installed to build libpeas])
86 - if test "x$found_lua51" != "xyes"; then
87 - AC_MSG_RESULT([$found_lua51])
88 + if test "x$found_lua52" != "xyes"; then
89 + AC_MSG_RESULT([$found_lua52])
91 - AC_MSG_RESULT([$found_lua51 ($with_lua51)])
92 + AC_MSG_RESULT([$found_lua52 ($with_lua52)])
94 - LUA51_BIN="$with_lua51"
95 - LUA51_CFLAGS=`$PKG_CONFIG --cflags $with_lua51`
96 - LUA51_LIBS=`$PKG_CONFIG --libs $with_lua51`
98 - AC_SUBST(LUA51_CFLAGS)
99 - AC_SUBST(LUA51_LIBS)
100 + LUA52_BIN="$with_lua52"
101 + LUA52_CFLAGS=`$PKG_CONFIG --cflags $with_lua52`
102 + LUA52_LIBS=`$PKG_CONFIG --libs $with_lua52`
103 + AC_SUBST(LUA52_BIN)
104 + AC_SUBST(LUA52_CFLAGS)
105 + AC_SUBST(LUA52_LIBS)
107 - AC_MSG_CHECKING(for LGI availability in Lua 5.1.)
108 + AC_MSG_CHECKING(for LGI availability in Lua 5.2.)
110 peas_save_CFLAGS="$CFLAGS"
111 peas_save_LIBS="$LIBS"
112 - CFLAGS="$PEAS_CFLAGS $LUA51_CFLAGS -I${srcdir}/loaders/lua5.1"
113 - LIBS="$PEAS_LIBS $LUA51_LIBS"
114 + CFLAGS="$PEAS_CFLAGS $LUA52_CFLAGS -I${srcdir}/loaders/lua5.2"
115 + LIBS="$PEAS_LIBS $LUA52_LIBS"
116 AC_TRY_RUN(peas_lgi_version_test(0),
123 CFLAGS="$peas_save_CFLAGS"
124 LIBS="$peas_save_LIBS"
126 - if test "x$enable_lua51" = "xyes" -a "x$found_lua51" = "xno"; then
127 + if test "x$enable_lua52" = "xyes" -a "x$found_lua52" = "xno"; then
128 AC_MSG_ERROR([You need to have LGI >= $LGI_REQUIRED
129 installed to build libpeas])
132 - if test "x$found_lua51" = "xyes"; then
133 - AC_DEFINE(ENABLE_LUA51, 1, [Define to compile with Lua support])
134 + if test "x$found_lua52" = "xyes"; then
135 + AC_DEFINE(ENABLE_LUA52, 1, [Define to compile with Lua support])
138 - AC_MSG_RESULT([$found_lua51])
139 + AC_MSG_RESULT([$found_lua52])
143 -AM_CONDITIONAL([ENABLE_LUA51], [test "x$found_lua51" = "xyes"])
144 +AM_CONDITIONAL([ENABLE_LUA52], [test "x$found_lua52" = "xyes"])
146 dnl ================================================================
152 -loaders/lua5.1/Makefile
153 -loaders/lua5.1/resources/Makefile
154 +loaders/lua5.2/Makefile
155 +loaders/lua5.2/resources/Makefile
156 loaders/python/Makefile
157 loaders/python3/Makefile
163 - Lua 5.1 support : ${found_lua51}
164 + Lua 5.2 support : ${found_lua52}
165 Python 2 support : ${found_python2}
166 Python 3 support : ${found_python3}
168 --- libpeas-1.20.0/docs/reference/html/PeasEngine.html 2017-03-25 14:01:09.743168533 -0700
169 +++ libpeas-1.20.0/docs/reference/html/PeasEngine.html 2017-03-25 14:01:39.355489354 -0700
171 <em class="parameter"><code>const <span class="type">gchar</span> *loader_name</code></em>);</pre>
172 <p>Enable a loader, enables a loader for plugins.
173 The C plugin loader is always enabled. The other plugin
174 -loaders are: lua5.1, python and python3.</p>
175 +loaders are: lua5.2, python and python3.</p>
176 <p>For instance, the following code will enable Python 2 plugins
178 <div class="informalexample">
179 --- libpeas-1.20.0/libpeas/peas-engine.c 2017-03-25 14:02:36.068535276 -0700
180 +++ libpeas-1.20.0/libpeas/peas-engine.c 2017-03-25 14:02:47.830894950 -0700
183 * Enable a loader, enables a loader for plugins.
184 * The C plugin loader is always enabled. The other plugin
185 - * loaders are: lua5.1, python and python3.
186 + * loaders are: lua5.2, python and python3.
188 * For instance, the following code will enable Python 2 plugins
190 --- libpeas-1.20.0/libpeas/peas-utils.c 2017-03-25 14:03:08.340774383 -0700
191 +++ libpeas-1.20.0/libpeas/peas-utils.c 2017-03-25 14:03:48.753885218 -0700
193 #include "peas-utils.h"
195 static const gchar *all_plugin_loaders[] = {
196 - "c", "lua5.1", "python", "python3"
197 + "c", "lua5.2", "python", "python3"
200 static const gchar *all_plugin_loader_modules[] = {
203 static const gint conflicting_plugin_loaders[PEAS_UTILS_N_LOADERS][2] = {
204 { -1, -1 }, /* c => {} */
205 - { -1, -1 }, /* lua5.1 => {} */
206 + { -1, -1 }, /* lua5.2 => {} */
207 { 3, -1 }, /* python => { python3 } */
208 { 2, -1 } /* python3 => { python } */
210 --- libpeas-1.20.0/tests/libpeas/extension-lua.c 2017-03-25 14:07:53.632458064 -0700
211 +++ libpeas-1.20.0/tests/libpeas/extension-lua.c 2017-03-25 14:08:35.090287111 -0700
213 PeasPluginInfo *info;
215 testing_util_push_log_hook ("Error loading plugin "
216 - "'extension-lua51-nonexistent'*");
217 + "'extension-lua52-nonexistent'*");
219 - info = peas_engine_get_plugin_info (engine, "extension-lua51-nonexistent");
220 + info = peas_engine_get_plugin_info (engine, "extension-lua52-nonexistent");
222 g_assert (!peas_engine_load_plugin (engine, info));
224 @@ -168,12 +168,12 @@
225 testing_init (&argc, &argv);
227 /* Only test the basics */
228 - testing_extension_basic ("lua5.1");
229 + testing_extension_basic ("lua5.2");
231 /* We still need to add the callable tests
232 * because of peas_extension_call()
234 - testing_extension_callable ("lua5.1");
235 + testing_extension_callable ("lua5.2");
237 #undef EXTENSION_TEST
238 #undef EXTENSION_TEST_FUNC
239 @@ -186,10 +186,10 @@
240 g_test_add_func (EXTENSION_TEST_NAME (loader, path), \
241 (gpointer) test_extension_lua_##func)
243 - EXTENSION_TEST (lua5.1, "instance-refcount", instance_refcount);
244 - EXTENSION_TEST (lua5.1, "activatable-subject-refcount",
245 + EXTENSION_TEST (lua5.2, "instance-refcount", instance_refcount);
246 + EXTENSION_TEST (lua5.2, "activatable-subject-refcount",
247 activatable_subject_refcount);
248 - EXTENSION_TEST (lua5.1, "nonexistent", nonexistent);
249 + EXTENSION_TEST (lua5.2, "nonexistent", nonexistent);
251 return testing_extension_run_tests ();
253 --- libpeas-1.20.0/tests/libpeas/Makefile.am 2017-03-25 14:08:54.386139364 -0700
254 +++ libpeas-1.20.0/tests/libpeas/Makefile.am 2017-03-25 14:09:16.052262835 -0700
257 extension_c_LDADD = $(LDADD) $(builddir)/plugins/embedded/libembedded.la
260 -TEST_PROGS += extension-lua51
261 -extension_lua51_SOURCES = extension-lua.c
262 -extension_lua51_CFLAGS = $(LUA51_CFLAGS)
263 -extension_lua51_LDADD = $(LDADD) $(LUA51_LIBS)
265 +TEST_PROGS += extension-lua52
266 +extension_lua52_SOURCES = extension-lua.c
267 +extension_lua52_CFLAGS = $(LUA51_CFLAGS)
268 +extension_lua52_LDADD = $(LDADD) $(LUA51_LIBS)
272 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua/Makefile.am 2017-03-25 14:11:20.301248129 -0700
273 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua/Makefile.am 2017-03-25 14:11:23.410455379 -0700
275 include $(top_srcdir)/tests/Makefile.plugin
278 - extension-lua51.gschema.xml \
279 - extension-lua51.plugin \
280 - extension-lua51.lua
281 + extension-lua52.gschema.xml \
282 + extension-lua52.plugin \
283 + extension-lua52.lua
285 EXTRA_DIST = $(noinst_PLUGIN)
286 --- libpeas-1.20.0/tests/libpeas/plugins/Makefile.am 2017-03-25 14:11:47.060437069 -0700
287 +++ libpeas-1.20.0/tests/libpeas/plugins/Makefile.am 2017-03-25 14:12:02.469844453 -0700
290 SUBDIRS = embedded extension-c
294 SUBDIRS += extension-lua
300 extension-c-nonexistent.plugin \
301 - extension-lua51-nonexistent.plugin \
302 + extension-lua52-nonexistent.plugin \
303 extension-python-nonexistent.plugin \
304 extension-python3-nonexistent.plugin \
305 info-missing-module.plugin \
306 --- libpeas-1.20.0/loaders/lua5.2/Makefile.am 1969-12-31 16:00:00.000000000 -0800
307 +++ libpeas-1.20.0/loaders/lua5.2/Makefile.am 2015-06-25 22:36:33.459623339 -0700
309 +# Lua 5.2 plugin loader
313 +loaderdir = $(libdir)/libpeas-1.0/loaders
320 + $(DISABLE_DEPRECATED) \
323 +loader_LTLIBRARIES = liblua52loader.la
325 +liblua52loader_la_SOURCES = \
326 + peas-lua-internal.c \
327 + peas-lua-internal.h \
328 + peas-lua-resources.c \
329 + peas-plugin-loader-lua.c \
330 + peas-plugin-loader-lua.h \
334 +liblua52loader_la_LDFLAGS = \
335 + $(LOADER_LIBTOOL_FLAGS) \
338 +liblua52loader_la_LIBADD = \
339 + $(top_builddir)/libpeas/libpeas-1.0.la \
343 +loader_resources_deps = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/resources/peas-lua.gresource.xml)
344 +peas-lua-resources.c: $(srcdir)/resources/peas-lua.gresource.xml $(loader_resources_deps)
345 + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --internal --target=$@ --sourcedir=$(srcdir)/resources --generate-source $(srcdir)/resources/peas-lua.gresource.xml
348 + $(loader_resources_deps)
350 +CLEANFILES = peas-lua-resources.c
352 +gcov_sources = $(liblua52loader_la_SOURCES)
353 +include $(top_srcdir)/Makefile.gcov
354 --- libpeas-1.20.0/loaders/lua5.2/peas-lua-internal.c 1969-12-31 16:00:00.000000000 -0800
355 +++ libpeas-1.20.0/loaders/lua5.2/peas-lua-internal.c 2015-06-25 22:36:33.454040413 -0700
358 + * peas-lua-internal.c
359 + * This file is part of libpeas
361 + * Copyright (C) 2015 - Garrett Regier
363 + * libpeas is free software; you can redistribute it and/or
364 + * modify it under the terms of the GNU Lesser General Public
365 + * License as published by the Free Software Foundation; either
366 + * version 2.1 of the License, or (at your option) any later version.
368 + * libpeas is distributed in the hope that it will be useful,
369 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
370 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
371 + * Lesser General Public License for more details.
373 + * You should have received a copy of the GNU Lesser General Public
374 + * License along with this library; if not, write to the Free Software
375 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
378 +#ifdef HAVE_CONFIG_H
382 +#include "peas-lua-internal.h"
384 +#include <lauxlib.h>
386 +#include "peas-lua-utils.h"
389 +static gpointer hooks_key = NULL;
390 +static gpointer failed_err_key = NULL;
394 +failed_fn (lua_State *L)
398 + /* The first parameter is the Hooks table instance */
399 + luaL_checktype (L, 1, LUA_TTABLE);
401 + /* The tracebacks have a trailing newline */
402 + msg = g_strchomp (g_strdup (luaL_checkstring (L, 2)));
404 + g_warning ("%s", msg);
406 + /* peas_lua_internal_call() knows to check for this value */
407 + lua_pushlightuserdata (L, &failed_err_key);
410 + return lua_error (L);
414 +peas_lua_internal_setup (lua_State *L)
416 + if (!peas_lua_utils_load_resource (L, "internal.lua", 0, 1))
418 + /* Already warned */
422 + if (!lua_istable (L, -1))
424 + g_warning ("Invalid result from 'internal.lua' resource: %s",
425 + lua_tostring (L, -1));
432 + /* Set Hooks.failed to failed_fn */
433 + lua_pushcfunction (L, failed_fn);
434 + lua_setfield (L, -2, "failed");
436 + /* Set registry[&hooks_key] = hooks */
437 + lua_pushlightuserdata (L, &hooks_key);
438 + lua_pushvalue (L, -2);
439 + lua_rawset (L, LUA_REGISTRYINDEX);
447 +peas_lua_internal_shutdown (lua_State *L)
449 + lua_pushlightuserdata (L, &hooks_key);
451 + lua_rawset (L, LUA_REGISTRYINDEX);
455 +peas_lua_internal_call (lua_State *L,
460 + /* Get the Hooks table */
461 + lua_pushlightuserdata (L, &hooks_key);
462 + lua_rawget (L, LUA_REGISTRYINDEX);
464 + /* Get the method */
465 + lua_getfield (L, -1, name);
467 + /* Swap the method and the table */
468 + lua_insert (L, -2);
472 + /* Before: [args..., method, table]
473 + * After: [method, table, args...]
475 + lua_insert (L, -n_args - 2);
476 + lua_insert (L, -n_args - 2);
479 + if (!peas_lua_utils_call (L, 1 + n_args, 1))
481 + /* Raised by failed_fn() to prevent printing the error */
482 + if (!lua_isuserdata (L, -1) ||
483 + lua_touserdata (L, -1) != &failed_err_key)
485 + g_warning ("Failed to run internal Lua hook '%s':\n%s",
486 + name, lua_tostring (L, -1));
489 + /* Pop the error */
494 + if (lua_type (L, -1) != return_type)
496 + /* Don't warn for a nil result */
497 + if (lua_type (L, -1) != LUA_TNIL)
499 + g_warning ("Invalid return value for internal Lua hook '%s': "
500 + "expected %s, got: %s (%s)", name,
501 + lua_typename (L, return_type),
502 + lua_typename (L, lua_type (L, -1)),
503 + lua_tostring (L, -1));
511 + /* Pop the result if nil */
512 + if (return_type == LUA_TNIL)
517 --- libpeas-1.20.0/loaders/lua5.2/peas-lua-internal.h 1969-12-31 16:00:00.000000000 -0800
518 +++ libpeas-1.20.0/loaders/lua5.2/peas-lua-internal.h 2015-06-25 22:36:33.459029540 -0700
521 + * peas-lua-internal.h
522 + * This file is part of libpeas
524 + * Copyright (C) 2015 - Garrett Regier
526 + * libpeas is free software; you can redistribute it and/or
527 + * modify it under the terms of the GNU Lesser General Public
528 + * License as published by the Free Software Foundation; either
529 + * version 2.1 of the License, or (at your option) any later version.
531 + * libpeas is distributed in the hope that it will be useful,
532 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
533 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
534 + * Lesser General Public License for more details.
536 + * You should have received a copy of the GNU Lesser General Public
537 + * License along with this library; if not, write to the Free Software
538 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
541 +#ifndef __PEAS_LUA_INTERNAL_H__
542 +#define __PEAS_LUA_INTERNAL_H__
549 +gboolean peas_lua_internal_setup (lua_State *L);
550 +void peas_lua_internal_shutdown (lua_State *L);
552 +gboolean peas_lua_internal_call (lua_State *L,
559 +#endif /* __PEAS_LUA_INTERNAL_H__ */
560 --- libpeas-1.20.0/loaders/lua5.2/peas-lua-resources.c 1969-12-31 16:00:00.000000000 -0800
561 +++ libpeas-1.20.0/loaders/lua5.2/peas-lua-resources.c 2015-06-25 22:36:33.463601041 -0700
563 +#include <gio/gio.h>
565 +#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
566 +# define SECTION __attribute__ ((section (".gresource.peas_lua"), aligned (8)))
571 +static const SECTION union { const guint8 data[6452]; const double alignment; void * const ptr;} peas_lua_resource_data = { {
572 + 0x47, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
573 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
574 + 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
575 + 0x00, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00,
576 + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
577 + 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
578 + 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
579 + 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
580 + 0xf8, 0x38, 0xf2, 0x36, 0x07, 0x00, 0x00, 0x00,
581 + 0x00, 0x01, 0x00, 0x00, 0x08, 0x00, 0x4c, 0x00,
582 + 0x08, 0x01, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00,
583 + 0xb0, 0xb7, 0x24, 0x30, 0x03, 0x00, 0x00, 0x00,
584 + 0x0c, 0x01, 0x00, 0x00, 0x06, 0x00, 0x4c, 0x00,
585 + 0x14, 0x01, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00,
586 + 0x8a, 0x19, 0x92, 0xdc, 0x05, 0x00, 0x00, 0x00,
587 + 0x18, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x76, 0x00,
588 + 0x28, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00,
589 + 0x4b, 0x50, 0x90, 0x0b, 0x04, 0x00, 0x00, 0x00,
590 + 0x00, 0x13, 0x00, 0x00, 0x04, 0x00, 0x4c, 0x00,
591 + 0x04, 0x13, 0x00, 0x00, 0x08, 0x13, 0x00, 0x00,
592 + 0xd4, 0xb5, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff,
593 + 0x08, 0x13, 0x00, 0x00, 0x01, 0x00, 0x4c, 0x00,
594 + 0x0c, 0x13, 0x00, 0x00, 0x10, 0x13, 0x00, 0x00,
595 + 0x1d, 0xc8, 0x7f, 0x8a, 0x00, 0x00, 0x00, 0x00,
596 + 0x10, 0x13, 0x00, 0x00, 0x07, 0x00, 0x4c, 0x00,
597 + 0x18, 0x13, 0x00, 0x00, 0x20, 0x13, 0x00, 0x00,
598 + 0x06, 0x53, 0xad, 0xce, 0x05, 0x00, 0x00, 0x00,
599 + 0x20, 0x13, 0x00, 0x00, 0x0a, 0x00, 0x76, 0x00,
600 + 0x30, 0x13, 0x00, 0x00, 0x28, 0x19, 0x00, 0x00,
601 + 0xbf, 0x75, 0x9f, 0x49, 0x01, 0x00, 0x00, 0x00,
602 + 0x28, 0x19, 0x00, 0x00, 0x08, 0x00, 0x4c, 0x00,
603 + 0x30, 0x19, 0x00, 0x00, 0x34, 0x19, 0x00, 0x00,
604 + 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f,
605 + 0x05, 0x00, 0x00, 0x00, 0x67, 0x6e, 0x6f, 0x6d,
606 + 0x65, 0x2f, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
607 + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
608 + 0x2e, 0x6c, 0x75, 0x61, 0x00, 0x00, 0x00, 0x00,
609 + 0xc8, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
610 + 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x43,
611 + 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74,
612 + 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x31,
613 + 0x35, 0x20, 0x2d, 0x20, 0x47, 0x61, 0x72, 0x72,
614 + 0x65, 0x74, 0x74, 0x20, 0x52, 0x65, 0x67, 0x69,
615 + 0x65, 0x72, 0x0a, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d,
616 + 0x20, 0x6c, 0x69, 0x62, 0x70, 0x65, 0x61, 0x73,
617 + 0x20, 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65,
618 + 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
619 + 0x65, 0x3b, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63,
620 + 0x61, 0x6e, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73,
621 + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20,
622 + 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f,
623 + 0x72, 0x0a, 0x2d, 0x2d, 0x20, 0x6d, 0x6f, 0x64,
624 + 0x69, 0x66, 0x79, 0x20, 0x69, 0x74, 0x20, 0x75,
625 + 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65,
626 + 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f,
627 + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,
628 + 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72,
629 + 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
630 + 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a,
631 + 0x2d, 0x2d, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
632 + 0x73, 0x65, 0x20, 0x61, 0x73, 0x20, 0x70, 0x75,
633 + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20,
634 + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46,
635 + 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74,
636 + 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75,
637 + 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b,
638 + 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x0a,
639 + 0x2d, 0x2d, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
640 + 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x31, 0x20, 0x6f,
641 + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69,
642 + 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x6f,
643 + 0x72, 0x20, 0x28, 0x61, 0x74, 0x20, 0x79, 0x6f,
644 + 0x75, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f,
645 + 0x6e, 0x29, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,
646 + 0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72,
647 + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2d, 0x2d,
648 + 0x0a, 0x2d, 0x2d, 0x20, 0x6c, 0x69, 0x62, 0x70,
649 + 0x65, 0x61, 0x73, 0x20, 0x69, 0x73, 0x20, 0x64,
650 + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
651 + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68,
652 + 0x65, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20, 0x74,
653 + 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x77,
654 + 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75,
655 + 0x73, 0x65, 0x66, 0x75, 0x6c, 0x2c, 0x0a, 0x2d,
656 + 0x2d, 0x20, 0x62, 0x75, 0x74, 0x20, 0x57, 0x49,
657 + 0x54, 0x48, 0x4f, 0x55, 0x54, 0x20, 0x41, 0x4e,
658 + 0x59, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e,
659 + 0x54, 0x59, 0x3b, 0x20, 0x77, 0x69, 0x74, 0x68,
660 + 0x6f, 0x75, 0x74, 0x20, 0x65, 0x76, 0x65, 0x6e,
661 + 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6d, 0x70,
662 + 0x6c, 0x69, 0x65, 0x64, 0x20, 0x77, 0x61, 0x72,
663 + 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20, 0x6f, 0x66,
664 + 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x45, 0x52, 0x43,
665 + 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c,
666 + 0x49, 0x54, 0x59, 0x20, 0x6f, 0x72, 0x20, 0x46,
667 + 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46,
668 + 0x4f, 0x52, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52,
669 + 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20,
670 + 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e,
671 + 0x20, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68,
672 + 0x65, 0x20, 0x47, 0x4e, 0x55, 0x0a, 0x2d, 0x2d,
673 + 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20,
674 + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20,
675 + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c,
676 + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66,
677 + 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20,
678 + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e,
679 + 0x0a, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x59,
680 + 0x6f, 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c,
681 + 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72,
682 + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20,
683 + 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,
684 + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,
685 + 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72,
686 + 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
687 + 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a,
688 + 0x2d, 0x2d, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
689 + 0x73, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67,
690 + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
691 + 0x69, 0x73, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,
692 + 0x72, 0x79, 0x3b, 0x20, 0x69, 0x66, 0x20, 0x6e,
693 + 0x6f, 0x74, 0x2c, 0x20, 0x77, 0x72, 0x69, 0x74,
694 + 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
695 + 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f,
696 + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0a, 0x2d,
697 + 0x2d, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61,
698 + 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e,
699 + 0x63, 0x2e, 0x2c, 0x20, 0x35, 0x31, 0x20, 0x46,
700 + 0x72, 0x61, 0x6e, 0x6b, 0x6c, 0x69, 0x6e, 0x20,
701 + 0x53, 0x74, 0x2c, 0x20, 0x46, 0x69, 0x66, 0x74,
702 + 0x68, 0x20, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x2c,
703 + 0x20, 0x42, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x2c,
704 + 0x20, 0x4d, 0x41, 0x20, 0x20, 0x30, 0x32, 0x31,
705 + 0x31, 0x30, 0x2d, 0x31, 0x33, 0x30, 0x31, 0x20,
706 + 0x20, 0x55, 0x53, 0x41, 0x2e, 0x0a, 0x0a, 0x6c,
707 + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x62,
708 + 0x75, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71,
709 + 0x75, 0x69, 0x72, 0x65, 0x20, 0x27, 0x64, 0x65,
710 + 0x62, 0x75, 0x67, 0x27, 0x0a, 0x6c, 0x6f, 0x63,
711 + 0x61, 0x6c, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61,
712 + 0x67, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71,
713 + 0x75, 0x69, 0x72, 0x65, 0x20, 0x27, 0x70, 0x61,
714 + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x27, 0x0a, 0x0a,
715 + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x67,
716 + 0x69, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75,
717 + 0x69, 0x72, 0x65, 0x20, 0x27, 0x6c, 0x67, 0x69,
718 + 0x27, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20,
719 + 0x47, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
720 + 0x3d, 0x20, 0x6c, 0x67, 0x69, 0x2e, 0x47, 0x4f,
721 + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x6c, 0x6f,
722 + 0x63, 0x61, 0x6c, 0x20, 0x50, 0x65, 0x61, 0x73,
723 + 0x20, 0x3d, 0x20, 0x6c, 0x67, 0x69, 0x2e, 0x50,
724 + 0x65, 0x61, 0x73, 0x0a, 0x0a, 0x0a, 0x6c, 0x6f,
725 + 0x63, 0x61, 0x6c, 0x20, 0x48, 0x6f, 0x6f, 0x6b,
726 + 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x48,
727 + 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x5f, 0x5f, 0x69,
728 + 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x48,
729 + 0x6f, 0x6f, 0x6b, 0x73, 0x0a, 0x0a, 0x66, 0x75,
730 + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x48,
731 + 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x6e, 0x65, 0x77,
732 + 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
733 + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6c,
734 + 0x66, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x70, 0x72,
735 + 0x69, 0x76, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x20,
736 + 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65,
737 + 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62,
738 + 0x6c, 0x65, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2c,
739 + 0x20, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x29, 0x0a,
740 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c,
741 + 0x66, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x2e, 0x6d,
742 + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x61,
743 + 0x63, 0x68, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x7d,
744 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c,
745 + 0x66, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x2e, 0x65,
746 + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
747 + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x20, 0x3d,
748 + 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
749 + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73,
750 + 0x65, 0x6c, 0x66, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
751 + 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
752 + 0x6e, 0x20, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x3a,
753 + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x28, 0x6d,
754 + 0x73, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20,
755 + 0x2d, 0x2d, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20,
756 + 0x69, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65,
757 + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x62,
758 + 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c,
759 + 0x75, 0x67, 0x69, 0x6e, 0x20, 0x6c, 0x6f, 0x61,
760 + 0x64, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20,
761 + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x27, 0x48,
762 + 0x6f, 0x6f, 0x6b, 0x73, 0x3a, 0x66, 0x61, 0x69,
763 + 0x6c, 0x65, 0x64, 0x28, 0x29, 0x20, 0x77, 0x61,
764 + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6d,
765 + 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65,
766 + 0x64, 0x21, 0x27, 0x29, 0x0a, 0x65, 0x6e, 0x64,
767 + 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20,
768 + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
769 + 0x20, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x63,
770 + 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74,
771 + 0x68, 0x28, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,
772 + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a,
773 + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61,
774 + 0x6c, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x20,
775 + 0x3d, 0x20, 0x28, 0x27, 0x3b, 0x25, 0x73, 0x2f,
776 + 0x3f, 0x2e, 0x6c, 0x75, 0x61, 0x3b, 0x25, 0x73,
777 + 0x2f, 0x3f, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x2e,
778 + 0x6c, 0x75, 0x61, 0x27, 0x29, 0x3a, 0x66, 0x6f,
779 + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x70, 0x61, 0x63,
780 + 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74,
781 + 0x68, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
782 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
783 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
784 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
785 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
786 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
787 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
788 + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f,
789 + 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x0a, 0x20,
790 + 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f,
791 + 0x74, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,
792 + 0x65, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x66,
793 + 0x69, 0x6e, 0x64, 0x28, 0x70, 0x61, 0x74, 0x68,
794 + 0x73, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x74, 0x72,
795 + 0x75, 0x65, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e,
796 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
797 + 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
798 + 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20,
799 + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e,
800 + 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20,
801 + 0x70, 0x61, 0x74, 0x68, 0x73, 0x0a, 0x20, 0x20,
802 + 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e,
803 + 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
804 + 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
805 + 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
806 + 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f,
807 + 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f,
808 + 0x6e, 0x28, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20,
809 + 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x46, 0x6f,
810 + 0x72, 0x6d, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65,
811 + 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x65,
812 + 0x76, 0x65, 0x6e, 0x20, 0x69, 0x66, 0x20, 0x67,
813 + 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x75,
814 + 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x0a,
815 + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61,
816 + 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
817 + 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x64, 0x65,
818 + 0x62, 0x75, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63,
819 + 0x65, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x74, 0x6f,
820 + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x65,
821 + 0x72, 0x72, 0x29, 0x2c, 0x20, 0x32, 0x29, 0x0a,
822 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20,
823 + 0x74, 0x79, 0x70, 0x65, 0x28, 0x66, 0x6f, 0x72,
824 + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x29, 0x20,
825 + 0x7e, 0x3d, 0x20, 0x27, 0x73, 0x74, 0x72, 0x69,
826 + 0x6e, 0x67, 0x27, 0x20, 0x74, 0x68, 0x65, 0x6e,
827 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
828 + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
829 + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65,
830 + 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e,
831 + 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d,
832 + 0x2d, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
833 + 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x65, 0x6e,
834 + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66,
835 + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69,
836 + 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
837 + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x69, 0x6e,
838 + 0x65, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a,
839 + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20,
840 + 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x20,
841 + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65,
842 + 0x64, 0x3a, 0x67, 0x6d, 0x61, 0x74, 0x63, 0x68,
843 + 0x28, 0x27, 0x28, 0x5b, 0x5e, 0x5c, 0x6e, 0x5d,
844 + 0x2b, 0x5c, 0x6e, 0x3f, 0x29, 0x27, 0x29, 0x20,
845 + 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
846 + 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x69,
847 + 0x6e, 0x65, 0x3a, 0x66, 0x69, 0x6e, 0x64, 0x28,
848 + 0x27, 0x70, 0x65, 0x61, 0x73, 0x2d, 0x6c, 0x75,
849 + 0x61, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
850 + 0x61, 0x6c, 0x2e, 0x6c, 0x75, 0x61, 0x27, 0x2c,
851 + 0x20, 0x31, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65,
852 + 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20,
853 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
854 + 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b,
855 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
856 + 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20,
857 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61,
858 + 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65,
859 + 0x72, 0x74, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x73,
860 + 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x29, 0x0a,
861 + 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
862 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
863 + 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c,
864 + 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74,
865 + 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2c, 0x20,
866 + 0x27, 0x27, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
867 + 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
868 + 0x6e, 0x20, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x3a,
869 + 0x6c, 0x6f, 0x61, 0x64, 0x28, 0x66, 0x69, 0x6c,
870 + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6d,
871 + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x69,
872 + 0x72, 0x2c, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
873 + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a,
874 + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61,
875 + 0x6c, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
876 + 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e,
877 + 0x70, 0x72, 0x69, 0x76, 0x2e, 0x6d, 0x6f, 0x64,
878 + 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68,
879 + 0x65, 0x5b, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
880 + 0x6d, 0x65, 0x5d, 0x0a, 0x0a, 0x20, 0x20, 0x20,
881 + 0x20, 0x69, 0x66, 0x20, 0x6d, 0x6f, 0x64, 0x75,
882 + 0x6c, 0x65, 0x20, 0x7e, 0x3d, 0x20, 0x6e, 0x69,
883 + 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20,
884 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72,
885 + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x6f,
886 + 0x64, 0x75, 0x6c, 0x65, 0x20, 0x7e, 0x3d, 0x20,
887 + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20,
888 + 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20,
889 + 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61,
890 + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f,
891 + 0x61, 0x64, 0x65, 0x64, 0x5b, 0x6d, 0x6f, 0x64,
892 + 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
893 + 0x5d, 0x20, 0x7e, 0x3d, 0x20, 0x6e, 0x69, 0x6c,
894 + 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
895 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f,
896 + 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x73, 0x67, 0x20,
897 + 0x3d, 0x20, 0x28, 0x22, 0x45, 0x72, 0x72, 0x6f,
898 + 0x72, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e,
899 + 0x67, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
900 + 0x20, 0x27, 0x25, 0x73, 0x27, 0x3a, 0x20, 0x22,
901 + 0x20, 0x2e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20,
902 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
903 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
904 + 0x20, 0x22, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
905 + 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x27, 0x25,
906 + 0x73, 0x27, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61,
907 + 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x62,
908 + 0x65, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64,
909 + 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
910 + 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a,
911 + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x28, 0x6d,
912 + 0x73, 0x67, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61,
913 + 0x74, 0x28, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
914 + 0x6d, 0x65, 0x2c, 0x20, 0x6d, 0x6f, 0x64, 0x75,
915 + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x29,
916 + 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e,
917 + 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61,
918 + 0x64, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61,
919 + 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28,
920 + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x64,
921 + 0x69, 0x72, 0x29, 0x0a, 0x0a, 0x20, 0x20, 0x20,
922 + 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73,
923 + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2c, 0x20,
924 + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d,
925 + 0x20, 0x78, 0x70, 0x63, 0x61, 0x6c, 0x6c, 0x28,
926 + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
927 + 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
928 + 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
929 + 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
930 + 0x65, 0x28, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
931 + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20,
932 + 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x20,
933 + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x70,
934 + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x78,
935 + 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x29,
936 + 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
937 + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x63,
938 + 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65,
939 + 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
940 + 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20,
941 + 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, 0x22, 0x45,
942 + 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6c, 0x6f, 0x61,
943 + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x6c, 0x75,
944 + 0x67, 0x69, 0x6e, 0x20, 0x27, 0x25, 0x73, 0x27,
945 + 0x3a, 0x5c, 0x6e, 0x25, 0x73, 0x22, 0x0a, 0x20,
946 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73,
947 + 0x65, 0x6c, 0x66, 0x3a, 0x66, 0x61, 0x69, 0x6c,
948 + 0x65, 0x64, 0x28, 0x6d, 0x73, 0x67, 0x3a, 0x66,
949 + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x6d, 0x6f,
950 + 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
951 + 0x65, 0x2c, 0x20, 0x74, 0x6f, 0x73, 0x74, 0x72,
952 + 0x69, 0x6e, 0x67, 0x28, 0x72, 0x65, 0x73, 0x75,
953 + 0x6c, 0x74, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20,
954 + 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20,
955 + 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79,
956 + 0x70, 0x65, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c,
957 + 0x74, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x74,
958 + 0x61, 0x62, 0x6c, 0x65, 0x27, 0x20, 0x74, 0x68,
959 + 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
960 + 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e,
961 + 0x70, 0x72, 0x69, 0x76, 0x2e, 0x6d, 0x6f, 0x64,
962 + 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68,
963 + 0x65, 0x5b, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
964 + 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x61,
965 + 0x6c, 0x73, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x20,
966 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63,
967 + 0x61, 0x6c, 0x20, 0x6d, 0x73, 0x67, 0x20, 0x3d,
968 + 0x20, 0x22, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20,
969 + 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20,
970 + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x27,
971 + 0x25, 0x73, 0x27, 0x3a, 0x20, 0x65, 0x78, 0x70,
972 + 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x61,
973 + 0x62, 0x6c, 0x65, 0x2c, 0x20, 0x67, 0x6f, 0x74,
974 + 0x3a, 0x20, 0x25, 0x73, 0x20, 0x28, 0x25, 0x73,
975 + 0x29, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
976 + 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a,
977 + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x28, 0x6d,
978 + 0x73, 0x67, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61,
979 + 0x74, 0x28, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
980 + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x74,
981 + 0x79, 0x70, 0x65, 0x28, 0x72, 0x65, 0x73, 0x75,
982 + 0x6c, 0x74, 0x29, 0x2c, 0x20, 0x74, 0x6f, 0x73,
983 + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x72, 0x65,
984 + 0x73, 0x75, 0x6c, 0x74, 0x29, 0x29, 0x29, 0x0a,
985 + 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
986 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c,
987 + 0x66, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x2e, 0x6d,
988 + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x61,
989 + 0x63, 0x68, 0x65, 0x5b, 0x66, 0x69, 0x6c, 0x65,
990 + 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20,
991 + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x0a, 0x20,
992 + 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e,
993 + 0x70, 0x72, 0x69, 0x76, 0x2e, 0x65, 0x78, 0x74,
994 + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63,
995 + 0x61, 0x63, 0x68, 0x65, 0x5b, 0x66, 0x69, 0x6c,
996 + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d,
997 + 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
998 + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74,
999 + 0x72, 0x75, 0x65, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
1000 + 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
1001 + 0x6e, 0x20, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x3a,
1002 + 0x66, 0x69, 0x6e, 0x64, 0x5f, 0x65, 0x78, 0x74,
1003 + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
1004 + 0x79, 0x70, 0x65, 0x28, 0x66, 0x69, 0x6c, 0x65,
1005 + 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x67, 0x74,
1006 + 0x79, 0x70, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20,
1007 + 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d,
1008 + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x74,
1009 + 0x79, 0x70, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x73,
1010 + 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x72, 0x69, 0x76,
1011 + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
1012 + 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65,
1013 + 0x5b, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d,
1014 + 0x65, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
1015 + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x74,
1016 + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
1017 + 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x6d, 0x6f,
1018 + 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x74, 0x79,
1019 + 0x70, 0x65, 0x73, 0x5b, 0x67, 0x74, 0x79, 0x70,
1020 + 0x65, 0x5d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20,
1021 + 0x69, 0x66, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e,
1022 + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70,
1023 + 0x65, 0x20, 0x7e, 0x3d, 0x20, 0x6e, 0x69, 0x6c,
1024 + 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
1025 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
1026 + 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
1027 + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20,
1028 + 0x3d, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
1029 + 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
1030 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1031 + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
1032 + 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20,
1033 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64,
1034 + 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1035 + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
1036 + 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
1037 + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x0a,
1038 + 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
1039 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72,
1040 + 0x20, 0x5f, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75,
1041 + 0x65, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x61, 0x69,
1042 + 0x72, 0x73, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e,
1043 + 0x70, 0x72, 0x69, 0x76, 0x2e, 0x6d, 0x6f, 0x64,
1044 + 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68,
1045 + 0x65, 0x5b, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61,
1046 + 0x6d, 0x65, 0x5d, 0x29, 0x20, 0x64, 0x6f, 0x0a,
1047 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1048 + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x76, 0x61,
1049 + 0x6c, 0x75, 0x65, 0x5f, 0x67, 0x74, 0x79, 0x70,
1050 + 0x65, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75,
1051 + 0x65, 0x2e, 0x5f, 0x67, 0x74, 0x79, 0x70, 0x65,
1052 + 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1053 + 0x20, 0x20, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c,
1054 + 0x75, 0x65, 0x5f, 0x67, 0x74, 0x79, 0x70, 0x65,
1055 + 0x20, 0x7e, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20,
1056 + 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
1057 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1058 + 0x20, 0x69, 0x66, 0x20, 0x47, 0x4f, 0x62, 0x6a,
1059 + 0x65, 0x63, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65,
1060 + 0x5f, 0x69, 0x73, 0x5f, 0x61, 0x28, 0x76, 0x61,
1061 + 0x6c, 0x75, 0x65, 0x5f, 0x67, 0x74, 0x79, 0x70,
1062 + 0x65, 0x2c, 0x20, 0x67, 0x74, 0x79, 0x70, 0x65,
1063 + 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20,
1064 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1065 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d,
1066 + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x74,
1067 + 0x79, 0x70, 0x65, 0x73, 0x5b, 0x67, 0x74, 0x79,
1068 + 0x70, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x61,
1069 + 0x6c, 0x75, 0x65, 0x5f, 0x67, 0x74, 0x79, 0x70,
1070 + 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1071 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1072 + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
1073 + 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x67,
1074 + 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x20,
1075 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1076 + 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20,
1077 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64,
1078 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64,
1079 + 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x6f,
1080 + 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x74, 0x79,
1081 + 0x70, 0x65, 0x73, 0x5b, 0x67, 0x74, 0x79, 0x70,
1082 + 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c,
1083 + 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72,
1084 + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69,
1085 + 0x6c, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c,
1086 + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e,
1087 + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68,
1088 + 0x65, 0x63, 0x6b, 0x5f, 0x6e, 0x61, 0x74, 0x69,
1089 + 0x76, 0x65, 0x28, 0x6e, 0x61, 0x74, 0x69, 0x76,
1090 + 0x65, 0x2c, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70,
1091 + 0x65, 0x64, 0x2c, 0x20, 0x74, 0x79, 0x70, 0x65,
1092 + 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20,
1093 + 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20,
1094 + 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, 0x28, 0x27,
1095 + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20,
1096 + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20,
1097 + 0x66, 0x6f, 0x72, 0x20, 0x25, 0x73, 0x3a, 0x20,
1098 + 0x25, 0x73, 0x27, 0x29, 0x3a, 0x66, 0x6f, 0x72,
1099 + 0x6d, 0x61, 0x74, 0x28, 0x74, 0x79, 0x70, 0x65,
1100 + 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x0a, 0x20, 0x20,
1101 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1102 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1103 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1104 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1105 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1106 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1107 + 0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x73, 0x74,
1108 + 0x72, 0x69, 0x6e, 0x67, 0x28, 0x77, 0x72, 0x61,
1109 + 0x70, 0x70, 0x65, 0x64, 0x29, 0x29, 0x0a, 0x0a,
1110 + 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x43,
1111 + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f,
1112 + 0x6d, 0x70, 0x61, 0x72, 0x65, 0x20, 0x75, 0x73,
1113 + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x20, 0x64,
1114 + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x21,
1115 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x73, 0x73,
1116 + 0x65, 0x72, 0x74, 0x28, 0x77, 0x72, 0x61, 0x70,
1117 + 0x70, 0x65, 0x64, 0x20, 0x7e, 0x3d, 0x20, 0x6e,
1118 + 0x69, 0x6c, 0x2c, 0x20, 0x6d, 0x73, 0x67, 0x29,
1119 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x73, 0x73,
1120 + 0x65, 0x72, 0x74, 0x28, 0x74, 0x6f, 0x73, 0x74,
1121 + 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6e, 0x61, 0x74,
1122 + 0x69, 0x76, 0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20,
1123 + 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
1124 + 0x28, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64,
1125 + 0x2e, 0x5f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
1126 + 0x29, 0x2c, 0x20, 0x6d, 0x73, 0x67, 0x29, 0x0a,
1127 + 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e,
1128 + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x48, 0x6f,
1129 + 0x6f, 0x6b, 0x73, 0x3a, 0x73, 0x65, 0x74, 0x75,
1130 + 0x70, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
1131 + 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x78, 0x74, 0x65,
1132 + 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x29,
1133 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63,
1134 + 0x61, 0x6c, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70,
1135 + 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
1136 + 0x20, 0x3d, 0x20, 0x47, 0x4f, 0x62, 0x6a, 0x65,
1137 + 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
1138 + 0x74, 0x28, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x2c,
1139 + 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
1140 + 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x65, 0x63,
1141 + 0x6b, 0x5f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
1142 + 0x28, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x2c, 0x20,
1143 + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f,
1144 + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x2c, 0x20, 0x27,
1145 + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
1146 + 0x6e, 0x27, 0x29, 0x0a, 0x0a, 0x20, 0x20, 0x20,
1147 + 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x77,
1148 + 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x69,
1149 + 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x50, 0x65,
1150 + 0x61, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69,
1151 + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x28, 0x69, 0x6e,
1152 + 0x66, 0x6f, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73,
1153 + 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63,
1154 + 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6e, 0x61, 0x74,
1155 + 0x69, 0x76, 0x65, 0x28, 0x69, 0x6e, 0x66, 0x6f,
1156 + 0x2c, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
1157 + 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2c, 0x20,
1158 + 0x27, 0x50, 0x65, 0x61, 0x73, 0x50, 0x6c, 0x75,
1159 + 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x27,
1160 + 0x29, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77,
1161 + 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x65,
1162 + 0x78, 0x74, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x69,
1163 + 0x76, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
1164 + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20,
1165 + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f,
1166 + 0x69, 0x6e, 0x66, 0x6f, 0x0a, 0x65, 0x6e, 0x64,
1167 + 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
1168 + 0x6f, 0x6e, 0x20, 0x48, 0x6f, 0x6f, 0x6b, 0x73,
1169 + 0x3a, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65,
1170 + 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
1171 + 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63,
1172 + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x67, 0x61,
1173 + 0x72, 0x62, 0x61, 0x67, 0x65, 0x28, 0x29, 0x0a,
1174 + 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x72, 0x65, 0x74,
1175 + 0x75, 0x72, 0x6e, 0x20, 0x48, 0x6f, 0x6f, 0x6b,
1176 + 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x28, 0x29, 0x0a,
1177 + 0x0a, 0x2d, 0x2d, 0x20, 0x65, 0x78, 0x3a, 0x74,
1178 + 0x73, 0x3d, 0x34, 0x3a, 0x65, 0x74, 0x3a, 0x0a,
1179 + 0x00, 0x00, 0x28, 0x75, 0x75, 0x61, 0x79, 0x29,
1180 + 0x6f, 0x72, 0x67, 0x2f, 0x01, 0x00, 0x00, 0x00,
1181 + 0x2f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1182 + 0x6c, 0x75, 0x61, 0x35, 0x2e, 0x31, 0x2f, 0x00,
1183 + 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1184 + 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2e, 0x6c,
1185 + 0x75, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1186 + 0xe8, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1187 + 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x43,
1188 + 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74,
1189 + 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x31,
1190 + 0x35, 0x20, 0x2d, 0x20, 0x47, 0x61, 0x72, 0x72,
1191 + 0x65, 0x74, 0x74, 0x20, 0x52, 0x65, 0x67, 0x69,
1192 + 0x65, 0x72, 0x0a, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d,
1193 + 0x20, 0x6c, 0x69, 0x62, 0x70, 0x65, 0x61, 0x73,
1194 + 0x20, 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65,
1195 + 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
1196 + 0x65, 0x3b, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63,
1197 + 0x61, 0x6e, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73,
1198 + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20,
1199 + 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f,
1200 + 0x72, 0x0a, 0x2d, 0x2d, 0x20, 0x6d, 0x6f, 0x64,
1201 + 0x69, 0x66, 0x79, 0x20, 0x69, 0x74, 0x20, 0x75,
1202 + 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65,
1203 + 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f,
1204 + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,
1205 + 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72,
1206 + 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
1207 + 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a,
1208 + 0x2d, 0x2d, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
1209 + 0x73, 0x65, 0x20, 0x61, 0x73, 0x20, 0x70, 0x75,
1210 + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20,
1211 + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46,
1212 + 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74,
1213 + 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75,
1214 + 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b,
1215 + 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x0a,
1216 + 0x2d, 0x2d, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
1217 + 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x31, 0x20, 0x6f,
1218 + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69,
1219 + 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x6f,
1220 + 0x72, 0x20, 0x28, 0x61, 0x74, 0x20, 0x79, 0x6f,
1221 + 0x75, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f,
1222 + 0x6e, 0x29, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,
1223 + 0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72,
1224 + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2d, 0x2d,
1225 + 0x0a, 0x2d, 0x2d, 0x20, 0x6c, 0x69, 0x62, 0x70,
1226 + 0x65, 0x61, 0x73, 0x20, 0x69, 0x73, 0x20, 0x64,
1227 + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
1228 + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68,
1229 + 0x65, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20, 0x74,
1230 + 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x77,
1231 + 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75,
1232 + 0x73, 0x65, 0x66, 0x75, 0x6c, 0x2c, 0x0a, 0x2d,
1233 + 0x2d, 0x20, 0x62, 0x75, 0x74, 0x20, 0x57, 0x49,
1234 + 0x54, 0x48, 0x4f, 0x55, 0x54, 0x20, 0x41, 0x4e,
1235 + 0x59, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e,
1236 + 0x54, 0x59, 0x3b, 0x20, 0x77, 0x69, 0x74, 0x68,
1237 + 0x6f, 0x75, 0x74, 0x20, 0x65, 0x76, 0x65, 0x6e,
1238 + 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6d, 0x70,
1239 + 0x6c, 0x69, 0x65, 0x64, 0x20, 0x77, 0x61, 0x72,
1240 + 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20, 0x6f, 0x66,
1241 + 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x45, 0x52, 0x43,
1242 + 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c,
1243 + 0x49, 0x54, 0x59, 0x20, 0x6f, 0x72, 0x20, 0x46,
1244 + 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46,
1245 + 0x4f, 0x52, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52,
1246 + 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20,
1247 + 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e,
1248 + 0x20, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68,
1249 + 0x65, 0x20, 0x47, 0x4e, 0x55, 0x0a, 0x2d, 0x2d,
1250 + 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20,
1251 + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20,
1252 + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c,
1253 + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66,
1254 + 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20,
1255 + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e,
1256 + 0x0a, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x59,
1257 + 0x6f, 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c,
1258 + 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72,
1259 + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20,
1260 + 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,
1261 + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,
1262 + 0x55, 0x20, 0x4c, 0x65, 0x73, 0x73, 0x65, 0x72,
1263 + 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
1264 + 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0a,
1265 + 0x2d, 0x2d, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
1266 + 0x73, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67,
1267 + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
1268 + 0x69, 0x73, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,
1269 + 0x72, 0x79, 0x3b, 0x20, 0x69, 0x66, 0x20, 0x6e,
1270 + 0x6f, 0x74, 0x2c, 0x20, 0x77, 0x72, 0x69, 0x74,
1271 + 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
1272 + 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f,
1273 + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0a, 0x2d,
1274 + 0x2d, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61,
1275 + 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e,
1276 + 0x63, 0x2e, 0x2c, 0x20, 0x35, 0x31, 0x20, 0x46,
1277 + 0x72, 0x61, 0x6e, 0x6b, 0x6c, 0x69, 0x6e, 0x20,
1278 + 0x53, 0x74, 0x2c, 0x20, 0x46, 0x69, 0x66, 0x74,
1279 + 0x68, 0x20, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x2c,
1280 + 0x20, 0x42, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x2c,
1281 + 0x20, 0x4d, 0x41, 0x20, 0x20, 0x30, 0x32, 0x31,
1282 + 0x31, 0x30, 0x2d, 0x31, 0x33, 0x30, 0x31, 0x20,
1283 + 0x20, 0x55, 0x53, 0x41, 0x2e, 0x0a, 0x2d, 0x2d,
1284 + 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x6f, 0x64, 0x69,
1285 + 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72,
1286 + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x3a,
1287 + 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f,
1288 + 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x75, 0x61, 0x2e,
1289 + 0x6c, 0x75, 0x61, 0x66, 0x6f, 0x72, 0x67, 0x65,
1290 + 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x72, 0x63,
1291 + 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x73, 0x74, 0x72,
1292 + 0x69, 0x63, 0x74, 0x2e, 0x6c, 0x75, 0x61, 0x2e,
1293 + 0x68, 0x74, 0x6d, 0x6c, 0x0a, 0x0a, 0x5f, 0x5f,
1294 + 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x3d,
1295 + 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, 0x0a, 0x6c,
1296 + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x74, 0x20,
1297 + 0x3d, 0x20, 0x67, 0x65, 0x74, 0x6d, 0x65, 0x74,
1298 + 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x5f,
1299 + 0x47, 0x29, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x74,
1300 + 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20,
1301 + 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
1302 + 0x20, 0x6d, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d,
1303 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x74,
1304 + 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c,
1305 + 0x65, 0x28, 0x5f, 0x47, 0x2c, 0x20, 0x6d, 0x74,
1306 + 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66,
1307 + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
1308 + 0x6d, 0x74, 0x3a, 0x5f, 0x5f, 0x6e, 0x65, 0x77,
1309 + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x28, 0x6e, 0x61,
1310 + 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75,
1311 + 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69,
1312 + 0x66, 0x20, 0x5f, 0x5f, 0x53, 0x54, 0x52, 0x49,
1313 + 0x43, 0x54, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
1314 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1315 + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x77, 0x68,
1316 + 0x61, 0x74, 0x20, 0x3d, 0x20, 0x64, 0x65, 0x62,
1317 + 0x75, 0x67, 0x2e, 0x67, 0x65, 0x74, 0x69, 0x6e,
1318 + 0x66, 0x6f, 0x28, 0x32, 0x2c, 0x20, 0x27, 0x53,
1319 + 0x27, 0x29, 0x2e, 0x77, 0x68, 0x61, 0x74, 0x0a,
1320 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1321 + 0x20, 0x69, 0x66, 0x20, 0x77, 0x68, 0x61, 0x74,
1322 + 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x43, 0x27, 0x20,
1323 + 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
1324 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1325 + 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22,
1326 + 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65,
1327 + 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x72, 0x65,
1328 + 0x61, 0x74, 0x65, 0x20, 0x67, 0x6c, 0x6f, 0x62,
1329 + 0x61, 0x6c, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61,
1330 + 0x62, 0x6c, 0x65, 0x20, 0x27, 0x22, 0x20, 0x2e,
1331 + 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1332 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1333 + 0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x73, 0x74,
1334 + 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6e, 0x61, 0x6d,
1335 + 0x65, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x27,
1336 + 0x22, 0x2c, 0x20, 0x32, 0x29, 0x0a, 0x20, 0x20,
1337 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e,
1338 + 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e,
1339 + 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72,
1340 + 0x61, 0x77, 0x73, 0x65, 0x74, 0x28, 0x73, 0x65,
1341 + 0x6c, 0x66, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65,
1342 + 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29,
1343 + 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75,
1344 + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,
1345 + 0x74, 0x3a, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65,
1346 + 0x78, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a,
1347 + 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e,
1348 + 0x6f, 0x74, 0x20, 0x5f, 0x5f, 0x53, 0x54, 0x52,
1349 + 0x49, 0x43, 0x54, 0x20, 0x6f, 0x72, 0x20, 0x64,
1350 + 0x65, 0x62, 0x75, 0x67, 0x2e, 0x67, 0x65, 0x74,
1351 + 0x69, 0x6e, 0x66, 0x6f, 0x28, 0x32, 0x2c, 0x20,
1352 + 0x27, 0x53, 0x27, 0x29, 0x2e, 0x77, 0x68, 0x61,
1353 + 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x43, 0x27,
1354 + 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
1355 + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
1356 + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x61, 0x77,
1357 + 0x67, 0x65, 0x74, 0x28, 0x73, 0x65, 0x6c, 0x66,
1358 + 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a,
1359 + 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
1360 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x72, 0x72,
1361 + 0x6f, 0x72, 0x28, 0x22, 0x41, 0x74, 0x74, 0x65,
1362 + 0x6d, 0x70, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f,
1363 + 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20,
1364 + 0x6e, 0x6f, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74,
1365 + 0x65, 0x6e, 0x74, 0x20, 0x22, 0x20, 0x2e, 0x2e,
1366 + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
1367 + 0x20, 0x20, 0x20, 0x22, 0x67, 0x6c, 0x6f, 0x62,
1368 + 0x61, 0x6c, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61,
1369 + 0x62, 0x6c, 0x65, 0x20, 0x27, 0x22, 0x20, 0x2e,
1370 + 0x2e, 0x20, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69,
1371 + 0x6e, 0x67, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29,
1372 + 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x27, 0x22, 0x2c,
1373 + 0x20, 0x32, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
1374 + 0x0a, 0x2d, 0x2d, 0x20, 0x65, 0x78, 0x3a, 0x74,
1375 + 0x73, 0x3d, 0x34, 0x3a, 0x65, 0x74, 0x3a, 0x0a,
1376 + 0x00, 0x00, 0x28, 0x75, 0x75, 0x61, 0x79, 0x29,
1377 + 0x6c, 0x69, 0x62, 0x70, 0x65, 0x61, 0x73, 0x2f,
1378 + 0x00, 0x00, 0x00, 0x00
1381 +static GStaticResource static_resource = { peas_lua_resource_data.data, sizeof (peas_lua_resource_data.data), NULL, NULL, NULL };
1382 +G_GNUC_INTERNAL GResource *peas_lua_get_resource (void);
1383 +GResource *peas_lua_get_resource (void)
1385 + return g_static_resource_get_resource (&static_resource);
1388 + If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
1389 + destructors, in a sane way, including e.g. on library unload. If not you're on
1392 + Some compilers need #pragma to handle this, which does not work with macros,
1393 + so the way you need to use this is (for constructors):
1395 + #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
1396 + #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
1398 + G_DEFINE_CONSTRUCTOR(my_constructor)
1399 + static void my_constructor(void) {
1405 +#ifndef __GTK_DOC_IGNORE__
1407 +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
1409 +#define G_HAS_CONSTRUCTORS 1
1411 +#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
1412 +#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
1414 +#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
1415 +/* Visual studio 2008 and later has _Pragma */
1417 +#define G_HAS_CONSTRUCTORS 1
1419 +#define G_DEFINE_CONSTRUCTOR(_func) \
1420 + static void _func(void); \
1421 + static int _func ## _wrapper(void) { _func(); return 0; } \
1422 + __pragma(section(".CRT$XCU",read)) \
1423 + __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _wrapper;
1425 +#define G_DEFINE_DESTRUCTOR(_func) \
1426 + static void _func(void); \
1427 + static int _func ## _constructor(void) { atexit (_func); return 0; } \
1428 + __pragma(section(".CRT$XCU",read)) \
1429 + __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
1431 +#elif defined (_MSC_VER)
1433 +#define G_HAS_CONSTRUCTORS 1
1435 +/* Pre Visual studio 2008 must use #pragma section */
1436 +#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
1437 +#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
1439 +#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
1440 + section(".CRT$XCU",read)
1441 +#define G_DEFINE_CONSTRUCTOR(_func) \
1442 + static void _func(void); \
1443 + static int _func ## _wrapper(void) { _func(); return 0; } \
1444 + __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;
1446 +#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
1447 + section(".CRT$XCU",read)
1448 +#define G_DEFINE_DESTRUCTOR(_func) \
1449 + static void _func(void); \
1450 + static int _func ## _constructor(void) { atexit (_func); return 0; } \
1451 + __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
1453 +#elif defined(__SUNPRO_C)
1455 +/* This is not tested, but i believe it should work, based on:
1456 + * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
1459 +#define G_HAS_CONSTRUCTORS 1
1461 +#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
1462 +#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
1464 +#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
1466 +#define G_DEFINE_CONSTRUCTOR(_func) \
1467 + static void _func(void);
1469 +#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
1471 +#define G_DEFINE_DESTRUCTOR(_func) \
1472 + static void _func(void);
1476 +/* constructors not supported for this compiler */
1480 +#endif /* __GTK_DOC_IGNORE__ */
1482 +#ifdef G_HAS_CONSTRUCTORS
1484 +#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
1485 +#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(resource_constructor)
1487 +G_DEFINE_CONSTRUCTOR(resource_constructor)
1488 +#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
1489 +#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(resource_destructor)
1491 +G_DEFINE_DESTRUCTOR(resource_destructor)
1494 +#warning "Constructor not supported on this compiler, linking in resources will not work"
1497 +static void resource_constructor (void)
1499 + g_static_resource_init (&static_resource);
1502 +static void resource_destructor (void)
1504 + g_static_resource_fini (&static_resource);
1506 --- libpeas-1.20.0/loaders/lua5.2/peas-lua-utils.c 1969-12-31 16:00:00.000000000 -0800
1507 +++ libpeas-1.20.0/loaders/lua5.2/peas-lua-utils.c 2015-06-25 22:36:33.456708211 -0700
1510 + * peas-lua-utils.c
1511 + * This file is part of libpeas
1513 + * Copyright (C) 2014-2015 - Garrett Regier
1515 + * libpeas is free software; you can redistribute it and/or
1516 + * modify it under the terms of the GNU Lesser General Public
1517 + * License as published by the Free Software Foundation; either
1518 + * version 2.1 of the License, or (at your option) any later version.
1520 + * libpeas is distributed in the hope that it will be useful,
1521 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1522 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1523 + * Lesser General Public License for more details.
1525 + * You should have received a copy of the GNU Lesser General Public
1526 + * License along with this library; if not, write to the Free Software
1527 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1530 +#ifdef HAVE_CONFIG_H
1531 +#include <config.h>
1534 +#include "peas-lua-utils.h"
1536 +#include <gio/gio.h>
1538 +#include <lauxlib.h>
1542 +peas_lua_utils_require (lua_State *L,
1543 + const gchar *name)
1545 + luaL_checkstack (L, 2, "");
1547 + lua_getglobal (L, "require");
1548 + lua_pushstring (L, name);
1550 + if (lua_pcall (L, 1, 1, 0) != 0)
1552 + g_warning ("Error failed to load Lua module '%s': %s",
1553 + name, lua_tostring (L, -1));
1560 + if (!lua_istable (L, -1))
1562 + g_warning ("Error invalid Lua module for '%s': "
1563 + "expected table, got: %s",
1564 + name, lua_tostring (L, -1));
1566 + /* Pop the module's table */
1575 +peas_lua_utils_check_version (lua_State *L,
1580 + const gchar *version_str;
1581 + gchar **version_str_parts;
1582 + gint n_version_parts;
1583 + gint *version_parts;
1585 + gboolean success = FALSE;
1587 + lua_getfield (L, -1, "_VERSION");
1588 + version_str = lua_tostring (L, -1);
1590 + version_str_parts = g_strsplit (version_str, ".", 0);
1592 + n_version_parts = g_strv_length (version_str_parts);
1593 + version_parts = g_newa (gint, n_version_parts);
1595 + for (i = 0; i < n_version_parts; ++i)
1599 + version_parts[i] = g_ascii_strtoll (version_str_parts[i], &end, 10);
1601 + if (*end != '\0' ||
1602 + version_parts[i] < 0 ||
1603 + version_parts[i] == G_MAXINT64)
1605 + g_warning ("Invalid version string: %s", version_str);
1610 + if (n_version_parts < 3 ||
1611 + version_parts[0] != req_major ||
1612 + version_parts[1] < req_minor ||
1613 + (version_parts[1] == req_minor && version_parts[2] < req_micro))
1615 + g_warning ("Version mismatch %d.%d.%d is required, found %s",
1616 + req_major, req_minor, req_micro, version_str);
1624 + /* Pop _VERSION */
1627 + g_strfreev (version_str_parts);
1632 +traceback (lua_State *L)
1634 + /* Always ignore an error that isn't a string */
1635 + if (!lua_isstring (L, 1))
1638 + lua_getglobal (L, "debug");
1639 + if (!lua_istable (L, -1))
1645 + lua_getfield (L, -1, "traceback");
1646 + if (!lua_isfunction (L, -1))
1652 + /* Replace debug with traceback */
1653 + lua_replace (L, -2);
1655 + /* Push the error */
1656 + lua_pushvalue (L, 1);
1658 + /* Skip this function when generating the traceback */
1659 + lua_pushinteger (L, 2);
1661 + /* If we fail we have a new error object... */
1662 + lua_pcall (L, 2, 1, 0);
1667 +peas_lua_utils_call (lua_State *L,
1673 + /* Push the error function */
1674 + lua_pushcfunction (L, traceback);
1676 + /* Move traceback to before the arguments */
1677 + lua_insert (L, -2 - n_args);
1679 + success = lua_pcall (L, n_args, n_results, -2 - n_args) == 0;
1681 + /* Remove traceback */
1682 + lua_remove (L, -1 - (success ? n_results : 1));
1687 +peas_lua_utils_load_resource (lua_State *L,
1688 + const gchar *name,
1692 + gchar *resource_path;
1693 + GBytes *lua_resource;
1694 + const gchar *code;
1696 + gchar *lua_filename;
1698 + /* We don't use the byte-compiled Lua source
1699 + * because glib-compile-resources cannot output
1700 + * depends for generated files.
1702 + * There are also concerns that the bytecode is
1703 + * not stable enough between different Lua versions.
1705 + * https://bugzilla.gnome.org/show_bug.cgi?id=673101
1707 + resource_path = g_strconcat ("/org/gnome/libpeas/loaders/lua5.2/",
1709 + lua_resource = g_resources_lookup_data (resource_path,
1710 + G_RESOURCE_LOOKUP_FLAGS_NONE,
1712 + g_free (resource_path);
1714 + if (lua_resource == NULL)
1716 + g_warning ("Failed to find '%s' resource", name);
1720 + code = g_bytes_get_data (lua_resource, &code_len);
1722 + /* Filenames are prefixed with '@' */
1723 + lua_filename = g_strconcat ("@peas-lua-", name, NULL);
1725 + if (luaL_loadbuffer (L, code, code_len, lua_filename) != 0)
1727 + g_warning ("Failed to load '%s' resource: %s",
1728 + name, lua_tostring (L, -1));
1732 + g_free (lua_filename);
1733 + g_bytes_unref (lua_resource);
1737 + g_free (lua_filename);
1738 + g_bytes_unref (lua_resource);
1740 + if (!peas_lua_utils_call (L, n_args, n_results))
1742 + g_warning ("Failed to run '%s' resource: %s",
1743 + name, lua_tostring (L, -1));
1752 --- libpeas-1.20.0/loaders/lua5.2/peas-lua-utils.h 1969-12-31 16:00:00.000000000 -0800
1753 +++ libpeas-1.20.0/loaders/lua5.2/peas-lua-utils.h 2015-06-25 22:36:33.458778831 -0700
1756 + * peas-lua-utils.h
1757 + * This file is part of libpeas
1759 + * Copyright (C) 2014-2015 - Garrett Regier
1761 + * libpeas is free software; you can redistribute it and/or
1762 + * modify it under the terms of the GNU Lesser General Public
1763 + * License as published by the Free Software Foundation; either
1764 + * version 2.1 of the License, or (at your option) any later version.
1766 + * libpeas is distributed in the hope that it will be useful,
1767 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1768 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1769 + * Lesser General Public License for more details.
1771 + * You should have received a copy of the GNU Lesser General Public
1772 + * License along with this library; if not, write to the Free Software
1773 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1776 +#ifndef __PEAS_LUA_UTILS_H__
1777 +#define __PEAS_LUA_UTILS_H__
1785 +gboolean peas_lua_utils_require (lua_State *L,
1786 + const gchar *name);
1788 +gboolean peas_lua_utils_check_version (lua_State *L,
1793 +gboolean peas_lua_utils_call (lua_State *L,
1797 +gboolean peas_lua_utils_load_resource (lua_State *L,
1798 + const gchar *name,
1804 +#endif /* __PEAS_LUA_UTILS_H__ */
1805 --- libpeas-1.20.0/loaders/lua5.2/peas-plugin-loader-lua.c 1969-12-31 16:00:00.000000000 -0800
1806 +++ libpeas-1.20.0/loaders/lua5.2/peas-plugin-loader-lua.c 2015-06-25 22:36:33.455653941 -0700
1809 + * peas-plugin-loader-lua.c
1810 + * This file is part of libpeas
1812 + * Copyright (C) 2014-2015 - Garrett Regier
1814 + * libpeas is free software; you can redistribute it and/or
1815 + * modify it under the terms of the GNU Lesser General Public
1816 + * License as published by the Free Software Foundation; either
1817 + * version 2.1 of the License, or (at your option) any later version.
1819 + * libpeas is distributed in the hope that it will be useful,
1820 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1821 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1822 + * Lesser General Public License for more details.
1824 + * You should have received a copy of the GNU Lesser General Public
1825 + * License along with this library; if not, write to the Free Software
1826 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1829 +#ifdef HAVE_CONFIG_H
1830 +#include <config.h>
1833 +#include "peas-plugin-loader-lua.h"
1834 +#include "libpeas/peas-plugin-info-priv.h"
1836 +#include <string.h>
1839 +#include <lauxlib.h>
1840 +#include <lualib.h>
1842 +#include "peas-lua-internal.h"
1843 +#include "peas-lua-utils.h"
1846 +typedef void (* LgiLockFunc) (gpointer lgi_lock);
1852 + gpointer lgi_lock;
1853 + LgiLockFunc lgi_enter_func;
1854 + LgiLockFunc lgi_leave_func;
1855 +} PeasPluginLoaderLuaPrivate;
1857 +G_DEFINE_TYPE_WITH_PRIVATE (PeasPluginLoaderLua,
1858 + peas_plugin_loader_lua,
1859 + PEAS_TYPE_PLUGIN_LOADER)
1861 +#define GET_PRIV(o) \
1862 + (peas_plugin_loader_lua_get_instance_private (o))
1865 +G_DEFINE_QUARK (peas-extension-type, extension_type)
1867 +G_MODULE_EXPORT void
1868 +peas_register_types (PeasObjectModule *module)
1870 + peas_object_module_register_extension_type (module,
1871 + PEAS_TYPE_PLUGIN_LOADER,
1872 + PEAS_TYPE_PLUGIN_LOADER_LUA);
1876 +thread_enter (PeasPluginLoaderLua *lua_loader,
1877 + PeasPluginInfo *info)
1879 + PeasPluginLoaderLuaPrivate *priv = GET_PRIV (lua_loader);
1880 + lua_State *L = priv->L;
1881 + lua_State *NL = info->loader_data;
1883 + priv->lgi_enter_func (priv->lgi_lock);
1887 + /* We should never have multiple values on the stack */
1888 + g_assert_cmpint (lua_gettop (NL), ==, 0);
1892 + luaL_checkstack (L, 2, "");
1894 + lua_pushlightuserdata (L, info);
1895 + NL = lua_newthread (L);
1896 + lua_rawset (L, LUA_REGISTRYINDEX);
1898 + info->loader_data = NL;
1905 +thread_leave (PeasPluginLoaderLua *lua_loader,
1906 + PeasPluginInfo *info,
1907 + lua_State **L_ptr)
1909 + PeasPluginLoaderLuaPrivate *priv = GET_PRIV (lua_loader);
1910 + lua_State *L = info->loader_data;
1912 + g_assert (*L_ptr == L);
1915 + /* The stack should always be empty */
1916 + g_assert_cmpint (lua_gettop (L), ==, 0);
1918 + priv->lgi_leave_func (priv->lgi_lock);
1922 +find_lua_extension_type (lua_State *L,
1923 + PeasPluginInfo *info,
1926 + luaL_checkstack (L, 2, "");
1927 + lua_pushstring (L, info->filename);
1928 + lua_pushlightuserdata (L, GSIZE_TO_POINTER (exten_type));
1930 + if (peas_lua_internal_call (L, "find_extension_type",
1931 + 2, LUA_TLIGHTUSERDATA))
1933 + GType extension_type;
1935 + extension_type = (GType) lua_touserdata (L, -1);
1938 + if (g_type_is_a (extension_type, exten_type))
1939 + return extension_type;
1941 + g_warning ("Found invalid extension type '%s' for '%s'",
1942 + g_type_name (extension_type), g_type_name (exten_type));
1945 + return G_TYPE_INVALID;
1949 +peas_plugin_loader_lua_provides_extension (PeasPluginLoader *loader,
1950 + PeasPluginInfo *info,
1953 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
1957 + L = thread_enter (lua_loader, info);
1959 + the_type = find_lua_extension_type (L, info, exten_type);
1961 + thread_leave (lua_loader, info, &L);
1962 + return the_type != G_TYPE_INVALID;
1965 +static PeasExtension *
1966 +peas_plugin_loader_lua_create_extension (PeasPluginLoader *loader,
1967 + PeasPluginInfo *info,
1969 + guint n_parameters,
1970 + GParameter *parameters)
1972 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
1975 + GObject *object = NULL;
1977 + L = thread_enter (lua_loader, info);
1979 + the_type = find_lua_extension_type (L, info, exten_type);
1980 + if (the_type == G_TYPE_INVALID)
1983 + object = g_object_newv (the_type, n_parameters, parameters);
1984 + if (object == NULL)
1987 + /* We have to remember which interface we are instantiating
1988 + * for the deprecated peas_extension_get_extension_type().
1990 + g_object_set_qdata (object, extension_type_quark (),
1991 + GSIZE_TO_POINTER (exten_type));
1993 + luaL_checkstack (L, 2, "");
1994 + lua_pushlightuserdata (L, object);
1995 + lua_pushlightuserdata (L, info);
1997 + if (!peas_lua_internal_call (L, "setup_extension", 2, LUA_TNIL))
1998 + g_clear_object (&object);
2002 + thread_leave (lua_loader, info, &L);
2007 +peas_plugin_loader_lua_load (PeasPluginLoader *loader,
2008 + PeasPluginInfo *info)
2010 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
2012 + gboolean success = FALSE;
2014 + L = thread_enter (lua_loader, info);
2016 + luaL_checkstack (L, 3, "");
2017 + lua_pushstring (L, info->filename);
2018 + lua_pushstring (L, peas_plugin_info_get_module_dir (info));
2019 + lua_pushstring (L, peas_plugin_info_get_module_name (info));
2021 + if (peas_lua_internal_call (L, "load", 3, LUA_TBOOLEAN))
2023 + success = lua_toboolean (L, -1);
2027 + thread_leave (lua_loader, info, &L);
2032 +peas_plugin_loader_lua_unload (PeasPluginLoader *loader,
2033 + PeasPluginInfo *info)
2035 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
2036 + PeasPluginLoaderLuaPrivate *priv = GET_PRIV (lua_loader);
2037 + lua_State *L = priv->L;
2039 + priv->lgi_enter_func (priv->lgi_lock);
2041 + /* The stack should always be empty */
2042 + g_assert_cmpint (lua_gettop (info->loader_data), ==, 0);
2044 + /* Delete the thread's reference */
2045 + lua_pushlightuserdata (L, info);
2047 + lua_rawset (L, LUA_REGISTRYINDEX);
2049 + info->loader_data = NULL;
2051 + priv->lgi_leave_func (priv->lgi_lock);
2055 +peas_plugin_loader_lua_garbage_collect (PeasPluginLoader *loader)
2057 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
2058 + PeasPluginLoaderLuaPrivate *priv = GET_PRIV (lua_loader);
2059 + lua_State *L = priv->L;
2061 + priv->lgi_enter_func (priv->lgi_lock);
2063 + peas_lua_internal_call (L, "garbage_collect", 0, LUA_TNIL);
2065 + priv->lgi_leave_func (priv->lgi_lock);
2069 +atpanic_handler (lua_State *L)
2076 +peas_plugin_loader_lua_initialize (PeasPluginLoader *loader)
2078 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
2079 + PeasPluginLoaderLuaPrivate *priv = GET_PRIV (lua_loader);
2082 + priv->L = L = luaL_newstate ();
2085 + g_critical ("Failed to allocate lua_State");
2089 + /* Set before any other code is run */
2090 + if (g_getenv ("PEAS_LUA_DEBUG") != NULL)
2091 + lua_atpanic (L, atpanic_handler);
2093 + luaL_openlibs (L);
2095 + if (!peas_lua_utils_load_resource (L, "strict.lua", 0, 0) ||
2096 + !peas_lua_utils_require (L, "lgi") ||
2097 + !peas_lua_utils_check_version (L,
2098 + LGI_MAJOR_VERSION,
2099 + LGI_MINOR_VERSION,
2100 + LGI_MICRO_VERSION))
2102 + /* Already warned */
2106 + lua_pushliteral (L, "lock");
2107 + lua_rawget (L, -2);
2108 + priv->lgi_lock = lua_touserdata (L, -1);
2111 + lua_pushliteral (L, "enter");
2112 + lua_rawget (L, -2);
2113 + priv->lgi_enter_func = lua_touserdata (L, -1);
2116 + lua_pushliteral (L, "leave");
2117 + lua_rawget (L, -2);
2118 + priv->lgi_leave_func = lua_touserdata (L, -1);
2121 + if (priv->lgi_lock == NULL ||
2122 + priv->lgi_enter_func == NULL ||
2123 + priv->lgi_leave_func == NULL)
2125 + g_warning ("Failed to find 'lgi.lock', 'lgi.enter' and 'lgi.leave'");
2129 + /* Pop lgi's module table */
2132 + if (!peas_lua_internal_setup (L))
2134 + /* Already warned */
2138 + /* Assert that no values were leaked to the stack */
2139 + g_assert_cmpint (lua_gettop (L), ==, 0);
2141 + /* Initially the lock is taken by LGI,
2142 + * release as we are not running Lua code
2144 + priv->lgi_leave_func (priv->lgi_lock);
2149 +peas_plugin_loader_lua_is_global (PeasPluginLoader *loader)
2155 +peas_plugin_loader_lua_init (PeasPluginLoaderLua *lua_loader)
2160 +peas_plugin_loader_lua_finalize (GObject *object)
2162 + PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (object);
2163 + PeasPluginLoaderLuaPrivate *priv = GET_PRIV (lua_loader);
2165 + /* Must take the lock as Lua code will run on lua_close
2166 + * and another thread might be running Lua code already
2168 + if (priv->lgi_enter_func != NULL)
2169 + priv->lgi_enter_func (priv->lgi_lock);
2171 + peas_lua_internal_shutdown (priv->L);
2172 + g_clear_pointer (&priv->L, (GDestroyNotify) lua_close);
2174 + G_OBJECT_CLASS (peas_plugin_loader_lua_parent_class)->finalize (object);
2178 +peas_plugin_loader_lua_class_init (PeasPluginLoaderLuaClass *klass)
2180 + GObjectClass *object_class = G_OBJECT_CLASS (klass);
2181 + PeasPluginLoaderClass *loader_class = PEAS_PLUGIN_LOADER_CLASS (klass);
2183 + object_class->finalize = peas_plugin_loader_lua_finalize;
2185 + loader_class->initialize = peas_plugin_loader_lua_initialize;
2186 + loader_class->is_global = peas_plugin_loader_lua_is_global;
2187 + loader_class->load = peas_plugin_loader_lua_load;
2188 + loader_class->unload = peas_plugin_loader_lua_unload;
2189 + loader_class->create_extension = peas_plugin_loader_lua_create_extension;
2190 + loader_class->provides_extension = peas_plugin_loader_lua_provides_extension;
2191 + loader_class->garbage_collect = peas_plugin_loader_lua_garbage_collect;
2193 --- libpeas-1.20.0/loaders/lua5.2/peas-plugin-loader-lua.h 1969-12-31 16:00:00.000000000 -0800
2194 +++ libpeas-1.20.0/loaders/lua5.2/peas-plugin-loader-lua.h 2015-06-25 22:36:33.459354387 -0700
2197 + * peas-plugin-loader-lua.h
2198 + * This file is part of libpeas
2200 + * Copyright (C) 2014 - Garrett Regier
2202 + * libpeas is free software; you can redistribute it and/or
2203 + * modify it under the terms of the GNU Lesser General Public
2204 + * License as published by the Free Software Foundation; either
2205 + * version 2.1 of the License, or (at your option) any later version.
2207 + * libpeas is distributed in the hope that it will be useful,
2208 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2209 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2210 + * Lesser General Public License for more details.
2212 + * You should have received a copy of the GNU Lesser General Public
2213 + * License along with this library; if not, write to the Free Software
2214 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2217 +#ifndef __PEAS_PLUGIN_LOADER_LUA_H__
2218 +#define __PEAS_PLUGIN_LOADER_LUA_H__
2220 +#include <libpeas/peas-plugin-loader.h>
2221 +#include <libpeas/peas-object-module.h>
2225 +#define PEAS_TYPE_PLUGIN_LOADER_LUA (peas_plugin_loader_lua_get_type ())
2226 +#define PEAS_PLUGIN_LOADER_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLua))
2227 +#define PEAS_PLUGIN_LOADER_LUA_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLua const))
2228 +#define PEAS_PLUGIN_LOADER_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLuaClass))
2229 +#define PEAS_IS_PLUGIN_LOADER_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA))
2230 +#define PEAS_IS_PLUGIN_LOADER_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PEAS_TYPE_PLUGIN_LOADER_LUA))
2231 +#define PEAS_PLUGIN_LOADER_LUA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLuaClass))
2233 +typedef struct _PeasPluginLoaderLua PeasPluginLoaderLua;
2234 +typedef struct _PeasPluginLoaderLuaClass PeasPluginLoaderLuaClass;
2236 +struct _PeasPluginLoaderLua {
2237 + PeasPluginLoader parent;
2240 +struct _PeasPluginLoaderLuaClass {
2241 + PeasPluginLoaderClass parent_class;
2244 +GType peas_plugin_loader_lua_get_type (void) G_GNUC_CONST;
2246 +/* All the loaders must implement this function */
2247 +G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
2251 +#endif /* __PEAS_PLUGIN_LOADER_LUA_H__ */
2253 --- libpeas-1.20.0/loaders/lua5.2/resources/Makefile.am 1969-12-31 16:00:00.000000000 -0800
2254 +++ libpeas-1.20.0/loaders/lua5.2/resources/Makefile.am 2015-06-25 22:36:33.457213770 -0700
2257 + peas-lua-internal.lua \
2258 + peas-lua-strict.lua
2260 +LUAC_FILES = $(addsuffix c,$(LUA_FILES))
2263 + $(AM_V_GEN) $(LUA52_BIN) $(srcdir)/peas-lua-compile.lua $< $@
2265 +all-local: $(LUAC_FILES)
2271 + peas-lua-compile.lua \
2272 + peas-lua.gresource.xml \
2275 --- libpeas-1.20.0/loaders/lua5.2/resources/peas-lua-compile.lua 1969-12-31 16:00:00.000000000 -0800
2276 +++ libpeas-1.20.0/loaders/lua5.2/resources/peas-lua-compile.lua 2015-06-25 22:36:33.457043821 -0700
2279 +-- Copyright (C) 2015 - Garrett Regier
2281 +-- libpeas is free software; you can redistribute it and/or
2282 +-- modify it under the terms of the GNU Lesser General Public
2283 +-- License as published by the Free Software Foundation; either
2284 +-- version 2.1 of the License, or (at your option) any later version.
2286 +-- libpeas is distributed in the hope that it will be useful,
2287 +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
2288 +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2289 +-- Lesser General Public License for more details.
2291 +-- You should have received a copy of the GNU Lesser General Public
2292 +-- License along with this library; if not, write to the Free Software
2293 +-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2295 +local io = require 'io'
2296 +local os = require 'os'
2299 +local function check(err, format, ...)
2300 + if err == nil then
2304 + io.stderr:write(('Error: %s:\n%s\n'):format(format:format(...), err))
2309 +local function main(arg)
2310 + for i = 1, #arg, 2 do
2311 + local filename = arg[i]
2312 + local output = arg[i + 1]
2314 + local input_file, err = io.open(filename, 'rb')
2315 + check(err, 'Failed to open file "%s"', filename)
2317 + -- Error includes the filename
2318 + local compiled, err = loadstring(input_file:read('*a'),
2320 + check(err, 'Invalid Lua file')
2322 + local f, err = io.open(output, 'wb')
2323 + check(err, 'Failed to open file "%s"', output)
2325 + local success, err = f:write(string.dump(compiled))
2326 + check(err, 'Failed to write to "%s"', output)
2328 + local success, err = f:close()
2329 + check(err, 'Failed to save "%s"', output)
2334 +os.exit(main(arg) or 0)
2337 --- libpeas-1.20.0/loaders/lua5.2/resources/peas-lua-internal.lua 1969-12-31 16:00:00.000000000 -0800
2338 +++ libpeas-1.20.0/loaders/lua5.2/resources/peas-lua-internal.lua 2015-06-25 22:36:33.458365048 -0700
2341 +-- Copyright (C) 2015 - Garrett Regier
2343 +-- libpeas is free software; you can redistribute it and/or
2344 +-- modify it under the terms of the GNU Lesser General Public
2345 +-- License as published by the Free Software Foundation; either
2346 +-- version 2.1 of the License, or (at your option) any later version.
2348 +-- libpeas is distributed in the hope that it will be useful,
2349 +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
2350 +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2351 +-- Lesser General Public License for more details.
2353 +-- You should have received a copy of the GNU Lesser General Public
2354 +-- License along with this library; if not, write to the Free Software
2355 +-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2357 +local debug = require 'debug'
2358 +local package = require 'package'
2360 +local lgi = require 'lgi'
2361 +local GObject = lgi.GObject
2362 +local Peas = lgi.Peas
2366 +Hooks.__index = Hooks
2369 + local self = { priv = {} }
2370 + setmetatable(self, Hooks)
2372 + self.priv.module_cache = {}
2373 + self.priv.extension_cache = {}
2377 +function Hooks:failed(msg)
2378 + -- This is implemented by the plugin loader
2379 + error('Hooks:failed() was not implemented!')
2382 +local function add_package_path(package_path)
2383 + local paths = (';%s/?.lua;%s/?/init.lua'):format(package_path,
2386 + if not package.path:find(paths, 1, true) then
2387 + package.path = package.path .. paths
2391 +local function format_plugin_exception(err)
2392 + -- Format the error even if given a userdata
2393 + local formatted = debug.traceback(tostring(err), 2)
2395 + if type(formatted) ~= 'string' then
2399 + -- Remove all mentions of this file
2401 + for line in formatted:gmatch('([^\n]+\n?)') do
2402 + if line:find('peas-lua-internal.lua', 1, true) then
2406 + table.insert(lines, line)
2409 + return table.concat(lines, '')
2412 +function Hooks:load(filename, module_dir, module_name)
2413 + local module = self.priv.module_cache[filename]
2415 + if module ~= nil then
2416 + return module ~= false
2419 + if package.loaded[module_name] ~= nil then
2420 + local msg = ("Error loading plugin '%s': " ..
2421 + "module name '%s' has already been used")
2422 + self:failed(msg:format(filename, module_name))
2425 + add_package_path(module_dir)
2427 + local success, result = xpcall(function()
2428 + return require(module_name)
2429 + end, format_plugin_exception)
2431 + if not success then
2432 + local msg = "Error loading plugin '%s':\n%s"
2433 + self:failed(msg:format(module_name, tostring(result)))
2436 + if type(result) ~= 'table' then
2437 + self.priv.module_cache[filename] = false
2439 + local msg = "Error loading plugin '%s': expected table, got: %s (%s)"
2440 + self:failed(msg:format(module_name, type(result), tostring(result)))
2443 + self.priv.module_cache[filename] = result
2444 + self.priv.extension_cache[filename] = {}
2448 +function Hooks:find_extension_type(filename, gtype)
2449 + local module_gtypes = self.priv.extension_cache[filename]
2450 + local extension_type = module_gtypes[gtype]
2452 + if extension_type ~= nil then
2453 + if extension_type == false then
2457 + return extension_type
2460 + for _, value in pairs(self.priv.module_cache[filename]) do
2461 + local value_gtype = value._gtype
2463 + if value_gtype ~= nil then
2464 + if GObject.type_is_a(value_gtype, gtype) then
2465 + module_gtypes[gtype] = value_gtype
2466 + return value_gtype
2471 + module_gtypes[gtype] = false
2475 +local function check_native(native, wrapped, typename)
2476 + local msg = ('Invalid wrapper for %s: %s'):format(typename,
2477 + tostring(wrapped))
2479 + -- Cannot compare userdata directly!
2480 + assert(wrapped ~= nil, msg)
2481 + assert(tostring(native) == tostring(wrapped._native), msg)
2484 +function Hooks:setup_extension(exten, info)
2485 + local wrapped_exten = GObject.Object(exten, false)
2486 + check_native(exten, wrapped_exten, 'extension')
2488 + local wrapped_info = Peas.PluginInfo(info, false)
2489 + check_native(info, wrapped_info, 'PeasPluginInfo')
2491 + wrapped_exten.priv.plugin_info = wrapped_info
2494 +function Hooks:garbage_collect()
2501 --- libpeas-1.20.0/loaders/lua5.2/resources/peas-lua-strict.lua 1969-12-31 16:00:00.000000000 -0800
2502 +++ libpeas-1.20.0/loaders/lua5.2/resources/peas-lua-strict.lua 2015-06-25 22:36:33.457527835 -0700
2505 +-- Copyright (C) 2015 - Garrett Regier
2507 +-- libpeas is free software; you can redistribute it and/or
2508 +-- modify it under the terms of the GNU Lesser General Public
2509 +-- License as published by the Free Software Foundation; either
2510 +-- version 2.1 of the License, or (at your option) any later version.
2512 +-- libpeas is distributed in the hope that it will be useful,
2513 +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
2514 +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2515 +-- Lesser General Public License for more details.
2517 +-- You should have received a copy of the GNU Lesser General Public
2518 +-- License along with this library; if not, write to the Free Software
2519 +-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2521 +-- Modified version of: http://metalua.luaforge.net/src/lib/strict.lua.html
2525 +local mt = getmetatable(_G)
2528 + setmetatable(_G, mt)
2531 +function mt:__newindex(name, value)
2533 + local what = debug.getinfo(2, 'S').what
2535 + if what ~= 'C' then
2536 + error("Attempted to create global variable '" ..
2537 + tostring(name) .. "'", 2)
2541 + rawset(self, name, value)
2544 +function mt:__index(name)
2545 + if not __STRICT or debug.getinfo(2, 'S').what == 'C' then
2546 + return rawget(self, name)
2549 + error("Attempted to access nonexistent " ..
2550 + "global variable '" .. tostring(name) .. "'", 2)
2554 --- libpeas-1.20.0/loaders/lua5.2/resources/peas-lua.gresource.xml 1969-12-31 16:00:00.000000000 -0800
2555 +++ libpeas-1.20.0/loaders/lua5.2/resources/peas-lua.gresource.xml 2015-06-25 22:36:33.457644068 -0700
2557 +<?xml version="1.0" encoding="UTF-8"?>
2559 + <gresource prefix="/org/gnome/libpeas/loaders/lua5.2">
2560 + <file alias="internal.lua">peas-lua-internal.lua</file>
2561 + <file alias="strict.lua">peas-lua-strict.lua</file>
2564 --- libpeas-1.20.0/loaders/Makefile.am 2014-12-20 14:37:42.000000000 -0800
2565 +++ libpeas-1.20.0/loaders/Makefile.am 2015-06-25 22:36:33.438742551 -0700
2576 --- libpeas-1.20.0/peas-demo/peas-demo.c 2015-02-14 12:35:54.000000000 -0800
2577 +++ libpeas-1.20.0/peas-demo/peas-demo.c 2015-06-25 22:38:29.268000858 -0700
2580 /* We don't care about leaking memory */
2581 g_setenv ("PEAS_ALLOW_ALL_LOADERS", "1", TRUE);
2582 - peas_engine_enable_loader (engine, "lua5.1");
2583 + peas_engine_enable_loader (engine, "lua5.2");
2584 peas_engine_enable_loader (engine, "python3");
2586 if (run_from_build_dir)
2587 --- libpeas-1.20.0/peas-demo/plugins/luahello/luahello.plugin 2014-12-20 14:37:42.000000000 -0800
2588 +++ libpeas-1.20.0/peas-demo/plugins/luahello/luahello.plugin 2015-06-25 22:38:31.563451815 -0700
2595 Description=Inserts a box containing "Lua Says Hello" in every windows.
2596 Authors=Garrett Regier <garrettregier@gmail.com>
2597 --- libpeas-1.20.0/peas-demo/plugins/Makefile.am 2014-12-20 14:37:42.000000000 -0800
2598 +++ libpeas-1.20.0/peas-demo/plugins/Makefile.am 2015-06-25 22:36:33.506129543 -0700
2600 SUBDIRS = helloworld secondtime
2607 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua51.lua 2015-02-14 12:35:54.000000000 -0800
2608 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua51.lua 1969-12-31 16:00:00.000000000 -0800
2611 --- Copyright (C) 2014 - Garrett Regier
2613 --- libpeas is free software; you can redistribute it and/or
2614 --- modify it under the terms of the GNU Lesser General Public
2615 --- License as published by the Free Software Foundation; either
2616 --- version 2.1 of the License, or (at your option) any later version.
2618 --- libpeas is distributed in the hope that it will be useful,
2619 --- but WITHOUT ANY WARRANTY; without even the implied warranty of
2620 --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2621 --- Lesser General Public License for more details.
2623 --- You should have received a copy of the GNU Lesser General Public
2624 --- License along with this library; if not, write to the Free Software
2625 --- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2627 -local lgi = require 'lgi'
2629 -local GObject = lgi.GObject
2630 -local Introspection = lgi.Introspection
2631 -local Peas = lgi.Peas
2634 -local ExtensionLuaPlugin = GObject.Object:derive('ExtensionLuaPlugin', {
2636 - Introspection.Base,
2637 - Introspection.Callable,
2638 - Introspection.HasPrerequisite
2641 -ExtensionLuaPlugin._property.object =
2642 - GObject.ParamSpecObject('object', 'object', 'object',
2643 - GObject.Object._gtype,
2644 - { GObject.ParamFlags.READABLE,
2645 - GObject.ParamFlags.WRITABLE })
2647 -ExtensionLuaPlugin._property.update_count =
2648 - GObject.ParamSpecInt('update-count', 'update-count', 'update-count',
2650 - { GObject.ParamFlags.READABLE })
2652 -function ExtensionLuaPlugin:_init()
2653 - self.priv.update_count = 0
2656 -function ExtensionLuaPlugin:do_activate()
2657 - collectgarbage('restart')
2660 -function ExtensionLuaPlugin:do_deactivate()
2661 - collectgarbage('stop')
2664 -function ExtensionLuaPlugin:do_update_state()
2665 - self.priv.update_count = self.priv.update_count + 1
2668 -function ExtensionLuaPlugin:do_get_plugin_info()
2669 - return self.priv.plugin_info
2672 -function ExtensionLuaPlugin:do_get_settings()
2673 - return self.priv.plugin_info:get_settings(nil)
2676 -function ExtensionLuaPlugin:do_call_no_args()
2679 -function ExtensionLuaPlugin:do_call_with_return()
2680 - return 'Hello, World!'
2683 -function ExtensionLuaPlugin:do_call_single_arg()
2687 -function ExtensionLuaPlugin:do_call_multi_args(in_, inout)
2691 --- Test strict mode
2694 -local function assert_error(success, result)
2695 - assert(not success, result)
2698 -assert_error(pcall(function() _G[UNIQUE] = true end))
2699 -assert(pcall(function()
2700 - rawset(_G, UNIQUE, true)
2701 - assert(_G[UNIQUE] == true)
2704 -assert_error(pcall(function() _G[UNIQUE] = true end))
2705 -assert(pcall(function()
2712 -return { ExtensionLuaPlugin }
2714 --- ex:set ts=4 et sw=4 ai:
2715 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua51.plugin 2014-12-20 14:37:42.000000000 -0800
2716 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua51.plugin 1969-12-31 16:00:00.000000000 -0800
2719 -Module=extension-lua51
2721 -Name=Extension lua5.1
2722 -Description=This plugin is for the lua5.1 PeasExtension tests.
2723 -Authors=Garrett Regier
2724 -Copyright=Copyright © 2014 Garrett Regier
2725 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua52.gschema.xml 1969-12-31 16:00:00.000000000 -0800
2726 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua52.gschema.xml 2015-06-25 22:36:33.545141830 -0700
2729 + <schema id="extension-lua52" path="/org/gnome/libpeas/tests/extension-lua52/">
2730 + <key name="a-setting" type="s">
2731 + <default>'Blah'</default>
2732 + <summary>Just a setting.</summary>
2733 + <description>Just a setting.</description>
2737 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua52.lua 1969-12-31 16:00:00.000000000 -0800
2738 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua52.lua 2015-06-25 22:36:33.545646501 -0700
2741 +-- Copyright (C) 2014 - Garrett Regier
2743 +-- libpeas is free software; you can redistribute it and/or
2744 +-- modify it under the terms of the GNU Lesser General Public
2745 +-- License as published by the Free Software Foundation; either
2746 +-- version 2.1 of the License, or (at your option) any later version.
2748 +-- libpeas is distributed in the hope that it will be useful,
2749 +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
2750 +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2751 +-- Lesser General Public License for more details.
2753 +-- You should have received a copy of the GNU Lesser General Public
2754 +-- License along with this library; if not, write to the Free Software
2755 +-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2757 +local lgi = require 'lgi'
2759 +local GObject = lgi.GObject
2760 +local Introspection = lgi.Introspection
2761 +local Peas = lgi.Peas
2764 +local ExtensionLuaPlugin = GObject.Object:derive('ExtensionLuaPlugin', {
2766 + Introspection.Base,
2767 + Introspection.Callable,
2768 + Introspection.HasPrerequisite
2771 +ExtensionLuaPlugin._property.object =
2772 + GObject.ParamSpecObject('object', 'object', 'object',
2773 + GObject.Object._gtype,
2774 + { GObject.ParamFlags.READABLE,
2775 + GObject.ParamFlags.WRITABLE })
2777 +ExtensionLuaPlugin._property.update_count =
2778 + GObject.ParamSpecInt('update-count', 'update-count', 'update-count',
2780 + { GObject.ParamFlags.READABLE })
2782 +function ExtensionLuaPlugin:_init()
2783 + self.priv.update_count = 0
2786 +function ExtensionLuaPlugin:do_activate()
2787 + collectgarbage('restart')
2790 +function ExtensionLuaPlugin:do_deactivate()
2791 + collectgarbage('stop')
2794 +function ExtensionLuaPlugin:do_update_state()
2795 + self.priv.update_count = self.priv.update_count + 1
2798 +function ExtensionLuaPlugin:do_get_plugin_info()
2799 + return self.priv.plugin_info
2802 +function ExtensionLuaPlugin:do_get_settings()
2803 + return self.priv.plugin_info:get_settings(nil)
2806 +function ExtensionLuaPlugin:do_call_no_args()
2809 +function ExtensionLuaPlugin:do_call_with_return()
2810 + return 'Hello, World!'
2813 +function ExtensionLuaPlugin:do_call_single_arg()
2817 +function ExtensionLuaPlugin:do_call_multi_args(in_, inout)
2821 +-- Test strict mode
2824 +local function assert_error(success, result)
2825 + assert(not success, result)
2828 +assert_error(pcall(function() _G[UNIQUE] = true end))
2829 +assert(pcall(function()
2830 + rawset(_G, UNIQUE, true)
2831 + assert(_G[UNIQUE] == true)
2834 +assert_error(pcall(function() _G[UNIQUE] = true end))
2835 +assert(pcall(function()
2842 +return { ExtensionLuaPlugin }
2844 +-- ex:set ts=4 et sw=4 ai:
2845 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua52.plugin 1969-12-31 16:00:00.000000000 -0800
2846 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua/extension-lua52.plugin 2015-06-25 22:37:48.225666077 -0700
2849 +Module=extension-lua52
2851 +Name=Extension lua5.2
2852 +Description=This plugin is for the lua5.2 PeasExtension tests.
2853 +Authors=Garrett Regier
2854 +Copyright=Copyright © 2014 Garrett Regier
2855 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua51-nonexistent.plugin 2014-12-20 14:37:42.000000000 -0800
2856 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua51-nonexistent.plugin 1969-12-31 16:00:00.000000000 -0800
2859 -Module=extension-lua51-nonexistent
2861 -Name=Extension lua5.1 Nonexistent
2862 -Description=This plugin is nonexistent.
2863 -Authors=Garrett Regier
2864 -Copyright=Copyright © 2014 Garrett Regier
2865 --- libpeas-1.20.0/tests/libpeas/plugins/extension-lua52-nonexistent.plugin 1969-12-31 16:00:00.000000000 -0800
2866 +++ libpeas-1.20.0/tests/libpeas/plugins/extension-lua52-nonexistent.plugin 2015-06-25 22:37:52.634496175 -0700
2869 +Module=extension-lua52-nonexistent
2871 +Name=Extension lua5.2 Nonexistent
2872 +Description=This plugin is nonexistent.
2873 +Authors=Garrett Regier
2874 +Copyright=Copyright © 2014 Garrett Regier