mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
up
This commit is contained in:
parent
25ab9e3a0f
commit
4b22c10a5c
@ -6013,7 +6013,7 @@ void __initializeBuiltinFunctions(VM* _vm) {
|
||||
_vm->bindBuiltinFunc<1>("ord", [](VM* vm, const pkpy::ArgList& args) {
|
||||
_Str s = vm->PyStr_AS_C(args[0]);
|
||||
if (s.size() != 1) vm->typeError("ord() expected an ASCII character");
|
||||
return vm->PyInt((i64)s[0]);
|
||||
return vm->PyInt((i64)(s.c_str()[0]));
|
||||
});
|
||||
|
||||
_vm->bindBuiltinFunc<2>("hasattr", [](VM* vm, const pkpy::ArgList& args) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 6efef139947bc4c37cba9040fb97e26bc1483c89
|
||||
Subproject commit cc16bce7a9f26fe305ecf30a5aa00697286b2844
|
@ -86,7 +86,7 @@ void __initializeBuiltinFunctions(VM* _vm) {
|
||||
_vm->bindBuiltinFunc<1>("ord", [](VM* vm, const pkpy::ArgList& args) {
|
||||
_Str s = vm->PyStr_AS_C(args[0]);
|
||||
if (s.size() != 1) vm->typeError("ord() expected an ASCII character");
|
||||
return vm->PyInt((i64)s[0]);
|
||||
return vm->PyInt((i64)(s.c_str()[0]));
|
||||
});
|
||||
|
||||
_vm->bindBuiltinFunc<2>("hasattr", [](VM* vm, const pkpy::ArgList& args) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user