[RFA] JVMTI GetArgumentsSize
Tom Tromey
tromey@redhat.com
Tue Feb 20 02:10:00 GMT 2007
>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:
Kyle> As requested, I have changed this to determine the arguments size by
Kyle> looking at the method signature. Patch is attached.
Kyle> + sig = strtok (sig, ")");
Don't use strtok. It writes to the string and it is not thread-safe.
Kyle> + for (int i = 0; i < strlen (sig); i++)
You generally don't want to use strlen(sig) in a loop test.
Instead, here, end when sig[i] == ')'.
Kyle> + || sig[i] == 'I' || sig[i] == 'F' || sig[i] == 'L')
For the 'L' case you have to search forward to the terminating ';'.
Tom
More information about the Java-patches
mailing list