From 46b107712f0a034b72a6966ecb3223db22cfdef7 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 13 Sep 2016 14:08:44 -0400 Subject: [PATCH] [ci skip] spelling errors --- docs/source/api/simple_usertype.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/source/api/simple_usertype.rst b/docs/source/api/simple_usertype.rst index 2fa49f5b..4b787464 100644 --- a/docs/source/api/simple_usertype.rst +++ b/docs/source/api/simple_usertype.rst @@ -6,4 +6,8 @@ structures and classes from C++ made available to Lua code (simpler) This type is no different from :doc:`regular usertype`, but allows much of its work to be done at runtime instead of compile-time. The goal here was to avoid compiler complaints about too-large usertypes (some individuals needed to register 190+ functions, and the compiler choked from the templated implementation of ``usertype``). As of Sol 2.14, this implementation has been heavily refactored to allow for all the same syntax and uses of usertype to apply here, with no caveats. -Some developers used ``simple_usertype`` to have variables autoamtically be functions. To achieve this behavior, wrap the desired variable into :doc:`sol::as_function`. \ No newline at end of file +Some developers used ``simple_usertype`` to have variables automatically be functions. To achieve this behavior, wrap the desired variable into :doc:`sol::as_function`. + +The performance `seems to be good enough`_ to not warn about any implications of having to serialize things at runtime. You do run the risk of using (slightly?) more memory, however, since variables and functions need to be stored differently and separately from the metatable data itself like with a regular ``usertype``. + +.. _seems to be good enough: https://github.com/ThePhD/sol2/issues/202#issuecomment-246767629 \ No newline at end of file