lua-users home
lua-l archive

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


mgmsky wrote:
I need to explain the data packets from the customer inside LUA. it needs to convey a string inside LUA, so i use lua_pushlstring, but people response that lua_pushlstring is in low
efficiency and advise not to use it often.

Is this for a Wireshark dissector?

Do you have any measurements (profiling) to indicate the lua_pushlstring() is causing problems?

You cannot avoid using lua_pushlstring() if you really must exchange strings between Lua and C. I can imagine cases (very large volumes of traffic, say) where dissectors would be slow enough to get in the way, but I have not experienced that problem myself.

Doug