< prev index next >

src/java.base/share/native/libjimage/jimage.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  *

@@ -70,11 +70,12 @@
  *     ...
  *   }
  *   ...
  */
 
-extern "C" JImageFile* JIMAGE_Open(const char *name, jint* error);
+extern "C" JNIEXPORT JImageFile* JNICALL
+JIMAGE_Open(const char *name, jint* error);
 
 typedef JImageFile* (*JImageOpen_t)(const char *name, jint* error);
 
 /*
  * JImageClose - Given the supplied open image file (see JImageOpen), release

@@ -84,11 +85,12 @@
  *
  * Ex.
  *  (*JImageClose)(image);
  */
 
-extern "C" void JIMAGE_Close(JImageFile* jimage);
+extern "C" JNIEXPORT void JNICALL
+JIMAGE_Close(JImageFile* jimage);
 
 typedef void (*JImageClose_t)(JImageFile* jimage);
 
 
 /*

@@ -102,11 +104,12 @@
  *  const char* package = (*JImagePackageToModule)(image, "java/lang");
  *  tty->print_cr(package);
  *  -> java.base
  */
 
-extern "C" const char * JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
+extern "C" JNIEXPORT const char * JNICALL
+JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
 
 typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name);
 
 
 /*

@@ -121,11 +124,11 @@
  *  Ex.
  *   jlong size;
  *   JImageLocationRef location = (*JImageFindResource)(image,
  *                                "java.base", "9.0", "java/lang/String.class", &size);
  */
-extern "C" JImageLocationRef JIMAGE_FindResource(JImageFile* jimage,
+extern "C" JNIEXPORT JImageLocationRef JIMAGE_FindResource(JImageFile* jimage,
         const char* module_name, const char* version, const char* name,
         jlong* size);
 
 typedef JImageLocationRef(*JImageFindResource_t)(JImageFile* jimage,
         const char* module_name, const char* version, const char* name,

@@ -145,11 +148,12 @@
  *  JImageLocationRef location = (*JImageFindResource)(image,
  *                               "java.base", "9.0", "java/lang/String.class", &size);
  *  char* buffer = new char[size];
  *  (*JImageGetResource)(image, location, buffer, size);
  */
-extern "C" jlong JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location,
+extern "C" JNIEXPORT jlong JNICALL
+JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location,
         char* buffer, jlong size);
 
 typedef jlong(*JImageGetResource_t)(JImageFile* jimage, JImageLocationRef location,
         char* buffer, jlong size);
 

@@ -179,11 +183,12 @@
 
 typedef bool (*JImageResourceVisitor_t)(JImageFile* jimage,
         const char* module_name, const char* version, const char* package,
         const char* name, const char* extension, void* arg);
 
-extern "C" void JIMAGE_ResourceIterator(JImageFile* jimage,
+extern "C" JNIEXPORT void JNICALL
+JIMAGE_ResourceIterator(JImageFile* jimage,
         JImageResourceVisitor_t visitor, void *arg);
 
 typedef void (*JImageResourceIterator_t)(JImageFile* jimage,
         JImageResourceVisitor_t visitor, void* arg);
 

@@ -195,10 +200,11 @@
  * Ex.
  *   JImageLocationRef location = ...
  *   char path[JIMAGE_MAX_PATH];
  *    (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
  */
-extern "C" bool JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
+extern "C" JNIEXPORT bool JNICALL
+JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
                                     char* path, size_t max);
 
 typedef bool (*JImage_ResourcePath_t)(JImageFile* jimage, JImageLocationRef location,
         char* buffer, jlong size);
< prev index next >