29 lines
453 B
C
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;
|
|
}
|
|
|