File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
com.oracle.graal.python.test/src/tests/cpyext
com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,19 @@ def compile_module(self, name):
214
214
cmpfunc = unhandled_error_compare
215
215
)
216
216
217
+ test_PyUnicode_FromFormat_c = CPyExtFunction (
218
+ _reference_fromformat ,
219
+ lambda : (
220
+ ("char %c\n " , ord ('x' )),
221
+ ("char %c\n " , ord ('あ' )),
222
+ ),
223
+ resultspec = "O" ,
224
+ argspec = 'si' ,
225
+ arguments = ["char* fmt" , "int c" ],
226
+ callfunction = "PyUnicode_FromFormat" ,
227
+ cmpfunc = unhandled_error_compare
228
+ )
229
+
217
230
test_PyUnicode_FromFormat4 = CPyExtFunction (
218
231
_reference_fromformat ,
219
232
lambda : (
Original file line number Diff line number Diff line change 96
96
import com .oracle .graal .python .builtins .objects .cext .capi .CExtNodesFactory .TransformExceptionToNativeNodeGen ;
97
97
import com .oracle .graal .python .builtins .objects .cext .capi .CExtNodesFactory .VoidPtrToJavaNodeGen ;
98
98
import com .oracle .graal .python .builtins .objects .cext .capi .DynamicObjectNativeWrapper .PrimitiveNativeWrapper ;
99
- import com .oracle .graal .python .builtins .objects .cext .capi .DynamicObjectNativeWrapper .PythonObjectNativeWrapper ;
100
99
import com .oracle .graal .python .builtins .objects .cext .capi .DynamicObjectNativeWrapper .WriteNativeMemberNode ;
101
100
import com .oracle .graal .python .builtins .objects .cext .capi .ExternalFunctionNodes .DefaultCheckFunctionResultNode ;
102
101
import com .oracle .graal .python .builtins .objects .cext .capi .ExternalFunctionNodes .MethKeywordsRoot ;
107
106
import com .oracle .graal .python .builtins .objects .cext .capi .NativeReferenceCache .ResolveNativeReferenceNode ;
108
107
import com .oracle .graal .python .builtins .objects .cext .capi .PGetDynamicTypeNode .GetSulongTypeNode ;
109
108
import com .oracle .graal .python .builtins .objects .cext .capi .PyTruffleObjectFree .FreeNode ;
109
+ import com .oracle .graal .python .builtins .objects .cext .capi .DynamicObjectNativeWrapper .PythonObjectNativeWrapper ;
110
110
import com .oracle .graal .python .builtins .objects .cext .common .CArrayWrappers .CArrayWrapper ;
111
111
import com .oracle .graal .python .builtins .objects .cext .common .CArrayWrappers .CByteArrayWrapper ;
112
112
import com .oracle .graal .python .builtins .objects .cext .common .CArrayWrappers .CStringWrapper ;
@@ -3367,6 +3367,8 @@ Object doGeneric(String format, Object vaList) {
3367
3367
throw raiseNode .raise (PythonBuiltinClassType .OverflowError , "character argument not in range(0x110000)" );
3368
3368
}
3369
3369
result .append ((char ) ordinal );
3370
+ vaArgIdx ++;
3371
+ valid = true ;
3370
3372
break ;
3371
3373
case 'd' :
3372
3374
case 'i' :
You can’t perform that action at this time.
0 commit comments