Skip to content

[q] is there a workaround to serialize a class instance #18

@vladp

Description

@vladp

Created a simple class ( i ) exactly as described
http://lua-users.org/wiki/ObjectOrientationTutorial

then

local d=serpent.dump(i)
local fun, err=loadstring(d)
copy=fun()
print (copy:get_value()) -- attempt to call method 'get_value' ( a nil value)

The serialization does not know, I suspect, about the MyClass and its functions
is there a way to address it somehow?

thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions