lua-users home
lua-l archive

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


Hello all,
  The last email is not show normally. so I send again.    
I have a simple Lua file, for example, hello.lua. The contents of the file is as the following:

#/usr/bin/lua
print('hello')

 I first read the file content into a buffer. And then use luaL_loadbuffer to load the buffer and finally use lua_pcall to call the function. However, 
I have found that luaL_loadbuffer cannot return 0 because it does not deal with this case. 

Do you think this is a feature missing? If it does, I would like to commit the code to deal with that.
Thank you.

Baozeng <sploving1@gmail.com> 于2019年5月22日周三 上午9:19写道:
Hello all,
    I have a simple Lua file, for example, hello.lua. The contents of the file is as the following:

#/usr/bin/lua
print('hello')

 I first read the file content into a buffer. And then use luaL_loadbuffer to load the buffer and finally use lua_pcall to call the function. However, 
I have found that luaL_loadbuffer cannot return 0 because it does not deal with this case. 

Do you think this is a feature missing? If it does, I would like to commit the code to deal with that.
Thank you.

--
     Best Regards,
     Baozeng Ding
                                                                


--
     Best Regards,
     Baozeng Ding