title: Lua: "Hide" functions
body: <p>I want to call c functions from lua to change variables defined in C, but I don't want the lua "user" to realize they are functions.</p>
  
  <p>For example, consider an integer and an array created in c:</p>
  
  <pre><code>int c_level = 0;
  int c_map[4] = {0,0,0,0}; 
  </code></pre>
  
  <p>Now the program creates a Lua state and runs this:</p>
  
  <pre><code>set_level(2) --c_level = 2
  set_tile(1,23) --c_map[0] = 23
  </code></pre>
  
  <p>I want them to look like this in the lua script:</p>
  
  <pre><code>L_level = 2
  L_map[1] = 23
  </code></pre>
  
  <p>So, <strong>L_level</strong> and <strong>L_map</strong> would be functions defined in C.</p>
  
  <p><strong>L_level</strong>'s argument would be "2".</p>
  
  <p><strong>L_map</strong>'s arguments are "1" and "23".</p>
  
  <p>Is that possible?.</p>
  
  <p>I can get the lua variables using getglobal, but I wanted to know if I can create some lua functions that look like the ones I showed.</p>
  
  <p>Thanks.</p>