dirs: inline string macros
The old code happened to work because of how the macro was defined.
This no longer works in Python 3. Furthermore, assigning to a macro
just feels weird. So just inline the macro.
--- a/mercurial/dirs.c Sat Oct 08 22:44:02 2016 +0200
+++ b/mercurial/dirs.c Sat Oct 08 16:02:51 2016 +0200
@@ -61,8 +61,8 @@
if (key == NULL)
goto bail;
}
- PyString_GET_SIZE(key) = pos;
- PyString_AS_STRING(key)[pos] = '\0';
+ Py_SIZE(key) = pos;
+ ((PyStringObject *)key)->ob_sval[pos] = '\0';
val = PyDict_GetItem(dirs, key);
if (val != NULL) {