]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/JORTEPublicationDestroy.c
JORTE: ignore 'int-to-pointer' and 'pointer-to-int' compiler warnings
[orte.git] / orte / libjorte / JORTEPublicationDestroy.c
index 77863bf725bff04dcaf2cbda57087c00c7f0d06c..8eb9b365c3ed2ef65b3d431e28a313d3c809c403 100644 (file)
   *
   */
 
-
+#include <stdlib.h>
 // origin orte headers
 #include "orte.h"
 // pregenerated header
 #include "jorte/org_ocera_orte_Publication.h"
-
+#include "jorte/4all.h"
 
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationDestroy
-(JNIEnv *env, jclass cls, jint dhandle)
+(JNIEnv *env, jclass cls, jlong pub_handle)
 {
-  int8_t b;
+  int8_t    b;
 
-  // call the liborte function
-  b = ORTEPublicationDestroy((ORTEPublication *) dhandle);
-  if(b == ORTE_OK)
+  // call ORTE function
+  b = ORTEPublicationDestroy((ORTEPublication *) pub_handle);
+  if (b == ORTE_BAD_HANDLE)
   {
-    //printf(":c: ORTEPublicationDestroy() succesfuly.. \n");
+    printf(":!c: publication destroy failed! [bad publication handle] \n");
     return 1;
   }
-  if (b == ORTE_BAD_HANDLE)
-    printf(":!c: ORTEPublicationDestroy failed! (bad publication's handle) \n");
-  return 0;
+  #ifdef TEST_STAGE
+    printf(":c: publication destroyed successfully.. \n");
+  #endif
+  return 1;
 }