mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Remove atexit handler as libvips defines this
New grunt-sharp build tool Version bump for latest libvips
This commit is contained in:
parent
fe34548bad
commit
83ebe12061
@ -82,9 +82,11 @@ The _gettext_ dependency of _libvips_ [can lead](https://github.com/lovell/sharp
|
|||||||
|
|
||||||
docker pull marcbachmann/libvips
|
docker pull marcbachmann/libvips
|
||||||
|
|
||||||
### gulp.js
|
### Build tools
|
||||||
|
|
||||||
[Eugeny Vlasenko](https://github.com/mahnunchik) maintains [gulp-responsive](https://www.npmjs.org/package/gulp-responsive) and [Mohammad Prabowo](https://github.com/rizalp) maintains [gulp-sharp](https://www.npmjs.org/package/gulp-sharp).
|
* [gulp-responsive](https://www.npmjs.com/package/gulp-responsive)
|
||||||
|
* [gulp-sharp](https://www.npmjs.com/package/gulp-sharp)
|
||||||
|
* [grunt-sharp](https://www.npmjs.com/package/grunt-sharp)
|
||||||
|
|
||||||
## Usage examples
|
## Usage examples
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
vips_version_minimum=7.40.0
|
vips_version_minimum=7.40.0
|
||||||
vips_version_latest_major=7.42
|
vips_version_latest_major=7.42
|
||||||
vips_version_latest_minor=0
|
vips_version_latest_minor=1
|
||||||
|
|
||||||
install_libvips_from_source() {
|
install_libvips_from_source() {
|
||||||
echo "Compiling libvips $vips_version_latest_major.$vips_version_latest_minor from source"
|
echo "Compiling libvips $vips_version_latest_major.$vips_version_latest_minor from source"
|
||||||
|
12
src/sharp.cc
12
src/sharp.cc
@ -8,19 +8,9 @@
|
|||||||
#include "resize.h"
|
#include "resize.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
using v8::Handle;
|
extern "C" void init(v8::Handle<v8::Object> target) {
|
||||||
using v8::Object;
|
|
||||||
using node::AtExit;
|
|
||||||
|
|
||||||
static void at_exit(void* arg) {
|
|
||||||
NanScope();
|
|
||||||
vips_shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" void init(Handle<Object> target) {
|
|
||||||
NanScope();
|
NanScope();
|
||||||
vips_init("sharp");
|
vips_init("sharp");
|
||||||
AtExit(at_exit);
|
|
||||||
|
|
||||||
// Set libvips operation cache limits
|
// Set libvips operation cache limits
|
||||||
vips_cache_set_max_mem(100 * 1048576); // 100 MB
|
vips_cache_set_max_mem(100 * 1048576); // 100 MB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user