Skip to content

Commit

Permalink
Add module-level doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pombredanne committed Jul 29, 2016
1 parent 4204c4e commit 948c769
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pyahocorasick.c
Expand Up @@ -28,6 +28,13 @@
#include "AutomatonSearchIter.c"



#define ahocorasick_doc \
"**pyahocorasick** is a fast and memory efficient library for exact or\n" \
"approximate multi-pattern string search meaning that you can find multiple key\n" \
"strings occurences at once in some input text."


static
PyMethodDef
ahocorasick_module_methods[] = {
Expand Down Expand Up @@ -62,11 +69,11 @@ init_function(void) {
automaton_as_sequence.sq_contains = automaton_contains;

automaton_type.tp_as_sequence = &automaton_as_sequence;

#ifdef PY3K
module = PyModule_Create(&ahocorasick_module);
#else
module = Py_InitModule("ahocorasick", ahocorasick_module_methods);
module = Py_InitModule3("ahocorasick", ahocorasick_module_methods, ahocorasick_doc);
#endif
if (module == NULL)
init_return(NULL);
Expand Down

0 comments on commit 948c769

Please sign in to comment.