Problem with IG

Joergen Froejk Kjaersgaard froejk@REDACTED
Mon Jun 28 21:05:13 CEST 1999


I'm trying to use IG to make an interface from Erlang to the Postgres
database system on Linux. In doing that I ran into a problem with
passing empty strings. This simple example program from the manual:

IG_fun int foo(IG_string name, int age)
{
  fprintf(stderr, "foo: name='%s', age=%d\n", "name", age);
  return age;
}

yields this:

jfk@REDACTED:~/erlang-test > erl
Eshell V47.4.1  (abort with ^G) 
1> P=ex1:start().
<0.37.0>
2> ex1:foo(P,"",30).
<ERROR> erl_malloc: Failed to allocate more memory: Success

however, the following succeeds:

jfk@REDACTED:~/erlang-test > erl
Eshell V47.4.1  (abort with ^G)
1> P=ex1:start().
<0.29.0>
2> ex1:foo(P,"jfk",27).
foo: name='name', age=27
{ok,27}
3>

Is this a known bug in IG, or???

regards, Jørgen

-- 
Jørgen Frøjk Kjærsgaard <jkjaersgaard@REDACTED>
Systemkonsulent (Systems Consultant)
Informaticon ApS, Nørrevænget 143, DK-8310 Tranbjerg J.



More information about the erlang-questions mailing list