OMG I finally found the webserver bug:

          var linst = Dynlink::init_lib(lib + dll_extn);
          var library = Dynlink::get_library linst;
          var tf = Dynlink::get_thread_frame linst;
          var raw_setup = Dynlink::dlsym$ library, "setup";
//println$ lib+" Got setup address " + str raw_setup;
          var setup = C_hack::cast[address * string --> int] raw_setup;
          var sresult = setup(tf,config_data);
//println$ lib+" Library set up " + str sresult;
          libs = Cons ((lib, linst),libs); 
          match lib with
          | "cpp2html" => 
            xlat_cpp= C_hack::cast[raw_xlat_t]$ Dynlink::dlsym (library,entry);
            tf_xlat_cpp = tf;
          endmatch;

Can you see the bug? No? Neither could I.
It worked with the debug comments included. 
So I took them out and it failed again.

Debugging making stuff work??

See the bug yet? No?

Look at "sresult". It's used in the debugging.

Yep. Nowhere else. So felix elided it and its initialiser.
So the plugins weren't initialised.

Actually setup is supposed to be a procedure but the export
of procedures doesn't work yet (exported functions didn't work
either, but i fixed them .. didn't get around to procedures).

is this a bug? In my code yes. In the compiler no.
It's supposed to eliminate variables that aren't used.
Even if the initialiser is a generator.
Felix ain't C. 

To prevent this you say

C_hack::ignore (x);

and x is considered used (the ignore function does nothing, it's
a trick which depends on the fact that Felix can't see into C
functions, so it has to assume the function uses its argument).


--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to