Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] mod_ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: MikhailFedotov <mikhail@k...>
Subject: RE: [Caml-list] mod_ocaml
> >
> > I was a little disappointed because I was hoping for something that
> > allowed using arbitrary OCaml code; mod_ocaml only supports an
> > embedding scripting model:
> >
> >   <?ocml <html> do_stuff () ;; </html> ?>
> >
> > but it looks like a good tool for quick-and-dirty dynamic Web sites.
>
> It seems that mod_ocaml strips last line of source if there
> is no newline symbol at the end. I.e. if all your html file
> is in one line, it disappears...

BTW, I've looked into the code. I may be wrong, but it seems that there
are
problems with memory management. Authors think that in C "sizeof(char*)"
gives maximum length of string or something like that, so they allocate
memory like this: this_arg = (char *) ap_pcalloc(r->pool, sizeof(char
*));

Another interesting example that I would not comment:
p->key = (char**)ap_pcalloc(r->pool, sizeof (char **) * 255);

Nice tool anyway. :-)

Mikhail


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners