Lutok: anonymous_namespace{operations_test.cpp} Namespace Reference

Lutok 0.4

- Main Page
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Macros
Functions
anonymous_namespace{operations_test.cpp} Namespace Reference

## Functions
static int | hook_add (lutok::state &state)
| Addition function for injection into Lua.
static int | hook_multiply (lutok::state &state)
| Multiplication function for injection into Lua.

## Function Documentation

static int anonymous_namespace{operations_test.cpp}::hook_add | ( | lutok::state & | state | ) |
| static

Addition function for injection into Lua.

Precondition:
  stack(-2) The first summand.
  stack(-1) The second summand.

Postcondition:
  stack(-1) The result of the sum.

Parameters:

  state | The Lua state.

Returns:
  The number of results (1).

static int anonymous_namespace{operations_test.cpp}::hook_multiply | ( | lutok::state & | state | ) |
| static

Multiplication function for injection into Lua.

Precondition:
  stack(-2) The first factor.
  stack(-1) The second factor.

Postcondition:
  stack(-1) The product.

Parameters:

  state | The Lua state.

Returns:
  The number of results (1).