/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by saugart, Sun Jun 6 04:14:13 2004 UTC revision 1.2 by mark, Tue Oct 26 23:50:04 2004 UTC
# Line 45  exception statement from your version. * Line 45  exception statement from your version. *
45   * Signature: (J)V   * Signature: (J)V
46   *   *
47   * Purpose: Run the C function whose function pointer is   * Purpose: Run the C function whose function pointer is
48   *   *
49   */   */
50  JNIEXPORT void JNICALL  JNIEXPORT void JNICALL
51  Java_gnu_java_awt_peer_gtk_GThreadNativeMethodRunner_nativeRun(JNIEnv *gdk_env, jobject lcl_obj,  Java_gnu_java_awt_peer_gtk_GThreadNativeMethodRunner_nativeRun(JNIEnv *gdk_env __attribute__((unused)), jobject lcl_obj __attribute__((unused)), jlong funcAddr, jlong funcArg)
                                          jlong funcAddr, jlong funcArg)  
52  {  {
53    /* Convert the function's address back into a pointer to a C function. */    /* Convert the function's address back into a pointer to a C function. */
54    void *(*funcPtr)(void *) = (void *(*)(void *)) funcAddr;    void *(*funcPtr)(void *) = (void *(*)(void *)) (size_t)funcAddr;
55      
56    /* We do not need to worry about the return value from funcPtr(); it's    /* We do not need to worry about the return value from funcPtr(); it's
57       just thrown away.  That is part of the g_threads spec, so no reason       just thrown away.  That is part of the g_threads spec, so no reason
58       to worry about returning it.  */       to worry about returning it.  */
59    (void) funcPtr((void *) funcArg);    (void) funcPtr((void *) (size_t)funcArg);
60    /* Fall off the end and terminate the thread of control. */    /* Fall off the end and terminate the thread of control. */
61  }  }
62    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26