2016-11-25 17:18:40 +01:00
|
|
|
#include "os.h"
|
|
|
|
#include <mp.h>
|
|
|
|
#include "dat.h"
|
|
|
|
|
|
|
|
mpint*
|
|
|
|
mpfield(mpint *N)
|
|
|
|
{
|
|
|
|
Mfield *f;
|
|
|
|
|
|
|
|
if(N == nil || N->flags & (MPfield|MPstatic))
|
|
|
|
return N;
|
|
|
|
if((f = cnfield(N)) != nil)
|
|
|
|
goto Exchange;
|
|
|
|
if((f = gmfield(N)) != nil)
|
|
|
|
goto Exchange;
|
|
|
|
return N;
|
|
|
|
Exchange:
|
2017-04-19 23:33:14 +02:00
|
|
|
jehanne_setmalloctag(f, jehanne_getcallerpc());
|
2016-11-25 17:18:40 +01:00
|
|
|
mpfree(N);
|
|
|
|
return f;
|
|
|
|
}
|