swig/Lib/ocaml
Olly Betts 1f5ff2e6a5 Allow using snprintf() instead of sprintf() in wrappers
We aim to produce code that works with C90 or C++98 so we can't
assume snprintf() is available, but it almost always is (even
on systems from before it was standardised) so having a way to
use it is helpful.

Enable this automatically if the compiler claims conformance
with at least C90 or C++98 and check SWIG_HAVE_SNPRINTF to allow
turning on manually, but disable if SWIG_NO_SNPRINTF if defined.

The fallback is to call sprintf() without a buffer size check -
checking after the call is really shutting the stable door after
the horse has bolted, and most of our uses either have a fixed maximum
possible size or dynamically allocate a buffer that's large enough.

Fixes: #2502 (sprintf deprecation warnings on macos)
Fixes: #2548
2023-04-27 10:08:57 +12:00
..
carray.i [OCaml] Fix compilation errors with OCaml 4.09.0 2019-12-29 22:41:43 -07:00
class.swg [OCaml] Fix member var getters and setters 2019-01-06 09:40:25 -07:00
cstring.i Allow using snprintf() instead of sprintf() in wrappers 2023-04-27 10:08:57 +12:00
director.swg [OCaml] Define CAML_NAME_SPACE before including caml/ headers 2019-01-28 06:56:18 -07:00
extra-install.list [OCaml] Remove the last remnants of libswigocaml 2019-01-18 23:48:46 -07:00
ocaml.i Cleanup SWIG_VERSION definition 2022-10-13 19:47:43 +01:00
ocaml.swg Ocaml typemap typo fix 2022-09-03 05:37:13 +01:00
ocamlkw.swg Update a dead link. 2018-12-30 02:51:58 -07:00
ocamlrun.swg [Ocaml] Fix to work with CAML_SAFE_STRING 2022-02-01 13:29:53 +13:00
ocamlrundec.swg Avoid -Wempty-body warnings from SWIG_contract_assert 2022-02-11 18:39:08 +13:00
preamble.swg Some delayed maintenance. 2004-10-17 07:56:17 +00:00
std_common.i [OCaml] Fix the wrapmacro test 2019-02-17 01:41:59 -07:00
std_complex.i Fixes to comply with with ISO/IEC 14882:1998(E) 17.4.3.1.2 (symbol names) 2003-09-23 21:16:38 +00:00
std_deque.i SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear. 2010-02-27 23:26:02 +00:00
std_except.i [OCaml] Some exception improvements 2019-02-07 16:25:10 -07:00
std_list.i Add STL container copy constructors where missing 2019-02-14 18:53:05 +00:00
std_map.i Add STL container copy constructors where missing 2019-02-14 18:53:05 +00:00
std_pair.i Consistent parameter names for std::pair 2019-02-14 22:44:27 +00:00
std_string.i Make typemaps consistently use string::data() vs c_str() 2023-04-24 11:49:23 +12:00
std_vector.i Add STL container copy constructors where missing 2019-02-14 18:53:05 +00:00
stl.i Create a consistent stl.i library file 2019-02-12 18:46:05 +00:00
swig.ml [OCaml] Fix a bug in the ctors of director classes 2019-02-05 13:35:43 -07:00
swig.mli [OCaml] Fix a bug in the ctors of director classes 2019-02-05 13:35:43 -07:00
swigmove.i Provide SWIGTYPE MOVE typemaps in swigmove.i 2022-09-16 08:36:25 +01:00
swigp4.ml Make Lib/ocaml/swigp4.ml a non-generated file. 2014-02-19 22:35:45 +13:00
typecheck.i Allow using snprintf() instead of sprintf() in wrappers 2023-04-27 10:08:57 +12:00
typemaps.i [OCaml] Move INPUT, OUTPUT, and INOUT typemaps to typemaps.i 2019-02-18 23:02:20 -07:00
typeregister.swg - Improve the runtime type sytesm 2005-02-01 00:08:24 +00:00