Skip to content

Commit abe3ae7

Browse files
committed
address PR comments
1 parent d484b9d commit abe3ae7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtParseArgumentsNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ static ParserState doEncodedString(ParserState stateIn, Object kwds, @SuppressWa
552552
throw raise(raiseNode, TypeError, ErrorMessages.ESTAR_FORMAT_SPECIFIERS_NOT_ALLOWED, arg);
553553
}
554554
// XXX: TODO: actual support for the en-/re-coding of objects, proper error handling
555+
// TODO(tfel) we could use CStringWrapper to do the copying lazily
555556
writeOutVarNode.writePyObject(varargs, state.outIndex, asCharPointerNode.execute(arg));
556557
if (isLookahead(format, format_idx + 1, '#')) {
557558
final int size = lib.length(argToJavaNode.execute(state.nativeContext, arg));
@@ -980,8 +981,7 @@ private static int convertbuffer(CExtContext nativeContext, PCallCExtFunction ca
980981
throws ParseArgumentsException {
981982
Object rc = callConvertbuffer.call(nativeContext, FUN_CONVERTBUFFER, sulongArg, voidPtr);
982983
if (!(rc instanceof Number)) {
983-
CompilerDirectives.shouldNotReachHere("wrong result of internal function");
984-
throw raise(raiseNode, SystemError, ErrorMessages.RETURNED_UNEXPECTE_RET_CODE_EXPECTED_INT_BUT_WAS_S, FUN_CONVERTBUFFER, rc.getClass());
984+
throw CompilerDirectives.shouldNotReachHere("wrong result of internal function");
985985
}
986986
int i = intValue((Number) rc);
987987
// first two results are the error results from getbuffer, the third is the one from

0 commit comments

Comments
 (0)