fix string array declarations and typo

This commit is contained in:
Thomas Fussell 2017-07-03 06:19:06 -07:00
parent 16683e4fbd
commit 49f520a9ed
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,5 @@
from distutils.core import setup, Extension, sysconfig from distutils.core import setup, Extension
from distutils import sysconfig
description = """ description = """
xlntpyarrow allows Apache Arrow tables to be written to and read from an XLSX xlntpyarrow allows Apache Arrow tables to be written to and read from an XLSX

View File

@ -31,7 +31,7 @@ Returns an arrow table representing the given XLSX file object.");
PyObject *xlntpyarrow_xlsx2arrow(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *xlntpyarrow_xlsx2arrow(PyObject *self, PyObject *args, PyObject *kwargs)
{ {
PyObject *file = nullptr; PyObject *file = nullptr;
static auto keywords = { "file", nullptr }; static const char *keywords[] = { "file", nullptr };
static auto keywords_nc = const_cast<char **>(keywords); static auto keywords_nc = const_cast<char **>(keywords);
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords_nc, &file)) if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords_nc, &file))
@ -53,12 +53,12 @@ Writes the given arrow table to out_file as an XLSX file.");
PyObject *xlntpyarrow_arrow2xlsx(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *xlntpyarrow_arrow2xlsx(PyObject *self, PyObject *args, PyObject *kwargs)
{ {
PyObject *obj = nullptr; PyObject *obj = nullptr;
static auto keywords = { "file", nullptr }; static const char *keywords[] = { "file", nullptr };
static auto keywords_nc = const_cast<char **>(keywords); static auto keywords_nc = const_cast<char **>(keywords);
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi", keywords_nc, &obj)) if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi", keywords_nc, &obj))
{ {
return nulllptr; return nullptr;
} }
Py_RETURN_NONE; Py_RETURN_NONE;