I have something like this in a C++ extension:
char* kwlist[] = {"x", "W"};
if (!PyArg_ParseTupleAndKeywords(args, kwrds, "OO", kwlist, &x, &W)) return NULL;
The compiler complains that:
warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
What is the best way to get rid of this warning?
I tried:
char const* kwlist[] = {"x", "W"};
But that fails with:
candidate function not viable: no known conversion from 'const char [2]' to 'char *'