< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, 2016, 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: * --- 1,7 ---- /* ! * 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,80 **** * ... * } * ... */ ! extern "C" JImageFile* 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 --- 70,81 ---- * ... * } * ... */ ! 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,94 **** * * Ex. * (*JImageClose)(image); */ ! extern "C" void JIMAGE_Close(JImageFile* jimage); typedef void (*JImageClose_t)(JImageFile* jimage); /* --- 85,96 ---- * * Ex. * (*JImageClose)(image); */ ! extern "C" JNIEXPORT void JNICALL ! JIMAGE_Close(JImageFile* jimage); typedef void (*JImageClose_t)(JImageFile* jimage); /*
*** 102,112 **** * 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); typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name); /* --- 104,115 ---- * const char* package = (*JImagePackageToModule)(image, "java/lang"); * tty->print_cr(package); * -> java.base */ ! 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,131 **** * Ex. * jlong size; * JImageLocationRef location = (*JImageFindResource)(image, * "java.base", "9.0", "java/lang/String.class", &size); */ ! extern "C" 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, --- 124,134 ---- * Ex. * jlong size; * JImageLocationRef location = (*JImageFindResource)(image, * "java.base", "9.0", "java/lang/String.class", &size); */ ! 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,155 **** * 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, char* buffer, jlong size); typedef jlong(*JImageGetResource_t)(JImageFile* jimage, JImageLocationRef location, char* buffer, jlong size); --- 148,159 ---- * 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" 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,189 **** 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, JImageResourceVisitor_t visitor, void *arg); typedef void (*JImageResourceIterator_t)(JImageFile* jimage, JImageResourceVisitor_t visitor, void* arg); --- 183,194 ---- 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" JNIEXPORT void JNICALL ! JIMAGE_ResourceIterator(JImageFile* jimage, JImageResourceVisitor_t visitor, void *arg); typedef void (*JImageResourceIterator_t)(JImageFile* jimage, JImageResourceVisitor_t visitor, void* arg);
*** 195,204 **** * Ex. * JImageLocationRef location = ... * char path[JIMAGE_MAX_PATH]; * (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH); */ ! extern "C" bool JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef, char* path, size_t max); typedef bool (*JImage_ResourcePath_t)(JImageFile* jimage, JImageLocationRef location, char* buffer, jlong size); --- 200,210 ---- * Ex. * JImageLocationRef location = ... * char path[JIMAGE_MAX_PATH]; * (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH); */ ! 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 >