<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -205,8 +205,9 @@ void my_lua_error( lua_State *L, const char *errmsg )
 int check_num_args( lua_State *L, int desired_n )
 {
   int n = lua_gettop( L );   /* number of arguments on stack */
-  if ( n != desired_n ) {
-    char s[ 100 ];
+  if ( n != desired_n )
+  {
+    char s[ 100 ]; /* @@@ can we cut this down? */
     sprintf( s, &quot;must have %d argument%c&quot;, desired_n,
        ( desired_n == 1 ) ? '\0' : 's' );
     my_lua_error( L, s );
@@ -537,7 +538,7 @@ Handle *handle_create( lua_State *L )
   return h;
 }
 
-static Helper * helper_create( lua_State *L, Handle *handle, const char *funcname )
+static Helper *helper_create( lua_State *L, Handle *handle, const char *funcname )
 {
   Helper *h = ( Helper * )lua_newuserdata( L, sizeof( Helper ) );
   luaL_getmetatable( L, &quot;rpc.helper&quot; );
@@ -574,7 +575,7 @@ static int handle_index (lua_State *L)
 static int helper_newindex( lua_State *L );
 
 /* indexing a handle returns a helper */
-static int handle_newindex (lua_State *L)
+static int handle_newindex( lua_State *L )
 {
   const char *s;
   Helper *h;
@@ -589,11 +590,7 @@ static int handle_newindex (lua_State *L)
     my_lua_error( L, &quot;function name is too long&quot; );
   
   h = helper_create( L, ( Handle * )lua_touserdata( L, 1 ), &quot;&quot; );
-
-  /* Repush stack items 2 &amp; 3 for __newindex event */
-  /* @@@@ Probably shoud replace handle in the stack... */
-  lua_pushvalue( L, 2 );
-  lua_pushvalue( L, 3 );
+	lua_replace(L, 1);
 
   helper_newindex( L );
 
@@ -984,12 +981,11 @@ static int rpc_close( lua_State *L )
 }
 
 
-
 /* rpc_async (handle,)
  *     this sets a handle's asynchronous calling mode (0/nil=off, other=on).
  *     (this is for the client only).
  */
-
+/* @@@ This should probably be adjusted to be in line with our new multiple command architecture */
 static int rpc_async (lua_State *L)
 {
   Handle *handle;
@@ -1196,7 +1192,6 @@ static ServerHandle *rpc_listen_helper( lua_State *L )
 
 
 /* rpc_listen (port) --&gt; server_handle */
-
 static int rpc_listen( lua_State *L )
 {
   ServerHandle *handle;
@@ -1210,7 +1205,6 @@ static int rpc_listen( lua_State *L )
 
 
 /* rpc_peek (server_handle) --&gt; 0 or 1 */
-
 static int rpc_peek( lua_State *L )
 {
   ServerHandle *handle;
@@ -1530,4 +1524,4 @@ LUALIB_API int luaopen_luarpc(lua_State *L)
 
 #endif
 
-#endif
\ No newline at end of file
+#endif</diff>
      <filename>luarpc.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c1cce9ae0baa2ab2ce214b0cc4a91ec78c1bc940</id>
    </parent>
    <parent>
      <id>f50f60bb9df5718ef0d4afe97fa81fffafc73811</id>
    </parent>
  </parents>
  <author>
    <name>James Snyder</name>
    <email>jbsnyder@fanplastic.org</email>
  </author>
  <url>http://github.com/jsnyder/luarpc/commit/75f1eeb151e9e356446cacb1b60952558826e122</url>
  <id>75f1eeb151e9e356446cacb1b60952558826e122</id>
  <committed-date>2009-06-14T17:38:33-07:00</committed-date>
  <authored-date>2009-06-14T17:38:33-07:00</authored-date>
  <message>Merge branch 'master' of git@github.com:jsnyder/luarpc</message>
  <tree>d902285b4f03672e1924251772d4b90271a50fe5</tree>
  <committer>
    <name>James Snyder</name>
    <email>jbsnyder@fanplastic.org</email>
  </committer>
</commit>
