/[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.1.2.1 by gnu_andrew, Sat Jan 15 17:02:22 2005 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
52                                           jlong funcAddr, jlong funcArg)    (JNIEnv *gdk_env __attribute__((unused)),
53       jobject lcl_obj __attribute__((unused)),
54       jlong funcAddr, jlong funcArg)
55  {  {
56    /* 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. */
57    void *(*funcPtr)(void *) = (void *(*)(void *)) funcAddr;    void *(*funcPtr)(void *) = (void *(*)(void *)) (size_t)funcAddr;
58      
59    /* 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
60       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
61       to worry about returning it.  */       to worry about returning it.  */
62    (void) funcPtr((void *) funcArg);    (void) funcPtr((void *) (size_t)funcArg);
63    /* Fall off the end and terminate the thread of control. */    /* Fall off the end and terminate the thread of control. */
64  }  }
65    

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

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