Fast and robust implementation of shlex.split

Also returns position of words in src string which we will need for
keymap parsing.
This commit is contained in:
Kovid Goyal
2023-12-02 14:53:00 +05:30
parent 0d10ee1a8c
commit b0ba4b4a42
5 changed files with 203 additions and 3 deletions

View File

@@ -25,7 +25,6 @@
#include "modes.h"
#include <stddef.h>
#include <termios.h>
#include <signal.h>
#include <fcntl.h>
#include <stdio.h>
#include <locale.h>
@@ -367,6 +366,7 @@ static struct PyModuleDef module = {
extern int init_LineBuf(PyObject *);
extern int init_HistoryBuf(PyObject *);
extern int init_Cursor(PyObject *);
extern int init_Shlex(PyObject *);
extern int init_DiskCache(PyObject *);
extern bool init_child_monitor(PyObject *);
extern int init_Line(PyObject *);
@@ -430,6 +430,7 @@ PyInit_fast_data_types(void) {
if (!init_HistoryBuf(m)) return NULL;
if (!init_Line(m)) return NULL;
if (!init_Cursor(m)) return NULL;
if (!init_Shlex(m)) return NULL;
if (!init_DiskCache(m)) return NULL;
if (!init_child_monitor(m)) return NULL;
if (!init_ColorProfile(m)) return NULL;