Skip to content

Commit

Permalink
Remove .clang-format for now
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimes committed Aug 25, 2024
1 parent 5bb389e commit 40d33d4
Show file tree
Hide file tree
Showing 7 changed files with 1,271 additions and 1,465 deletions.
67 changes: 0 additions & 67 deletions .clang-format

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
- name: Run Super-Linter
uses: super-linter/[email protected]
env:
CLANG_FORMAT_FILE_NAME: .clang-format
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Suppressed because it conflicts with clang-format in some cases
VALIDATE_CPP: false
Expand Down
47 changes: 23 additions & 24 deletions src/mmh3/hashlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,27 @@
* of PyObject_GetBuffer. Sets an exception and issues the erraction
* on any errors, e.g. 'return NULL' or 'goto error'.
*/
#define GET_BUFFER_VIEW_OR_ERROR(obj, viewp, erraction) \
do { \
if (PyUnicode_Check((obj))) { \
PyErr_SetString(PyExc_TypeError, \
"Strings must be encoded before hashing"); \
erraction; \
} \
if (!PyObject_CheckBuffer((obj))) { \
PyErr_SetString(PyExc_TypeError, \
"object supporting the buffer API required"); \
erraction; \
} \
if (PyObject_GetBuffer((obj), (viewp), PyBUF_SIMPLE) == -1) { \
erraction; \
} \
if ((viewp)->ndim > 1) { \
PyErr_SetString(PyExc_BufferError, \
"Buffer must be single dimension"); \
PyBuffer_Release((viewp)); \
erraction; \
} \
} while (0)
#define GET_BUFFER_VIEW_OR_ERROR(obj, viewp, erraction) \
do { \
if (PyUnicode_Check((obj))) { \
PyErr_SetString(PyExc_TypeError, \
"Strings must be encoded before hashing"); \
erraction; \
} \
if (!PyObject_CheckBuffer((obj))) { \
PyErr_SetString(PyExc_TypeError, \
"object supporting the buffer API required"); \
erraction; \
} \
if (PyObject_GetBuffer((obj), (viewp), PyBUF_SIMPLE) == -1) { \
erraction; \
} \
if ((viewp)->ndim > 1) { \
PyErr_SetString(PyExc_BufferError, "Buffer must be single dimension"); \
PyBuffer_Release((viewp)); \
erraction; \
} \
} while (0)

#define GET_BUFFER_VIEW_OR_ERROUT(obj, viewp) \
GET_BUFFER_VIEW_OR_ERROR(obj, viewp, return NULL)
#define GET_BUFFER_VIEW_OR_ERROUT(obj, viewp) \
GET_BUFFER_VIEW_OR_ERROR(obj, viewp, return NULL)
Loading

0 comments on commit 40d33d4

Please sign in to comment.