Skip to content

Commit

Permalink
Remove duplicate const definition - fixes header guard name
Browse files Browse the repository at this point in the history
  • Loading branch information
chaburkland committed Jun 24, 2024
1 parent 61653d3 commit 8d551e9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/delimited_to_arrays.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#define AK_is_t(c) (((c) == 't') || ((c) == 'T'))
#define AK_is_u(c) (((c) == 'u') || ((c) == 'U'))

static const size_t UCS4_SIZE = sizeof(Py_UCS4);

//------------------------------------------------------------------------------
// Utility setters of C types from possibly NULL PyObject*; all return -1 on error.

Expand Down
6 changes: 3 additions & 3 deletions src/delimited_to_arrays.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ifndef ARRAYKIT_SRC_FILE_PARSING_H_
# define ARRAYKIT_SRC_FILE_PARSING_H_
# ifndef ARRAYKIT_SRC_DELIMITED_TO_ARRAYS_H_
# define ARRAYKIT_SRC_DELIMITED_TO_ARRAYS_H_

# include "Python.h"

Expand All @@ -13,4 +13,4 @@ iterable_str_to_array_1d(PyObject *Py_UNUSED(m), PyObject *args, PyObject *kwarg
PyObject *
split_after_count(PyObject *Py_UNUSED(m), PyObject *args, PyObject *kwargs);

# endif /* ARRAYKIT_SRC_FILE_PARSING_H_ */
# endif /* ARRAYKIT_SRC_DELIMITED_TO_ARRAYS_H_ */
2 changes: 0 additions & 2 deletions src/tri_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# include "tri_map.h"
# include "utilities.h"

static const size_t UCS4_SIZE = sizeof(Py_UCS4);

static inline NPY_DATETIMEUNIT
AK_dt_unit_from_array(PyArrayObject* a) {
// This is based on get_datetime_metadata_from_dtype in the NumPy source, but that function is private. This does not check that the dtype is of the appropriate type.
Expand Down
2 changes: 2 additions & 0 deletions src/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

# include "numpy/arrayobject.h"

static const size_t UCS4_SIZE = sizeof(Py_UCS4);

//------------------------------------------------------------------------------
// Macros
//------------------------------------------------------------------------------
Expand Down

0 comments on commit 8d551e9

Please sign in to comment.