lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Andreas,

On Wed, Nov 20, 2002 at 05:14:38PM +0100, Andreas Rozek wrote:
> I'm currently trying to create a Win32 binary of  Christian
> Vogler's version of "LuaJava".  However,  an  include  file
> called "luajava_API.h" seems to be missing from the archive
> Where do I get it?

it is generated by javah -jni. Here is the relevant makefile line,
which hopefully is included in the archive:

luajava_API.o: luajava_API.c API.class
        javah $(CLASSPATH) -jni luajava.API

Also, please be aware that currently this version of luajava still has
problems with collecting expired class proxy objects in a timely
manner, because "gc" tag methods are no longer called for regular lua
tables. Initially, I thought that weak hashtables in Java would solve
the problem, but as it turns out they are crippled, because references
to the values of a hash table are always strong. Unfortunately, this
prevents the proxies from ever being collected in such a hash table,
even with weak keys.

As a result, at present, proxy objects are only collected when luajava
detects a collision between a new object and an old one. Solving the
problem for good probably will require reimplementing the proxy objects
entirely in C.

- Christian