bare-exif 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.c +9 -3
- package/cmake/ports/libexif/port.cmake +12 -4
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-exif.bare +0 -0
- package/prebuilds/android-arm64/bare-exif.bare +0 -0
- package/prebuilds/android-ia32/bare-exif.bare +0 -0
- package/prebuilds/android-x64/bare-exif.bare +0 -0
- package/prebuilds/darwin-arm64/bare-exif.bare +0 -0
- package/prebuilds/darwin-x64/bare-exif.bare +0 -0
- package/prebuilds/ios-arm64/bare-exif.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-exif.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-exif.bare +0 -0
- package/prebuilds/linux-arm64/bare-exif.bare +0 -0
- package/prebuilds/linux-x64/bare-exif.bare +0 -0
- package/prebuilds/win32-arm64/bare-exif.bare +0 -0
- package/prebuilds/win32-x64/bare-exif.bare +0 -0
package/binding.c
CHANGED
|
@@ -109,6 +109,7 @@ bare_exif_init_data(js_env_t *env, js_callback_info_t *info) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
bare_exif_data_t *data = malloc(sizeof(bare_exif_data_t));
|
|
112
|
+
assert(data != NULL);
|
|
112
113
|
|
|
113
114
|
data->handle = handle;
|
|
114
115
|
|
|
@@ -168,6 +169,7 @@ bare_exif_init_entry(js_env_t *env, js_callback_info_t *info) {
|
|
|
168
169
|
if (handle == NULL) return NULL;
|
|
169
170
|
|
|
170
171
|
bare_exif_entry_t *entry = malloc(sizeof(bare_exif_entry_t));
|
|
172
|
+
assert(entry != NULL);
|
|
171
173
|
|
|
172
174
|
entry->handle = handle;
|
|
173
175
|
|
|
@@ -312,13 +314,17 @@ bare_exif_save_data(js_env_t *env, js_callback_info_t *info) {
|
|
|
312
314
|
js_value_t *result;
|
|
313
315
|
void *output;
|
|
314
316
|
err = js_create_arraybuffer(env, len, &output, &result);
|
|
315
|
-
assert(err == 0);
|
|
316
317
|
|
|
317
|
-
if (
|
|
318
|
-
memcpy(output, bytes, len);
|
|
318
|
+
if (err < 0) {
|
|
319
319
|
free(bytes);
|
|
320
|
+
|
|
321
|
+
return NULL;
|
|
320
322
|
}
|
|
321
323
|
|
|
324
|
+
if (len > 0) memcpy(output, bytes, len);
|
|
325
|
+
|
|
326
|
+
free(bytes);
|
|
327
|
+
|
|
322
328
|
return result;
|
|
323
329
|
}
|
|
324
330
|
|
|
@@ -71,15 +71,23 @@ if(CMAKE_C_COMPILER)
|
|
|
71
71
|
cmake_path(GET CMAKE_C_COMPILER PARENT_PATH CC_path)
|
|
72
72
|
cmake_path(GET CMAKE_C_COMPILER FILENAME CC_filename)
|
|
73
73
|
|
|
74
|
+
set(flags "--target=${CMAKE_C_COMPILER_TARGET}")
|
|
75
|
+
|
|
76
|
+
if(APPLE)
|
|
77
|
+
string(APPEND flags " -isysroot ${CMAKE_OSX_SYSROOT}")
|
|
78
|
+
elseif(ANDROID)
|
|
79
|
+
string(APPEND flags " --sysroot=${CMAKE_SYSROOT}")
|
|
80
|
+
endif()
|
|
81
|
+
|
|
74
82
|
list(APPEND env
|
|
75
83
|
"CC=${CC_filename}"
|
|
76
|
-
"CFLAGS
|
|
84
|
+
"CFLAGS=${flags}"
|
|
77
85
|
)
|
|
78
86
|
|
|
79
87
|
if(CMAKE_LINKER_TYPE MATCHES "LLD")
|
|
80
|
-
list(APPEND env "LDFLAGS
|
|
88
|
+
list(APPEND env "LDFLAGS=${flags} -fuse-ld=lld")
|
|
81
89
|
else()
|
|
82
|
-
list(APPEND env "LDFLAGS
|
|
90
|
+
list(APPEND env "LDFLAGS=${flags}")
|
|
83
91
|
endif()
|
|
84
92
|
|
|
85
93
|
list(APPEND path "${CC_path}")
|
|
@@ -122,7 +130,7 @@ list(JOIN path ":" path)
|
|
|
122
130
|
list(APPEND env "PATH=${path}")
|
|
123
131
|
|
|
124
132
|
declare_port(
|
|
125
|
-
"github:libexif/libexif@0.6.
|
|
133
|
+
"github:libexif/libexif@0.6.26"
|
|
126
134
|
exif
|
|
127
135
|
AUTOTOOLS
|
|
128
136
|
BYPRODUCTS lib/${lib}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|