Don't construct T* const& types for attribute access.
[luabind.git] / doc / raw.rst
blobf65235aaf23557d61e540391fec92c1d3b82ac66
1 raw
2 ---
4 .. note::
6     ``raw()`` has been deprecated. ``lua_State*`` parameters are
7     automatically handled by luabind.
9 Motivation
10 ~~~~~~~~~~
12 This converter policy will pass through the ``lua_State*`` unmodified.
13 This can be useful for example when binding functions that need to 
14 return a ``luabind::object``. The parameter will be removed from the
15 function signature, decreasing the function arity by one.
17 Defined in
18 ~~~~~~~~~~
20 .. parsed-literal::
22     #include <luabind/raw_policy.hpp>
24 Synopsis
25 ~~~~~~~~
27 .. parsed-literal::
29     raw(index)
31 Parameters
32 ~~~~~~~~~~
34 ============= ===============================================================
35 Parameter     Purpose
36 ============= ===============================================================
37 ``index``     The index of the lua_State* parameter.
38 ============= ===============================================================
40 Example
41 ~~~~~~~
43 .. parsed-literal::
45     void greet(lua_State* L)
46     {
47         lua_pushstring(L, "hello");
48     }
50     ...
52     module(L)
53     [
54         def("greet", &greet, **raw(_1)**)
55     ];
57     > print(greet())
58     hello