From dc66176c4b48d5faf4cec0cb118e208d8b15593b Mon Sep 17 00:00:00 2001 From: Daniel Wallin Date: Sun, 4 Apr 2004 15:37:12 +0000 Subject: [PATCH] *** empty log message *** --- doc/docs.rst | 24 ++++++++++++++++++++---- luabind/class.hpp | 2 +- test/test_scope.cpp | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/doc/docs.rst b/doc/docs.rst index 539e84f..27e9fab 100755 --- a/doc/docs.rst +++ b/doc/docs.rst @@ -684,7 +684,7 @@ to wrap a nested class, or a static function. :: class_("foo") .def(constructor<>() ... - .static_ + .scope [ class_("nested"), def("f", &f) @@ -1209,7 +1209,7 @@ class for our C++ base class. This is the class that will hold the lua object when we instantiate a lua class. The wrapper class has to provide the same constructors as the base class, with -the addition of one extra parameter: ``luabind::object``. This is the reference +the addition of one extra parameter: ``luabind::weak_ref``. This is the reference to the lua object that should be held by the wrapper, and should be stored in a member variable as done in the sample below. :: @@ -1225,8 +1225,8 @@ member variable as done in the sample below. :: struct base_wrapper : base { - object self; - base_wrapper(object self_, const char* s) + weak_ref self; + base_wrapper(weak_ref self_, const char* s) : base(s), self(self_) {} @@ -1859,6 +1859,22 @@ module_ab.cpp:: Configuration ============= +As mentioned in ``the Lua documentation``_, it is possible to pass an +error handler function to ``lua_pcall()``. Luabind makes use of +``lua_pcall()`` internally when calling methods and functions. It is +possible to set the error handler function that Luabind will use +globally:: + + typedef void(*pcall_callback_fun)(lua_State*); + void set_pcall_callback(pcall_callback_fun fn); + +This is primarily useful for adding more information to the error message +returned by a failed protected call. + + +Build options +------------- + There are a number of configuration options available when building luabind. It is very important that your project has the exact same conmfiguration options as the ones given when the library was build! The exceptions are the diff --git a/luabind/class.hpp b/luabind/class.hpp index 8fbd117..a6b0f0e 100644 --- a/luabind/class.hpp +++ b/luabind/class.hpp @@ -1156,7 +1156,7 @@ namespace luabind return detail::enum_maker(*this); } - detail::static_scope static_; + detail::static_scope scope; private: diff --git a/test/test_scope.cpp b/test/test_scope.cpp index bdd035f..3e095a6 100755 --- a/test/test_scope.cpp +++ b/test/test_scope.cpp @@ -70,7 +70,7 @@ void test_scope() class_("test_class") .def(constructor<>()) .def_readonly("test", &test_class::test) - .static_ + .scope [ def("inner_fun", &f) ] -- 2.11.4.GIT