Skip to content

Commit b406848

Browse files
committed
Replace tabs with spaces
Finally!
1 parent 8358037 commit b406848

18 files changed

+2429
-2433
lines changed

Automaton.c

+910-911
Large diffs are not rendered by default.

Automaton.h

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
This is part of pyahocorasick Python module.
2+
This is part of pyahocorasick Python module.
33
4-
Automaton class methods
4+
Automaton class methods
55
66
Author : Wojciech Muła, [email protected]
77
WWW : http://0x80.pl
@@ -14,9 +14,9 @@
1414
#include "trie.h"
1515

1616
typedef enum {
17-
EMPTY = 0,
18-
TRIE = 1,
19-
AHOCORASICK = 2
17+
EMPTY = 0,
18+
TRIE = 1,
19+
AHOCORASICK = 2
2020
} AutomatonKind;
2121

2222

@@ -25,9 +25,9 @@ check_kind(const int kind);
2525

2626

2727
typedef enum {
28-
STORE_INTS = 10,
29-
STORE_LENGTH = 20,
30-
STORE_ANY = 30
28+
STORE_INTS = 10,
29+
STORE_LENGTH = 20,
30+
STORE_ANY = 30
3131
} KeysStore;
3232

3333

@@ -36,7 +36,7 @@ check_store(const int store);
3636

3737

3838
typedef enum {
39-
KEY_STRING = 100,
39+
KEY_STRING = 100,
4040
KEY_SEQUENCE = 200
4141
} KeyType;
4242

@@ -46,47 +46,47 @@ check_key_type(const int key_type);
4646

4747

4848
struct Input {
49-
Py_ssize_t wordlen;
50-
TRIE_LETTER_TYPE* word;
51-
PyObject* py_word;
52-
bool is_copy;
49+
Py_ssize_t wordlen;
50+
TRIE_LETTER_TYPE* word;
51+
PyObject* py_word;
52+
bool is_copy;
5353
};
5454

5555

5656
typedef struct AutomatonStatistics {
57-
int version;
58-
59-
ssize_t nodes_count; ///< total number of nodes
60-
ssize_t words_count; ///< len(automaton)
61-
ssize_t longest_word; ///< longest word
62-
ssize_t links_count; ///< links count
63-
ssize_t sizeof_node; ///< size of single node (a C structure)
64-
ssize_t total_size; ///< total size in bytes
57+
int version;
58+
59+
ssize_t nodes_count; ///< total number of nodes
60+
ssize_t words_count; ///< len(automaton)
61+
ssize_t longest_word; ///< longest word
62+
ssize_t links_count; ///< links count
63+
ssize_t sizeof_node; ///< size of single node (a C structure)
64+
ssize_t total_size; ///< total size in bytes
6565
} AutomatonStatistics;
6666

6767

6868
typedef struct Automaton {
69-
PyObject_HEAD
69+
PyObject_HEAD
7070

71-
AutomatonKind kind; ///< current kind of automaton
72-
KeysStore store; ///< type of values: copy of string, bare integer, python object
71+
AutomatonKind kind; ///< current kind of automaton
72+
KeysStore store; ///< type of values: copy of string, bare integer, python object
7373
KeyType key_type; ///< type of keys: strings or integer sequences
74-
int count; ///< number of distinct words
75-
int longest_word; ///< length of the longest word
76-
TrieNode* root; ///< root of a trie
74+
int count; ///< number of distinct words
75+
int longest_word; ///< length of the longest word
76+
TrieNode* root; ///< root of a trie
7777

78-
int version; ///< current version of automaton, incremented by add_word, clean and make_automaton; used to lazy invalidate iterators
78+
int version; ///< current version of automaton, incremented by add_word, clean and make_automaton; used to lazy invalidate iterators
7979

80-
AutomatonStatistics stats; ///< statistics
80+
AutomatonStatistics stats; ///< statistics
8181
} Automaton;
8282

8383
/*------------------------------------------------------------------------*/
8484

8585
static bool
8686
automaton_unpickle(
87-
Automaton* automaton,
88-
PyObject* bytes_list,
89-
PyObject* values
87+
Automaton* automaton,
88+
PyObject* bytes_list,
89+
PyObject* values
9090
);
9191

9292
static PyObject*

0 commit comments

Comments
 (0)