This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gh_lookup no longer works??


I had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!  (It always returns SCM_UNDEFINED.)

Has some simple thing changed that I wasn't aware of, or what am I missing
here??

The following is the program, the command I used to compile it (egcs-1.I had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!  (It always returns SCM_UNDEFINED.)

Has some simple thing chanI had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!I had a program that was working with earlier versions of guile,I had a program that was working with earlier versions of guile,I had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!I had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!I had a program that was working with earlier versions of guile,I had a program that was working with earlier versions of guile,I had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!I had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!  (It always returns SCM_UNDEFINED.)

Has some simple thing changed that I wasn't aware of, or what am I missing
here??

The folI had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped workiI had a program that was working with earlier versions of guile, but I
tried it out with guile 1.3 and it suddenly stopped working.  I have boiled
the problem down to a simple test program, illustrating a suprising thing:
gh_lookup no longer seems to work!  (It always returns SCM_UNDEFINED.)

Has some simple thing changed that I wasn't aware of, or what am I missing
here??

The following is the program, the command I used to compile it (egcs-1.1.1,
Redhat Linux 5.2), and the output.  The program defines a simple callback
routine called "tst" which calls gh_lookup("foo") and prints out whether or
not "foo" is defined.

#include <stdio.h>
#include <stdlib.h>
#include <guile/gh.h>

SCM tst(void)
{
     SCM foo;
     printf("Looking up the symbol 'foo...\n");
     foo = gh_lookup("foo");
     printf("...it was %s\n", foo == SCM_UNDEFINED ? "undefined!" : "defined");
     return SCM_UNSPECIFIED;
}

void main_entry(int argc, char *argv[])
{
     gh_new_procedure("tst", tst, 0, 0, 0);
     gh_repl(argc, argv);
}

int main (int argc, char *argv[])
{
  gh_enter (argc, argv, main_entry);
  return EXIT_SUCCESS;
}


% cc gbug.c -lguile -ldl -lreadline -lm -o gbug
% ./gbug
guile> (tst)
Looking up the symbol 'foo...
...it was undefined!
guile> (define foo 'bar)
guile> (tst)
Looking up the symbol 'foo...
...it was undefined!

As you can see, it's still printing out that foo is undefined {
     gh_new_procedure("tst", tst, 0, 0, 0);
     gh_repl(argc, argv);
}

int main (int argc, char *argv[])
{
  gh_enter (argc, argv, main_entry);
  return EXIT_SUCCESS;
}


% cc gbug.c -lguile -ldl -lreadline -lm -o gbug
% ./gbug
guile> (tst)
Looking up {
     gh_new_procedure("tst", tst, 0, 0, 0);
     gh_repl(argc, argv);
}

int main (int argc, char *argv[])
{
  gh_enter (argc, argv, main_entry);
  return EXIT_SUCCESS;
}


% cc gbug.c -lguile -ldl -lreadline -lm -o gbug
% ./gbug
guile> (tst)
Looking up the symbol 'foo...
...it was undefined!
guile> (define foo 'bar)
guile> (tst)
Looking up the symbol 'foo...
...it was undefined!

As you can see, it's still printing out that foo is undefined even after
I've defined it.

Thanks for any help you can provide!

Cordially,
Steven G. Johnson

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]