add vips_error_buffer_copy()
Add vips_error_buffer_copy() to fix a race in error buffer fetch. See https://github.com/libvips/libvips/issues/1423 Thanks @dineshkannaa
This commit is contained in:
parent
d290c971ab
commit
efdf33f3de
@ -15,6 +15,7 @@
|
|||||||
- handle alpha in heifload / heifsave [meyermarcel]
|
- handle alpha in heifload / heifsave [meyermarcel]
|
||||||
- add @interpretation and @format to rawload
|
- add @interpretation and @format to rawload
|
||||||
- nifti load/save uses double for all floating point metadata
|
- nifti load/save uses double for all floating point metadata
|
||||||
|
- add vips_error_buffer_copy()
|
||||||
|
|
||||||
31/8/19 started 8.8.3
|
31/8/19 started 8.8.3
|
||||||
- revert sharpen restoring the input colourspace
|
- revert sharpen restoring the input colourspace
|
||||||
|
@ -36,6 +36,7 @@ extern "C" {
|
|||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
const char *vips_error_buffer( void );
|
const char *vips_error_buffer( void );
|
||||||
|
char *vips_error_buffer_copy( void );
|
||||||
void vips_error_clear( void );
|
void vips_error_clear( void );
|
||||||
|
|
||||||
void vips_error_freeze( void );
|
void vips_error_freeze( void );
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
* - gtkdoc comments
|
* - gtkdoc comments
|
||||||
* 24/6/10
|
* 24/6/10
|
||||||
* - fmt to error_exit() may be NULL
|
* - fmt to error_exit() may be NULL
|
||||||
|
* 12/9/19 [dineshkannaa]
|
||||||
|
* - add vips_error_buffer_copy()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -184,6 +186,26 @@ vips_error_buffer( void )
|
|||||||
return( msg );
|
return( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vips_error_buffer_copy:
|
||||||
|
*
|
||||||
|
* Return a copy of the vips error buffer, and clear it.
|
||||||
|
*
|
||||||
|
* Returns: a copy of the libvips error buffer
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
vips_error_buffer_copy( void )
|
||||||
|
{
|
||||||
|
char *msg;
|
||||||
|
|
||||||
|
g_mutex_lock( vips__global_lock );
|
||||||
|
msg = g_strdup( vips_buf_all( &vips_error_buf ) );
|
||||||
|
vips_error_clear();
|
||||||
|
g_mutex_unlock( vips__global_lock );
|
||||||
|
|
||||||
|
return( msg );
|
||||||
|
}
|
||||||
|
|
||||||
/* Some systems do not have va_copy() ... this might work (it does on MSVC),
|
/* Some systems do not have va_copy() ... this might work (it does on MSVC),
|
||||||
* apparently.
|
* apparently.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user