Skip to content

Commit 0f223d3

Browse files
committed
small refactor
1 parent 7094b3c commit 0f223d3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

quaddtype/numpy_quaddtype/src/casts.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ extern "C" {
2222
#include "dtype.h"
2323

2424
#define NUM_CASTS 34 // 16 to_casts + 16 from_casts + 1 quad_to_quad + 1 void_to_quad
25+
#define QUAD_STR_WIDTH 50 // 42 is enough for scientific notation float128, just keeping some buffer
2526

2627
static NPY_CASTING
2728
quad_to_quad_resolve_descriptors(PyObject *NPY_UNUSED(self),
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
#ifndef QUAD_UTILITIES_H
22
#define QUAD_UTILITIES_H
33

4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
7+
48
#include "quad_common.h"
59
#include <sleef.h>
610
#include <sleefquad.h>
711
#include <stdbool.h>
812

913
int cstring_to_quad(const char *str, QuadBackendType backend, quad_value *out_value, char **endptr, bool require_full_parse);
1014

15+
#ifdef __cplusplus
16+
}
17+
#endif
18+
1119
#endif

0 commit comments

Comments
 (0)