[slang-users] Bug in namespace allocation

Joerg Sommer joerg at alea.gnuu.de
Fri Oct 7 07:50:56 EDT 2005


Hi John,

#v+
$ cat /tmp/test.sl 
% autoload("foo", "/tmp/test1.sl");
autoload("_test->bar", "/tmp/test1.sl");

% foo();
_test->bar();
$ cat /tmp/test1.sl 
% try whether reevaluation works in SLANG 2
implements("_test");
message(current_namespace());

public define foo()
{
    message("foo");
}

define bar()
{
    message("bar");
}
$ slsh /tmp/test.sl 
Namespace _test already exists
/tmp/test1.sl:2:<top-level>:Namespace Error
#v-

I've added a debug output to implements_ns() and saw that:
ns->name = " *** internal ns <1> *** "
name = "/tmp/test1.sl"

in the error case. I think the allocation of the namespace by autoload()
is the problem.

Bye, Jörg.

BTW: Do you have a Bug Tracking System?
-- 
Die meisten Menschen wollen lieber durch Lob ruiniert
als durch Kritik gerettet werden.




More information about the slang-users-l mailing list