@@ -15,6 +15,11 @@ local module_info = {
1515 _COPYRIGHT = " Copyright (c) 2014-2017 Alexey Melnichuk" ;
1616}
1717
18+ local function hash_id (str )
19+ local id = string.match (str , " %((.-)%)" ) or string.match (str , ' : (%x+)$' )
20+ return id
21+ end
22+
1823local function clone (t , o )
1924 o = o or {}
2025 for k ,v in pairs (t ) do o [k ]= v end
@@ -485,6 +490,11 @@ function Form:add(data)
485490 return form_add (self , data )
486491end
487492
493+ function Form :__tostring ()
494+ local id = hash_id (tostring (self ._handle ))
495+ return string.format (" %s %s (%s)" , module_info ._NAME , ' Form' , id )
496+ end
497+
488498end
489499---- ---------------------------------------
490500
@@ -570,6 +580,11 @@ function Easy:setopt(k, v)
570580 return setopt (self , k , v )
571581end
572582
583+ function Easy :__tostring ()
584+ local id = hash_id (tostring (self ._handle ))
585+ return string.format (" %s %s (%s)" , module_info ._NAME , ' Easy' , id )
586+ end
587+
573588end
574589---- ---------------------------------------
575590
@@ -687,6 +702,11 @@ function Multi:setopt(k, v)
687702 return setopt (self , k , v )
688703end
689704
705+ function Multi :__tostring ()
706+ local id = hash_id (tostring (self ._handle ))
707+ return string.format (" %s %s (%s)" , module_info ._NAME , ' Multi' , id )
708+ end
709+
690710end
691711---- ---------------------------------------
692712
0 commit comments