Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
LuaTable :
Browse files Browse the repository at this point in the history
- remove unsane VTABLE set_pmc
- overload VTABLE assign_pmc
  • Loading branch information
fperrad committed Sep 26, 2009
1 parent d71af84 commit c3091a8
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/pmc/luatable.pmc
Expand Up @@ -470,19 +470,14 @@ therefore only clone the reference to themselves, not make a deep copy.

/*

=item C<void set_pmc(PMC *other)>
=item C<void assign_pmc(PMC *value)>

=cut

*/
VTABLE void set_pmc(PMC *other) {
if (PMC_type(SELF) == PMC_type(value))
memcpy(PMC_data(SELF), PMC_data(value),
sizeof (Parrot_LuaTable_attributes));
else
Parrot_ex_throw_from_c_args(INTERP, NULL,
EXCEPTION_INVALID_OPERATION,
"Can't assign a non-LuaTable type to a LuaTable");
VTABLE void assign_pmc(PMC *value) {
lua_destroy_table(INTERP, PARROT_LUATABLE(SELF));
SUPER(value);
}

/*
Expand Down

0 comments on commit c3091a8

Please sign in to comment.