diff --git a/pandas/_libs/include/pandas/parser/tokenizer.h b/pandas/_libs/include/pandas/parser/tokenizer.h index aa79e55a72beb..209f375a5bf6c 100644 --- a/pandas/_libs/include/pandas/parser/tokenizer.h +++ b/pandas/_libs/include/pandas/parser/tokenizer.h @@ -18,11 +18,8 @@ See LICENSE for the license #define ERROR_OVERFLOW 2 #define ERROR_INVALID_CHARS 3 -#include "pandas/portable.h" #include -#include "pandas/vendored/klib/khash.h" - #define STREAM_INIT_SIZE 32 #define REACHED_EOF 1 diff --git a/pandas/_libs/include/pandas/vendored/ujson/python/version.h b/pandas/_libs/include/pandas/vendored/ujson/python/version.h deleted file mode 100644 index 4b00670c946af..0000000000000 --- a/pandas/_libs/include/pandas/vendored/ujson/python/version.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (c) 2011-2013, ESN Social Software AB and Jonas Tarnstrom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the ESN Social Software AB nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ESN SOCIAL SOFTWARE AB OR JONAS TARNSTROM BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) -https://github.com/client9/stringencoders -Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights -reserved. - -Numeric decoder derived from TCL library -https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms - * Copyright (c) 1988-1993 The Regents of the University of California. - * Copyright (c) 1994 Sun Microsystems, Inc. -*/ - -#pragma once - -#define UJSON_VERSION "1.33" diff --git a/pandas/_libs/src/parser/pd_parser.c b/pandas/_libs/src/parser/pd_parser.c index 88b6603c3c6f9..2e16f5b756dd0 100644 --- a/pandas/_libs/src/parser/pd_parser.c +++ b/pandas/_libs/src/parser/pd_parser.c @@ -10,6 +10,7 @@ Distributed under the terms of the BSD Simplified License. #include "pandas/parser/pd_parser.h" #include "pandas/parser/io.h" +#include "pandas/portable.h" static int to_double(char *item, double *p_value, char sci, char decimal, int *maybe_int) { diff --git a/pandas/_libs/src/parser/tokenizer.c b/pandas/_libs/src/parser/tokenizer.c index f1de56c465e5f..74a3a51c61e15 100644 --- a/pandas/_libs/src/parser/tokenizer.c +++ b/pandas/_libs/src/parser/tokenizer.c @@ -16,8 +16,8 @@ Python's built-in csv module and Warren Weckesser's textreader project on GitHub. See Python Software Foundation License and BSD licenses for these. */ - #include "pandas/parser/tokenizer.h" +#include "pandas/portable.h" #include #include @@ -25,6 +25,7 @@ GitHub. See Python Software Foundation License and BSD licenses for these. #include #include "pandas/portable.h" +#include "pandas/vendored/klib/khash.h" // for kh_int64_t, kh_destroy_int64 void coliter_setup(coliter_t *self, parser_t *parser, int64_t i, int64_t start) { diff --git a/pandas/_libs/src/vendored/numpy/datetime/np_datetime.c b/pandas/_libs/src/vendored/numpy/datetime/np_datetime.c index f6efae77c5c01..ab24752203c57 100644 --- a/pandas/_libs/src/vendored/numpy/datetime/np_datetime.c +++ b/pandas/_libs/src/vendored/numpy/datetime/np_datetime.c @@ -25,9 +25,8 @@ This file is derived from NumPy 1.7. See NUMPY_LICENSE.txt #include #include "pandas/vendored/numpy/datetime/np_datetime.h" -#include -#include #include +#include #if defined(_WIN32) #ifndef ENABLE_INTSAFE_SIGNED_FUNCTIONS diff --git a/pandas/_libs/src/vendored/numpy/datetime/np_datetime_strings.c b/pandas/_libs/src/vendored/numpy/datetime/np_datetime_strings.c index 3a9a805a9ec45..73bce9ab27a8b 100644 --- a/pandas/_libs/src/vendored/numpy/datetime/np_datetime_strings.c +++ b/pandas/_libs/src/vendored/numpy/datetime/np_datetime_strings.c @@ -32,9 +32,8 @@ This file implements string parsing and creation for NumPy datetime. #include -#include -#include #include +#include #include "pandas/vendored/numpy/datetime/np_datetime.h" #include "pandas/vendored/numpy/datetime/np_datetime_strings.h" diff --git a/pandas/_libs/src/vendored/ujson/lib/ultrajsondec.c b/pandas/_libs/src/vendored/ujson/lib/ultrajsondec.c index a858abf46a598..bf389b4dce1d0 100644 --- a/pandas/_libs/src/vendored/ujson/lib/ultrajsondec.c +++ b/pandas/_libs/src/vendored/ujson/lib/ultrajsondec.c @@ -41,7 +41,6 @@ Numeric decoder derived from TCL library // Licence at LICENSES/ULTRAJSON_LICENSE #include "pandas/vendored/ujson/lib/ultrajson.h" -#include #include #include #include diff --git a/pandas/_libs/src/vendored/ujson/lib/ultrajsonenc.c b/pandas/_libs/src/vendored/ujson/lib/ultrajsonenc.c index 42dfa113e6279..876d9f276f5d2 100644 --- a/pandas/_libs/src/vendored/ujson/lib/ultrajsonenc.c +++ b/pandas/_libs/src/vendored/ujson/lib/ultrajsonenc.c @@ -41,8 +41,6 @@ Numeric decoder derived from TCL library // Licence at LICENSES/ULTRAJSON_LICENSE #include "pandas/vendored/ujson/lib/ultrajson.h" -#include -#include #include #include #include diff --git a/pandas/_libs/src/vendored/ujson/python/objToJSON.c b/pandas/_libs/src/vendored/ujson/python/objToJSON.c index 9f1c1d3f857d1..bb8a19f01d654 100644 --- a/pandas/_libs/src/vendored/ujson/python/objToJSON.c +++ b/pandas/_libs/src/vendored/ujson/python/objToJSON.c @@ -40,7 +40,6 @@ Numeric decoder derived from TCL library #define PY_SSIZE_T_CLEAN #include -#include #define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL UJSON_NUMPY diff --git a/pandas/_libs/src/vendored/ujson/python/ujson.c b/pandas/_libs/src/vendored/ujson/python/ujson.c index 736089c48e3ee..351f5226b57c9 100644 --- a/pandas/_libs/src/vendored/ujson/python/ujson.c +++ b/pandas/_libs/src/vendored/ujson/python/ujson.c @@ -38,7 +38,6 @@ Numeric decoder derived from TCL library // Licence at LICENSES/ULTRAJSON_LICENSE -#include "pandas/vendored/ujson/python/version.h" #define PY_SSIZE_T_CLEAN #include #define PY_ARRAY_UNIQUE_SYMBOL UJSON_NUMPY