comparison src/name/blackcap/exifwasher/exiv2/native.cpp @ 22:cd2ca4727b7f

Builds under Windows.
author davidb
date Thu, 16 Apr 2020 11:10:39 -0700
parents a59d84674fb0
children
comparison
equal deleted inserted replaced
21:539c3641c539 22:cd2ca4727b7f
96 #ifdef __cplusplus 96 #ifdef __cplusplus
97 } 97 }
98 #endif 98 #endif
99 #endif 99 #endif
100 /* Header for class name_blackcap_exifwasher_exiv2_ExifData */ 100 /* Header for class name_blackcap_exifwasher_exiv2_ExifData */
101
102 /*
103 * Utility function to parse out a type prefix from a key name.
104 */
105 char *getType(const char *key) {
106 const char *dot = strchr(key, '.');
107 if (dot == NULL)
108 throw std::invalid_argument(std::string("invalid key: ") + std::string(key));
109 int length = dot - key;
110 char *ret = (char *) malloc(length + 1);
111 memcpy(ret, key, length);
112 ret[length] = '\0';
113 return ret;
114 }
101 115
102 /* 116 /*
103 * Utility function to delete a (key, value) pair. 117 * Utility function to delete a (key, value) pair.
104 */ 118 */
105 template<class D, class K> 119 template<class D, class K>
146 #ifdef __cplusplus 160 #ifdef __cplusplus
147 extern "C" { 161 extern "C" {
148 #endif 162 #endif
149 163
150 /* 164 /*
151 * Utility function to parse out a type prefix from a key name.
152 */
153 char *getType(const char *key) {
154 char *dot = strchr(key, '.');
155 if (dot == NULL)
156 throw std::invalid_argument(std::string("invalid key: ") + std::string(key));
157 int length = dot - key;
158 char *ret = (char *) malloc(length + 1);
159 memcpy(ret, key, length);
160 ret[length] = '\0';
161 return ret;
162 }
163
164 /*
165 * Class: name_blackcap_exifwasher_exiv2_ExifData 165 * Class: name_blackcap_exifwasher_exiv2_ExifData
166 * Method: _erase 166 * Method: _erase
167 * Signature: (Ljava/lang/String;)V 167 * Signature: (Ljava/lang/String;)V
168 */ 168 */
169 JNIEXPORT void JNICALL Java_name_blackcap_exifwasher_exiv2_ExifData__1erase 169 JNIEXPORT void JNICALL Java_name_blackcap_exifwasher_exiv2_ExifData__1erase