always print mem high-water on leak check
This commit is contained in:
parent
d38e7bea57
commit
5028771e6f
@ -301,13 +301,15 @@ vips_leak( void )
|
||||
vips_tracked_get_files() ) {
|
||||
vips_buf_appendf( &buf, "memory: %d allocations, %zd bytes\n",
|
||||
vips_tracked_get_allocs(), vips_tracked_get_mem() );
|
||||
vips_buf_appendf( &buf, "memory: high-water mark " );
|
||||
vips_buf_append_size( &buf, vips_tracked_get_mem_highwater() );
|
||||
vips_buf_appendf( &buf, "\nfiles: %d open\n",
|
||||
vips_tracked_get_files() );
|
||||
|
||||
fprintf( stderr, "%s", vips_buf_all( &buf ) );
|
||||
}
|
||||
|
||||
vips_buf_appendf( &buf, "memory: high-water mark " );
|
||||
vips_buf_append_size( &buf, vips_tracked_get_mem_highwater() );
|
||||
vips_buf_appends( &buf, "\n" );
|
||||
|
||||
fprintf( stderr, "%s", vips_buf_all( &buf ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -444,6 +444,14 @@ void VImage::initdesc( int x, int y, int b,
|
||||
verror();
|
||||
}
|
||||
|
||||
// used to test SWIG wrappers with output args
|
||||
double VImage::test_member( double a, double b, double *c, double *d )
|
||||
{
|
||||
*c = a + b;
|
||||
*d = a - b;
|
||||
return a * b;
|
||||
}
|
||||
|
||||
// Create a Vargv from a name
|
||||
Vargv::Vargv( const char *name )
|
||||
{
|
||||
|
@ -288,6 +288,9 @@ public:
|
||||
void initdesc( int, int, int, TBandFmt, TCoding, TType,
|
||||
float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError );
|
||||
|
||||
// test member for SWIG output args
|
||||
double test_member( double a, double b, double *c, double *d );
|
||||
|
||||
/* Insert automatically generated headers.
|
||||
*/
|
||||
#include "vipsc++.h"
|
||||
|
@ -33,6 +33,7 @@
|
||||
%include "std_except.i"
|
||||
%include "std_string.i"
|
||||
%include "cstring.i"
|
||||
%include "typemaps.i"
|
||||
|
||||
%import "VError.i"
|
||||
%import "VMask.i"
|
||||
@ -79,6 +80,11 @@ struct VBuffer {
|
||||
*/
|
||||
%include VImage.h
|
||||
|
||||
/* Some operations return values though their params. We have to note these
|
||||
* specially.
|
||||
*/
|
||||
extern double vips::VImage::maxpos_avg(double &OUTPUT, double &OUTPUT);
|
||||
|
||||
%extend vips::VImage {
|
||||
public:
|
||||
VBuffer tobuffer () throw (VError)
|
||||
|
4
swig/vipsCC/test.py
Normal file
4
swig/vipsCC/test.py
Normal file
@ -0,0 +1,4 @@
|
||||
from vipsCC import *
|
||||
|
||||
a = VImage.VImage("/home/john/pics/shark.jpg")
|
||||
print a.maxpos_avg()
|
Loading…
Reference in New Issue
Block a user