mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
some fix
This commit is contained in:
parent
25ceed2703
commit
8bbb9fc5f3
@ -934,7 +934,9 @@ static void BinaryExpr__emit_(Expr* self_, Ctx* ctx) {
|
||||
|
||||
Ctx__emit_(ctx, opcode, arg, self->line);
|
||||
|
||||
c11__foreach(int, &jmps, i) { Ctx__patch_jump(ctx, *i); }
|
||||
for(int i = 0; i < jmps.count; i++) {
|
||||
Ctx__patch_jump(ctx, c11__getitem(int, &jmps, i));
|
||||
}
|
||||
}
|
||||
|
||||
BinaryExpr* BinaryExpr__new(int line, TokenIndex op, bool inplace) {
|
||||
|
@ -80,7 +80,9 @@ void py_newfunction2(py_Ref out,
|
||||
const py_Ref upvalue) {}
|
||||
|
||||
void py_newnativefunc(py_Ref out, py_CFunction f) {
|
||||
|
||||
out->type = tp_nativefunc;
|
||||
out->is_ptr = false;
|
||||
out->_cfunc = f;
|
||||
}
|
||||
|
||||
void py_bindmethod(py_Type type, const char *name, py_CFunction f){
|
||||
|
@ -25,7 +25,7 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
py_initialize();
|
||||
const char* source = "[1, 'a']";
|
||||
const char* source = "[1+2, 'a']";
|
||||
|
||||
py_Ref r0 = py_reg(0);
|
||||
if(py_eval(source, r0)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user