Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Aug 2005 02:29:13 -0400 (EDT)
From:      "Mikhail T." <mi@aldan.algebra.com>
To:        java@FreeBSD.org, glewis@FreeBSD.org, phantom@FreeBSD.org
Subject:   more on the jint vs. intptr_t
Message-ID:  <200508060629.j766TDiU048417@blue.virtual-estates.net>

next in thread | raw e-mail | index | archive | help
More specifically, the LiveConnect part of Mozilla family of browsers is
using Java's GetJavaWrapper() and UnwrapJavaWrapper() functions to store
_pointers_ to the JavaScript objects -- see comments in

	work/mozilla/js/src/liveconnect/jsjava.h

as extracted by firefox or mozilla ports. These pointers are presumed to
be as wide as jint -- see calls to get_java_wrapper() in

	work/mozilla/js/src/liveconnect/jsj_JSObject.c

Currently, the only Java (sort of) available for amd64 is jdk15, which
does not build the browser plugin for some reason anyway :-( However, I
hope, this will some day be fixed and the browsers better be ready.

Defining jint as intptr_t just for this purpose is, probably, wasteful.
Instead, the GetJavaWrapper() and UnwrapJavaWrapper() functions should,
probably, be modified to accept either a jlong (a warning-triggering
overkill on i386) or a true intptr_t.

Any comments?

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508060629.j766TDiU048417>