[Checkins] [zopefoundation/AccessControl] c4aed6: PyBytes_AS_STRING does not work on unicode objects...

GitHub noreply at github.com
Fri May 12 03:16:57 CEST 2017


  Branch: refs/heads/py3-c-extension
  Home:   https://github.com/zopefoundation/AccessControl
  Commit: c4aed612f1d1dcd3627bdb309de840a95651296d
      https://github.com/zopefoundation/AccessControl/commit/c4aed612f1d1dcd3627bdb309de840a95651296d
  Author: stephan-hof <sh at axiros.com>
  Date:   2017-05-11 (Thu, 11 May 2017)

  Changed paths:
    M src/AccessControl/cAccessControl.c

  Log Message:
  -----------
  PyBytes_AS_STRING does not work on unicode objects.

To get a 'char*' from a unicode object it must be converted to PyBytes
first. This is ensuree via the 'convert_name' function.


  Commit: 794bd6a86ccce3495d7115ff2bae9f564fe9692d
      https://github.com/zopefoundation/AccessControl/commit/794bd6a86ccce3495d7115ff2bae9f564fe9692d
  Author: stephan-hof <sh at axiros.com>
  Date:   2017-05-11 (Thu, 11 May 2017)

  Changed paths:
    M src/AccessControl/cAccessControl.c

  Log Message:
  -----------
  Use tp_free instead of PyObject_DEL.

Previously PyObject_DEL was redefined in ExtensionClass.h to use
tp_free. This redefintion has been removed (see
https://github.com/zopefoundation/ExtensionClass/issues/14).
=> The use of PyObject_DEL in cAccessControl is not correct anymore and
must be replaced with calling tp_free.


Compare: https://github.com/zopefoundation/AccessControl/compare/f2402413b5cd...794bd6a86ccc


More information about the checkins mailing list