Kaydet (Commit) accfb849 authored tarafından Barry Warsaw's avatar Barry Warsaw

added PyString_GET_SIZE macro

for both PyString_GET_SIZE and PyString_AS_STRING, cast first argument
to a PyStringObject*
üst 1f2bd07a
......@@ -79,7 +79,8 @@ extern int _PyString_Resize Py_PROTO((PyObject **, int));
extern PyObject *PyString_Format Py_PROTO((PyObject *, PyObject *));
/* Macro, trading safety for speed */
#define PyString_AS_STRING(op) ((op)->ob_sval)
#define PyString_AS_STRING(op) (((PyStringObject *)(op))->ob_sval)
#define PyString_GET_SIZE(op) (((PyStringObject *)(op))->ob_size)
#ifdef __cplusplus
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment