Wireshark-commits: [Wireshark-commits] rev 25845: /trunk/epan/wslua/ /trunk/epan/wslua/: init_wslua
Date: Sat, 26 Jul 2008 23:41:34 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=25845

User: lego
Date: 2008/07/26 04:41 PM

Log:
 From Balint Reczey
 
 Fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2453
 
 The patch fixes the problem by extending the original "outstanding stuff"
 approach.
 
 Now the pointer itself won't be NULLified, instead we track the pointers with
 their expiry state in structs in the outstanding_stuff list.
 The Lua objects refers to those structs instead of the actual pointers and
 checks the expiry state of the pointers before accessing them.
 The pointers are marked expired when the dissection of the frame is finished
 and the allocated struct is freed by Lua's garbage collector.
 
 If the garbage collector hits the struct when it holds a not expired pointer,
 it marks it as expired (that means we don't have any object in Lua referring to
 the pointer) and the struct will be freed at the end of the dissection of the
 frame.
 
 this is for the 1.0 branch

Directory: /trunk/epan/wslua/
  Changes    Path                Action
  +7 -4      init_wslua.c        Modified
  +43 -10    wslua.h             Modified
  +2 -1      wslua_field.c       Modified
  +4 -3      wslua_listener.c    Modified
  +166 -50   wslua_pinfo.c       Modified
  +5 -5      wslua_proto.c       Modified
  +66 -28    wslua_tree.c        Modified
  +168 -67   wslua_tvb.c         Modified