MCPcopy Create free account
hub / github.com/numpy/numpy / NumPyOS_ascii_strtod_plain

Function NumPyOS_ascii_strtod_plain

numpy/core/src/common/numpyos.c:435–450  ·  view source on GitHub ↗

* NumPyOS_ascii_strtod_plain: * * PyOS_ascii_strtod work-alike, with no enhanced features, * for forward compatibility with Python >= 2.7 */

Source from the content-addressed store, hash-verified

433 * for forward compatibility with Python >= 2.7
434 */
435static double
436NumPyOS_ascii_strtod_plain(const char *s, char** endptr)
437{
438 double result;
439 NPY_ALLOW_C_API_DEF;
440 NPY_ALLOW_C_API;
441 result = PyOS_string_to_double(s, endptr, NULL);
442 if (PyErr_Occurred()) {
443 if (endptr) {
444 *endptr = (char*)s;
445 }
446 PyErr_Clear();
447 }
448 NPY_DISABLE_C_API;
449 return result;
450}
451
452/*
453 * NumPyOS_ascii_strtod:

Callers 1

NumPyOS_ascii_strtodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected