예제 #1
0
파일: term.cpp 프로젝트: levelplane/circa
void term_move_property(Term* from, Term* to, const char* propName)
{
    if (!from->hasProperty(propName))
        return;

    term_set_property(to, propName, term_get_property(from, propName));
    term_remove_property(from, propName);
}
예제 #2
0
파일: term.cpp 프로젝트: andyfischer/circa
void term_move_property(Term* from, Term* to, Symbol key)
{
    Value* existing = term_get_property(from, key);
    if (existing == NULL)
        return;

    term_set_property(to, key, existing);
    term_remove_property(from, key);
}