Your message dated Tue, 20 Sep 2011 21:03:03 +0000
with message-id <[email protected]>
and subject line Bug#468414: fixed in swig2.0 2.0.4-4
has caused the Debian Bug report #468414,
regarding swig lua backend doesn't return module table
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
468414: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468414
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: swig
Version: 1.3.33-3
Severity: normal
It's standard practice in modern Lua for packages to arrange for the
module's table to be returned from require (as well as being added to
the global environment). People tend to rely on this behavior, and it's
idiomatic to load / use a module with code like:
the_mod = require "..."
the_mod.some_function (1,2,3)
Swig-generated Lua modules don't seem to follow this convention; instead
they seem to return a string (which is fairly useless).
For instance, if I use swig on the following swig input file "foo.swg":
%module foo
%{
char *hi_mom () { return "hi mom!"; }
%}
char *hi_mom ();
and I compile it with:
$ swig -c++ -lua foo.swg
% g++ -shared foo_wrap.cxx -I/usr/include/lua5.1 -o foo.so
then the following Lua session shows the swig module's behavior compared
to the module "lpeg", which illustrates the standard behavior:
$ lua
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> the_swig_mod = require "foo"
> print (the_swig_mod)
foo
> print (the_swig_mod.hi_mom)
nil
> the_lpeg_mod = require "lpeg"
> print (the_lpeg_mod)
table: 0x8078d48
> print (the_lpeg_mod.match)
function: 0x806de20
>
Notice that loading the swig module simply returns a string from the
call to require, whereas the lpeg module returns the actual table.
Here's a quote from the book "Programming In Lua 2", which describes the
desired behavior:
From the user point of view, a module is a library that can be loaded
through require and that defines one single global name containing
a table. Everything that the module exports, such as functions and
constants, it defines inside this table, which works as a namespace.
A well-behaved module also arranges for require to return this table.
Thanks,
-Miles
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.22.7 (PREEMPT)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages swig depends on:
ii libc6 2.7-8 GNU C Library: Shared libraries
ii libgcc1 1:4.3-20080219-1 GCC support library
ii libstdc++6 4.3-20080219-1 The GNU Standard C++ Library v3
swig recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: swig2.0
Source-Version: 2.0.4-4
We believe that the bug you reported is fixed in the latest version of
swig2.0, which is due to be installed in the Debian FTP archive:
swig-doc_2.0.4-4_all.deb
to main/s/swig2.0/swig-doc_2.0.4-4_all.deb
swig-examples_2.0.4-4_all.deb
to main/s/swig2.0/swig-examples_2.0.4-4_all.deb
swig2.0-doc_2.0.4-4_all.deb
to main/s/swig2.0/swig2.0-doc_2.0.4-4_all.deb
swig2.0-examples_2.0.4-4_all.deb
to main/s/swig2.0/swig2.0-examples_2.0.4-4_all.deb
swig2.0_2.0.4-4.debian.tar.gz
to main/s/swig2.0/swig2.0_2.0.4-4.debian.tar.gz
swig2.0_2.0.4-4.dsc
to main/s/swig2.0/swig2.0_2.0.4-4.dsc
swig2.0_2.0.4-4_amd64.deb
to main/s/swig2.0/swig2.0_2.0.4-4_amd64.deb
swig_2.0.4-4_amd64.deb
to main/s/swig2.0/swig_2.0.4-4_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Torsten Landschoff <[email protected]> (supplier of updated swig2.0 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Tue, 20 Sep 2011 22:45:05 +0200
Source: swig2.0
Binary: swig swig2.0 swig-examples swig2.0-examples swig-doc swig2.0-doc
Architecture: source all amd64
Version: 2.0.4-4
Distribution: unstable
Urgency: low
Maintainer: Torsten Landschoff <[email protected]>
Changed-By: Torsten Landschoff <[email protected]>
Description:
swig - Generate scripting interfaces to C/C++ code
swig-doc - HTML documentation for SWIG
swig-examples - Examples for applications of SWIG
swig2.0 - Generate scripting interfaces to C/C++ code
swig2.0-doc - HTML documentation for SWIG
swig2.0-examples - Examples for applications of SWIG
Closes: 468414 642202
Changes:
swig2.0 (2.0.4-4) unstable; urgency=low
.
* Acknowledge NMU, thanks again Luca (and Jonathan for the patch).
* Merge revision 12814 from upstream (closes: #642202).
* Merge revision 12780 from upstream (closes: #468414).
Checksums-Sha1:
6e4cb844edcf0ec817939dcea027b1f3cc69bbdc 1426 swig2.0_2.0.4-4.dsc
55114198278bd3fbc8f8648bbf6a8c83671b5fc4 21986 swig2.0_2.0.4-4.debian.tar.gz
e6347d9dd10ab0891321c685cdbb0d656bb0d089 264304 swig-examples_2.0.4-4_all.deb
328f3da8ad28c7b7acc00c4105a82e008979640f 1274534
swig2.0-examples_2.0.4-4_all.deb
6748613f3b03b52f1519d276ca9cae7d94ef18bd 264276 swig-doc_2.0.4-4_all.deb
6739fec287380ed12c984257b2b8ff86c7514dd3 2691486 swig2.0-doc_2.0.4-4_all.deb
6cb9cd3e69db93ef88dfd0d210325c8cd0a18203 269670 swig_2.0.4-4_amd64.deb
72a2c3eb401141cd68cbc288f1661c2e6abab111 1389206 swig2.0_2.0.4-4_amd64.deb
Checksums-Sha256:
dd46806e85dd850718dcf43c68be39336e87da2f89722ce0f83cb366f34c6024 1426
swig2.0_2.0.4-4.dsc
8e7ba748cf20e02fc6ace40ceb5700a9afd8486cd8e24facc0dc31f653b2bd4a 21986
swig2.0_2.0.4-4.debian.tar.gz
8432517f1fa91af41efe8114aede71a6fc8949b148f2a44230853a096da51380 264304
swig-examples_2.0.4-4_all.deb
c941d51703ca917cb02fdc022450bb3d1f6601122c969998698596fea40b2d48 1274534
swig2.0-examples_2.0.4-4_all.deb
33d40151cd480bde4d4d0f64d8e770023611834d85758fefabe4467198fe5573 264276
swig-doc_2.0.4-4_all.deb
6439ff860e295a7dd43c3ae7587cd64722212c5d4bc720b1f43b1cb9d27b00d4 2691486
swig2.0-doc_2.0.4-4_all.deb
ab439d6c819d4c881a681d2c399323f8c6e34c1815ac8f9a1dab9a89d9ba311e 269670
swig_2.0.4-4_amd64.deb
7bb1f6e2ca709f95393418b46792aa7a8eb8f790c045b5eeaaf32866e15241c8 1389206
swig2.0_2.0.4-4_amd64.deb
Files:
e6f3e4002b8e42a2a5513d5058685e70 1426 interpreters optional swig2.0_2.0.4-4.dsc
8cdb8a27b2778a8d60130cdec88b69f5 21986 interpreters optional
swig2.0_2.0.4-4.debian.tar.gz
b40190b41f8f9f0204ceaeaff7a9724a 264304 interpreters optional
swig-examples_2.0.4-4_all.deb
05f6654d0d20f0ab2729db0f4cd30366 1274534 interpreters optional
swig2.0-examples_2.0.4-4_all.deb
4646db2f01977e91d047c71af9083ad9 264276 doc optional swig-doc_2.0.4-4_all.deb
695c0156c015540d28d0760b3787e008 2691486 doc optional
swig2.0-doc_2.0.4-4_all.deb
7c177001d28baf8c3c87c27bd11b1c4a 269670 interpreters optional
swig_2.0.4-4_amd64.deb
8857d43cc50d506f75fa6e89830c19a0 1389206 interpreters optional
swig2.0_2.0.4-4_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iD8DBQFOePx3dQgHtVUb5EcRAqXvAJ4i21V3njMG6mBoaRZCo4MY6vZx4ACfeVnI
HaI8WivfVqIM92Arq9oAvrk=
=xQrS
-----END PGP SIGNATURE-----
--- End Message ---