Ardour  8.7-15-gadf511264b
Stack< int > Struct Reference

#include <Stack.h>

Static Public Member Functions

static void push (lua_State *L, int value)
 
static int get (lua_State *L, int index)
 

Detailed Description

Stack specialization for passing references to built-in types.

This allows to call functions using primitives, but the value assigned by the C++ function is lost.

http://sourceforge.net/p/luabind/mailman/message/32692027/

Alternatives:

  • wrap all C++ function that have non const reference arguments (cleanest solution)
  • use a struct to wrap the value (not a primitive) (needs major work to special case arguments in CFunc::)
  • wrap the function and provide the assigned value as addition return values

Either would place hard constraints on the lua code though.

We currently only need this for Ardour::Editor::do_import() framecnt_t& and the returned position is not important. Stack specialization for int.

Definition at line 92 of file Stack.h.

Member Function Documentation

◆ get()

static int Stack< int >::get ( lua_State L,
int  index 
)
inlinestatic

Definition at line 99 of file Stack.h.

◆ push()

static void Stack< int >::push ( lua_State L,
int  value 
)
inlinestatic

Definition at line 94 of file Stack.h.


The documentation for this struct was generated from the following file: