Re: eDBI is born, feedback wanted

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
jimcbrown said...

The real issue is that I seem to be missing example.db - so the edbi_open() call fails.

No, looking at it, the problem is that at the end of main-.c:eu_init(), everything is dereferenced. The translator shouldn't be doing that, because you end up with a bunch of freed data. It's treating the function (which is really all the top level euphoria code) like a normal euphoria function, and cleaning up after itself.

For a short while, the translator did this with normal executables, to clean up after itself at the end. This caused other problems, but for a dll, it obviously shouldn't be doing this, since the data is meant to stay around and be used when the main program calls the dll.

Matt

Ok, so for the time being I've modified edbi.e to allow one to specify either a dll or a set of routine ids. So now I can just include edbi_eusql.e directly in example_2.ex, and create a list of routine ids, and it just works.

I discovered a bug in edbi_eusql.e, edbi_next() should take two paramenters (dbr and row) but only took one. After fixing this, I can uncomment the stuff in example_2.ex and it prints out a list of names.

$ eui -i drivers/eusql/matheval -i drivers/eusql/euslibs -i drivers/eusql/eusql example_2.ex 
edbi_open 
eumem:malloc() 
open_db 
returning from edbi_open: 2 
Name=Ronald Mc''Donald, Zip=29382, Dob=10/15/1977 
Name=Super Man, Zip=55555, Dob=05/18/1944 
Name=Wonder Woman, Zip=21232, Dob=09/29/1972 
$  


Forked into: Using native euphoria in edbi

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu