msancheznet / pyion

Interface between ION and Python
https://pyion.readthedocs.io/en/latest/index.html
Apache License 2.0
11 stars 9 forks source link

feat: Pyion can now optionally return bundle headers when receiving #15

Closed CWagner23 closed 8 months ago

CWagner23 commented 9 months ago

A new optional parameter for bp_receive called return_headers has been created. This param takes a boolean value where if set to True, the function call will return a tuple where the first value is the bundle payload and the second is the bundle headers.

The current behavior is to return only the bundle payload. This param is set to False by default so that any existing code will not be broken by this change.

msancheznet commented 8 months ago

@CWagner23 Please check out this documentation and see if you agree that when a y# is passed to Py_BuildValue the content of the memory buffer is copied. If you do agree, you can close out the TODO before we merge the pull request

CWagner23 commented 8 months ago

@msancheznet I agree that it does copy, so I have removed the TODO comments