swarm-support
[Top][All Lists]
Advanced

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

Re: drawHistogramWithDouble ()


From: Marcus G. Daniels
Subject: Re: drawHistogramWithDouble ()
Date: 06 Feb 2002 15:01:55 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.7

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ> 1. Is this the problem: any Obj-C method that requires a pointer
PJ> as input is not Java compatible?

These could actually be stubbed to Java.  It would be better to switch
to "const double *" in these cases so it was clear that the contents
were intended only for consumption.  Java method declarations could be
generated as double [] (jdoubleArray in C), and the size would come
out of the JNI GetArrayLength.  For XPCOM (I mention this to remind of
the lowest common denominator) it is more complicated because the
conversions map to primitive types.  Incidentally, that's why
setLabels has a count instead of just assuming a NULL at the end of
the array or something similar to GetArrayLength.  When the XPCOM
stubber sees a const char * const char * and a count it says to itself
"aha, an array of strings", and then does appropriate things.  So, the
conservative thing to do would be to declare it as "const double *"
and add a count parameter.  I realize the count parameter is redundant
in this context as it is the same as the binCount, but the conversions
are happening in a general way that can't take advantage of this knowledge.
The conversion tables are in backend-specific tables at the
start of java/java-stub.el and COM/COM.el.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]