Commit Graph

21 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen 0337c09700
Cleanup gettext handling (#2695)
Use GLib's i18n support instead of copying and pasting that
logic into its own header. This deprecates the vips/intl.h
header in favour of glib/gi18n.h.
2022-02-27 15:27:28 +00:00
Kleis Auke Wolthuizen 91a143e5c9 Swap g_private_set with g_private_replace where possible
There's a possibility that the old GDestroyNotify
handler is not called when threads are being reused.
2021-05-03 13:21:45 +02:00
Lovell Fuller 117dbd888a Set minimum glib dependency version of 2.40 (March 2014) 2021-02-24 21:59:21 +00:00
Kleis Auke Wolthuizen 9246094033 Fix function pointer cast issues
It is undefined behavior in C and C++ to cast a function pointer
to another type and call it that way. This does work in most native
platforms, however, despite it being UB, but in WASM it can fail.

See:
https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html
2020-06-30 13:35:41 +02:00
John Cupitt f9f717a843 add VIPS_ONCE and use it everywhere
Lovell's idea: save the function call in the most common case
2017-11-23 08:43:08 +00:00
John Cupitt 2be0b97dce switch to g_warning()_/g_info()
we had vips_warn() and vips_info(), but they are a bit crappy ... switch
to g_warning() and g_info() instead

see https://github.com/jcupitt/libvips/issues/544
2017-01-03 15:52:27 +00:00
John Cupitt a00db6c8f1 doc cleanups 2015-04-24 12:49:50 +01:00
John Cupitt 339f268200 add some API for args, fix a docs messup 2015-03-02 22:02:33 +00:00
John Cupitt 9112e7d525 warn on profile save data loss 2014-09-30 21:28:16 +01:00
John Cupitt cad052544c try to make vips_thread_shutdown() optional
see

https://github.com/jcupitt/ruby-vips/issues/55

it's still better to call vips_thread_shutdown(), but not calling it
should no longer leak memory
2014-09-30 11:28:24 +01:00
John Cupitt 0bb8a218bb exit() in fewer cases
we now only exit() when we know the stack has been trashed, just warn in
other cases
2014-07-29 15:23:27 +01:00
John Cupitt bbd5cbfb44 add vips_thread_shutdown()
You now need to call vips_thread_shutdown() from all threads you create
yourself just before they exit. This gives vips a chance to free any
thread-private memory and to write out profiling data. libvips will
complain noisily if you fail to do this. You can harmlessly call
vips_thread_shutdown() more than once if you wish.

libvips will call vips_thread_shutdown for you automatically for the main
thread (the one that calls vips_shutdown()) and for threads it creates
directly itself.
2014-01-15 14:07:13 +00:00
John Cupitt 1090f48900 fix two tiny memleaks 2014-01-14 12:07:50 +00:00
John Cupitt 9c30242745 fix erroneous leak report from vipsprofile 2013-12-18 12:50:22 +00:00
John Cupitt b3d31ced79 vipsprofile graphs memory use
marks malloc/free as well
2013-12-09 13:45:41 +00:00
John Cupitt 466f25cf28 added memory logging to --vips-profile
though the analysis program doesn't understand yet
2013-12-09 10:04:24 +00:00
John Cupitt 853124757b small polishes 2013-11-27 17:31:07 +00:00
John Cupitt 3a195d4d5c support main thread gates 2013-11-26 13:01:40 +00:00
John Cupitt b746ab36d6 works! 2013-11-25 14:45:06 +00:00
John Cupitt d366320cb1 cleanups, vipsprofile.py now works 2013-11-20 21:35:18 +00:00
John Cupitt 693ed09edd add --vips-profile
only added a few gates so far, try a visualiser next
2013-11-18 18:31:49 +00:00