Incorrect signature of CGPDFDictionaryGetObject()

Issue #204 resolved
Nickolas Pohilets
created an issue
  • For second argument metadata shows it as being a pointer to char, and it is not possible to pass bytes or str from Python.

Seems that it should be typed as a null terminated array of text chars:

>>> CGPDFDictionaryGetObject.__metadata__()['arguments'][1]
{'type': b'^c', 'null_accepted': True}
>>> CFStringCreateWithCString.__metadata__()['arguments'][1]
{'type': b'n^t', 'c_array_delimited_by_null': True, 'null_accepted': True}
  • Metadata for the last argument is missing one level of indirection:
>>> CGPDFDictionaryGetObject.__metadata__()['arguments'][2]
{'type': b'o^{CGPDFObject=}', 'null_accepted': True}

Should be

{'type': b'o^^{CGPDFObject=}', 'null_accepted': True}

Version 4.0b1

Comments (5)

  1. Ronald Oussoren repo owner

    Good catch.

    Do you have sample code that uses these APIs? The PyObjC currently only do a basic check of the metadata, but don't actually use the CoreGraphics PDF APIs.

  2. Log in to comment