MCPcopy Create free account
hub / github.com/apache/cloudberry / deccvint

Function deccvint

src/interfaces/ecpg/compatlib/informix.c:248–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248int
249deccvint(int in, decimal *np)
250{
251 numeric *nres;
252 int result = 1;
253
254 rsetnull(CDECIMALTYPE, (char *) np);
255 if (risnull(CINTTYPE, (char *) &in))
256 return 0;
257
258 nres = PGTYPESnumeric_new();
259 if (nres == NULL)
260 return ECPG_INFORMIX_OUT_OF_MEMORY;
261
262 result = PGTYPESnumeric_from_int(in, nres);
263 if (result == 0)
264 result = PGTYPESnumeric_to_decimal(nres, np);
265
266 PGTYPESnumeric_free(nres);
267 return result;
268}
269
270int
271deccvlong(long lng, decimal *np)

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 6

rsetnullFunction · 0.85
risnullFunction · 0.85
PGTYPESnumeric_newFunction · 0.85
PGTYPESnumeric_from_intFunction · 0.85
PGTYPESnumeric_freeFunction · 0.85

Tested by 2

mainFunction · 0.68
mainFunction · 0.68