Buffer updates#439
Conversation
| sendallWorker(data.byteCache, flags); | ||
| } | ||
|
|
||
| [Documentation("sendall(string[, flags]) -> None\n\n" |
There was a problem hiding this comment.
Do we need the full doc on this overload?
There was a problem hiding this comment.
I'm not sure how the doc stuff works in regards to something like help(_socket.sendall), we probably don't, but I kept it there like the other overloads.
| } | ||
|
|
||
| public static ByteArray operator +(ByteArray self, string other) { | ||
| if(other.Any(x => x > 0xff)) { |
There was a problem hiding this comment.
MakeByteArray below does the same check as this. Maybe we could try catch the MakeByteArray and throw if necessary? Or if we don't want a try catch we could add a TryMakeByteArray which wouldn't throw.
Also, I wonder if we should add a note that this overload is specifically a workaround for the IPy string are unicode issue.
| } | ||
|
|
||
| void IBufferProtocol.SetItem(int index, object value) { | ||
| throw PythonOps.TypeError("cannot modify read - only memory"); |
| return _size; | ||
| } | ||
| } | ||
| internal int Size { get; private set; } |
There was a problem hiding this comment.
Maybe not worth the effort, but it seems like _object and Size should be readonly.
|
Can we add some tests for all this stuff? |
|
I have another PR coming that will enable tests for this, but its part of a small rework to the testing stuff. |
* Small updates * Buffer updates * Fix IronLanguages#434 * Fix spaces * Add TryMakeByteArray * Switch to using TryMakeByteArray
No description provided.