lambda-calc-1/parse/position/clone.c
2025-01-13 20:36:07 -06:00

29 lines
453 B
C

#include <debug.h>
#include <memory/smalloc.h>
#include <string/inc.h>
#include "struct.h"
#include "clone.h"
struct position* clone_position(
const struct position* cloneme)
{
ENTER;
struct position* this = smalloc(sizeof(*this));
this->filename = inc_string(cloneme->filename);
this->line = cloneme->line;
this->column = cloneme->column;
this->refcount = 1;
EXIT;
return this;
}