Below is the demo code():
/* Typedef to hold class details */
typedef struct {
char *signature;
int count;
int space;
} ClassDetails;
....
/* Tag this jclass */
err = (*jvmti)->SetTag(jvmti, classes[i], (jlong)(ptrdiff_t)(void*)(&details[i]));
the prototype of SetTag is
jvmtiError SetTag(jvmtiEnv* env, jobject object, jlong tag)
.
Can I just use it like this:
err = (*jvmti)->SetTag(jvmti, classes[i], (jlong)(&details[i]));
?