Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/lua/gpio also register gpio_methods on the gpio table



details:   https://anonhg.NetBSD.org/src/rev/f696911ef419
branches:  trunk
changeset: 790906:f696911ef419
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sat Oct 26 09:18:00 2013 +0000

description:
also register gpio_methods on the gpio table

diffstat:

 lib/lua/gpio/gpio.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 97c2f48907d0 -r f696911ef419 lib/lua/gpio/gpio.c
--- a/lib/lua/gpio/gpio.c       Sat Oct 26 09:16:19 2013 +0000
+++ b/lib/lua/gpio/gpio.c       Sat Oct 26 09:18:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gpio.c,v 1.7 2012/03/15 02:02:21 joerg Exp $ */
+/*     $NetBSD: gpio.c,v 1.8 2013/10/26 09:18:00 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2011 Marc Balmer <marc%msys.ch@localhost>
@@ -255,13 +255,14 @@
 gpio_set_info(lua_State *L)
 {
        lua_pushliteral(L, "_COPYRIGHT");
-       lua_pushliteral(L, "Copyright (C) 2011 Marc Balmer <marc%msys.ch@localhost>");
+       lua_pushliteral(L, "Copyright (C) 2011, 2013 Marc Balmer "
+           "<marc%msys.ch@localhost>");
        lua_settable(L, -3);
        lua_pushliteral(L, "_DESCRIPTION");
        lua_pushliteral(L, "GPIO interface for Lua");
        lua_settable(L, -3);
        lua_pushliteral(L, "_VERSION");
-       lua_pushliteral(L, "gpio 1.0.1");
+       lua_pushliteral(L, "gpio 1.0.2");
        lua_settable(L, -3);
 }
 
@@ -288,6 +289,7 @@
        int n;
 
        luaL_register(L, "gpio", methods);
+       luaL_register(L, NULL, gpio_methods);
        gpio_set_info(L);
 
        /* The gpio metatable */



Home | Main Index | Thread Index | Old Index